In our previous blog, Alibaba’s Open-Soure Framework: Powering Modern AI Systems, we focused on the theory behind Spring AI Alibaba and how its open-source foundations enable intelligent agent design. We discussed concepts, architecture, and why modern AI systems must move beyond static responses. But theory alone doesn’t solve real-world problems especially when it comes to complex challenges like career guidance, where prebuilt ideas and outdated knowledge simply aren’t enough.
In this blog, we introduce the Career Scout Agent an AI agent designed to guide career exploration using a reasoning loop, not guesswork. Instead of relying on fixed knowledge or assumptions, this agent actively identifies what it doesn’t know and retrieves live, up-to-date information from the internet using the Tavily Search API. Whether you’re exploring Sustainable Fashion Design, Cloud Architecture, or emerging interdisciplinary roles, the agent delivers insights that are current, practical, and grounded in real data.
The Foundation: Building A Research-Driven Agent
Most AI chatbots are limited by a fixed knowledge cutoff, making them unreliable for fast-evolving fields, rising roles in 2026, or current market dynamics. Their responses often feel generic, outdated, or incomplete because they rely on historical data rather than what is happening now.
The Career Scout Agent is designed to solve this gap. Instead of guessing, it follows a Reasoning Loop: when it lacks information, it actively retrieves live data using the Tavily Search API. It then generates a research-backed career guide with field overviews, step-by-step roadmaps, in-demand skills, key inspirations, future trends, and practical pro tips grounded in real-world, up-to-date insights.
The Tooling Stack Used In This Project
Java 17 : The foundation for modern Spring Boot applications
Maven : To manage dependencies and builds
Ollama : Ollama is a lightweight tool that lets you run large language models locally on your own machine with simple terminal commands.
Qwen 2.5 (via Ollama) : A powerful open-source large language model optimized for strong reasoning, multilingual understanding, and efficient local inference, ideal for running fully offline AI agents.
Tavily API : A developer-friendly web research and search API optimized for retrieving fresh, structured, and reliable real-time information for AI agents and LLM applications.
The overall execution of the project follows a well-defined agentic workflow, as depicted in the diagram below.

Complete Installation & Setup Guide
Prepare your environment by installing:
ollama pull granite3.3:8bNext, navigate to start.spring.io and generate a new Spring Boot project using the following recommended configuration
Spring Boot: 3.4.0+: Spring Boot 3.4.0+ is a modern, production-ready Java framework that simplifies building scalable web applications and seamlessly integrates AI capabilities through Spring AI.
Dependencies: Spring Web, Lombok
This gives you a clean, production-ready base to build on.
Write the Tavily API Key in the application.properties
tavily.api.key= your api keyAdding Spring AI Dependencies
Finally, wire in Spring AI. The BOM (Bill of Materials) is important it ensures all AI-related modules stay compatible. Add the following to your pom.xml
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.ai</groupId>
<artifactId>spring-ai-ollama-spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-webflux</artifactId>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.ai</groupId>
<artifactId>spring-ai-bom</artifactId>
<version>1.1.2</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
Writing The Code: Bringing The Career Scout Agent To Life
A. The Main Application: Where Everything Starts
Every Spring Boot application starts with a dedicated entry-point class that initializes the runtime, configures the application context, and orchestrates the wiring of all components required for the system to run.
package com.example.demo;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class SpringAiDemoApplication {
public static void main(String[] args) {
SpringApplication.run(SpringAiDemoApplication.class, args);
}
}B. The Scout: CareerResearchTool.java
This class acts as the eyes of the agent, fetching fresh, real-world information from the internet using the Tavily Search API. The @Tool annotation exposes this method as a callable capability, allowing the AI model to invoke it whenever live data is needed.
package com.example.demo;
import org.springframework.ai.tool.annotation.Tool;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.web.reactive.function.client.WebClient;
import java.util.Map;
@Service
public class CareerResearchTool {
private final WebClient webClient = WebClient.create("https://api.tavily.com");
@Value("${tavily.api.key}")
private String apiKey;
@Tool(description = "Researches a career field to find roadmaps, latest trends, and top 10-15 inspirations or competitors.")
public String researchCareer(String careerField) {
// We create a deep query to get both roadmap and competitor data
String query = "Comprehensive guide to starting a career in " + careerField +
" in 2026, including a list of top 15 influencers and competitors.";
Map<String, Object> response = webClient.post()
.uri("/search")
.header("Content-Type", "application/json")
.bodyValue(Map.of(
"api_key", apiKey,
"query", query,
"search_depth", "advanced",
"max_results", 5
))
.retrieve()
.bodyToMono(Map.class)
.block();
return response != null ? response.toString() : "No data found for this career.";
}
}C. The Coach: CareerAgentController.java
Finally, we have the brain and voice of the system. The controller receives the user’s request, decides when to call the research tool, and then structures the final response into a clear, actionable career guide.
package com.example.demo;
import org.springframework.ai.chat.client.ChatClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
@RestController
public class CareerAgentController {
private final ChatClient chatClient;
public CareerAgentController(ChatClient.Builder builder, CareerResearchTool careerTool) {
this.chatClient = builder
.defaultSystem("""
You are an expert Career Growth Advisor.
When a user asks about a field:
1. Use the research tool to find current 2026 data.
2. Complete overview of the field
3. Step-by-step guide from starting to mastering.
4. Required skills.
5. Common mistakes.
6. List 10-15 'Inspirations & Competitors' in a Markdown Table.
7. For each competitor, explain briefly WHY they are successful.
8. Current & future trends.
5. End with a 'Pro-Tip' for 2026.
""")
.defaultTools(careerTool)
.build();
}
@GetMapping("/ai/career-guide")
public String getCareerGuide(@RequestParam String field) {
return chatClient.prompt()
.user("I want to make a career in " + field + ". Give me the full guide.")
.call()
.content();
}
}D. Example Output: let’s see output from Career Scout Agent
When you hit localhost:8080/ai/career-guide?field=DigitalMarketing you’ll get a response like this:
Field Overview:Digital Marketing is a core growth engine in 2026, focused on data-driven customer acquisition across search, social, content, email, and emerging commerce platforms powered increasingly by AI and automation.
Roadmap:
Step 1: Learn fundamentals (SEO, SEM, PPC, content, social, email) →
Step 2: Choose a specialization (SEO, Social Media, Content, Analytics) →
Step 3: Master tools (Google Analytics, SEMrush, Ahrefs, Mailchimp, Hootsuite) →
Step 4: Build a results-focused portfolio →
Step 5: Gain hands-on experience & optimize with analytics →
Step 6: Stay current with AI, video, and platform trends
Name | Specialization | Why Success? |
|---|---|---|
Neil Patel | SEO & Growth Marketing | Global thought leader, scalable content strategies |
Rand Fishkin | SEO & Startups | Deep SEO expertise, trusted industry educator |
Tim Ferriss | Digital Influence | Cross-domain authority, massive audience reach |
Gary Vaynerchuk | Social Media Marketing | Platform-first strategy, brand storytelling |
Ann Handley | Content Marketing | High-impact storytelling and education |
Current & Future Trends:
AI-driven targeting, short-form video dominance, social commerce expansion, privacy-first marketing compliance
Pro-Tip 2026:
Master AI-powered analytics + creative experimentation marketers who blend automation with human storytelling will dominate.
Note: This is the summary response of the response given by agent.
Key Takeaway
By building the Career Scout Agent with Spring AI, we’ve demonstrated how seamlessly the Java ecosystem can be extended with real, production-ready intelligence. Instead of a static chatbot, this solution delivers a dynamic, research-driven agent that can reason, retrieve live web data, and generate up-to-date career guidance while still leveraging Java’s proven strengths in security, scalability, databases, and operational monitoring.
Spring AI serves as a robust bridge between modern AI models and enterprise-grade systems. As part of the trusted Spring ecosystem, it provides stability, flexibility, and a unified abstraction that works across both local models like Ollama and cloud providers such as OpenAI. For Java developers, this goes beyond simply “adding AI” it represents a practical path to future-proofing applications with intelligent, autonomous capabilities designed for real-world use.
The Career Scout Agent shows how Spring AI can transform a simple Java application into a dynamic, research-driven system that reasons, searches the web, and delivers real-world insights. It’s a practical blueprint for building intelligent, future-ready agents that go far beyond static chatbots.
