Nine standalone, production-style AI agent applications in Java, built with Embabel, Spring Boot, and Spring AI. Each one solves a different real-world problem, and together they show one consistent way to structure agents: declarative actions, typed goals, single-responsibility agents, and a hard line between what the LLM decides and what plain Java decides.
- Overview
- The Idea Behind These Projects
- Projects at a Glance
- Project Deep Dives
- Cross-Cutting Patterns
- Repository Structure
- Tech Stack
- Prerequisites
- Getting Started
- Suggested Learning Path
- Notes & Disclaimers
- Roadmap
- Contributing
- Acknowledgements
- License
- Author
This repository is a collection of nine independent agent applications. Each is its own Spring Boot project with its own configuration, its own README, and its own domain β there is no shared parent POM, so you can open any one of them in isolation and run it.
What they have in common is the shape of the solution:
- a free-text request in (a topic, a job posting, a flight delay, a SQL migration, a household's appliancesβ¦),
- a typed pipeline of small actions in the middle, resolved by Embabel's planner rather than hand-wired control flow,
- one or more typed goals out (a published post, a cover letter, a rollback script, a savings planβ¦).
The domains are deliberately varied β content, careers, events, API engineering, databases, home energy, air travel, trip planning β because the point isn't any single use case. It's showing that the same architecture holds up across very different problems.
Who this is for:
- Java developers who want to see what Embabel looks like beyond a "hello world" agent
- Anyone designing LLM applications who wants a concrete, opinionated answer to "which parts of this should the model do, and which parts should be plain code?"
- Developers looking for a portfolio-grade reference for structuring agent projects cleanly β packages, config, exceptions, personas, Javadoc and all
Four principles run through every project in this repo.
Every step is an @Action method that declares what type it needs and what type it produces. Nobody writes step1(); step2(); step3();. Embabel's planner works backwards from the requested goal and runs only the actions required to reach it.
UserInput βββΊ extractX βββΊ X βββΊ analyzeX βββΊ Report βββΊ buildDeliverable βββΊ π― Goal
A practical consequence: a project can expose several goals, and each is requestable on its own. Ask for just the interview prep and the resume branch never runs. Ask for just a packing list and nothing about lineups or itineraries executes.
Every project splits into a core agent (the main spine toward the primary goal) plus side agents β quality gates that feed back into the spine, or downstream agents that contribute independent secondary goals. A 500-line "does everything" agent is the failure mode these projects exist to avoid.
βββββββββββββββββββββββββββ
UserInput ββββββββΊβ Core agent (the spine) βββββββββΊ π― Primary goal
βββββββββ²ββββββββββ¬ββββββββ
β β shared facts (typed)
quality gate β βΌ
βββββββββββββββββββ΄βββ ββββββββββββββββββββββββ
β Side agent: verify β β Side agent: downstreamββββΊ π― Secondary goals
ββββββββββββββββββββββ ββββββββββββββββββββββββ
This is the most important idea in the repo. In every project, each step is sorted into one of two buckets:
| If the step is⦠| It belongs to⦠| Examples in this repo |
|---|---|---|
| A judgment call with no single correct answer | The LLM | Is a stated delay reason a genuine "extraordinary circumstance"? Which resume bullets best fit this role? How severe is a NOT NULL addition on a 80M-row table? |
| A calculation or rule lookup with exactly one correct answer | Plain Java | The EU261 compensation tier, the semver bump, the payback period, whether a SQL statement is reversible, whether a trip's transit load is feasible |
Asking a model to do arithmetic across a dozen line items, or to recall a regulation's fixed table, risks a confident wrong answer. So those steps are computed in code β and the LLM is used afterwards, only to explain or act on a result that's already been decided.
Most agent demos expose every helper to the model as a tool. These projects distinguish:
| Kind | Annotated as | Invoked by | Use it when |
|---|---|---|---|
| LLM-invoked tool | @LlmTool |
The model, mid-reasoning | The model has to assemble the input (e.g. serialize two API snapshots into a diff tool's format) before a deterministic function can run |
| Plain service | @Component only |
Agent code, directly | The calling Java code already holds the typed inputs β nothing for the model to interpret, so routing it through an LLM would only add cost, latency, and a sliver of non-determinism |
Both are deterministic. The difference is who calls them.
| # | Project | Domain | The real problem it addresses | Agents | Goals |
|---|---|---|---|---|---|
| 1 | CineScout π¬ | Movies | Turning one free-text request into a complete, structured profile | 1 | 2 |
| 2 | Blog Agent βοΈ | Content | Going from topic to a researched, reviewed, SEO-ready post | 3 | 2 |
| 3 | CareerForge π§ | Careers | Tailoring a resume and cover letter to a specific job β honestly | 3 | 2 |
| 4 | FestivalScout πͺ | Events | Planning a multi-day festival without double-booking yourself | 3 | 4 |
| 5 | ContractSentinel π°οΈ | API engineering | Breaking API changes shipping unnoticed, with guessed semver bumps | 3 | 2 |
| 6 | MigrationGuard π‘οΈ | Databases | Schema migrations that lock production or lose data with no way back | 3 | 2 |
| 7 | WattWise β‘ | Home energy | Not knowing where an electricity bill comes from, or what's worth fixing | 3 | 3 |
| 8 | SkyClaim |
Air travel | Not knowing what a flight delay entitles you to β or how to claim it | 3 | 3 |
| 9 | TripCompass πΊοΈ | Travel | Multi-city itineraries that ignore how much time transit really eats | 3 | 3 |
Folder: cinescout/ Β· Config prefix: cinescout
Give it "Tell me about Inception" and it returns a structured movie profile β title, release date, director, principal cast, genres, and a spoiler-free plot summary β and can then recommend similar films.
Why it's first: it's the gentlest introduction. One agent, no tools, and the clearest possible picture of how independent extraction actions get assembled by the planner.
| Action | Produces |
|---|---|
getMovieBasicInfo, getMovieActors, getMovieGenres, getPlotSummary |
Independent lookups run against the raw request |
getMovieInfo π― |
The assembled Movie (also looks up the director against the confirmed title to avoid ambiguity) |
getSimilarMovies π― |
MovieRecommendations with a rationale |
Design points: a MovieDataUnavailableException replaces a generic Assert.notNull; a FILM_CRITIC persona keeps summaries spoiler-free; cast size and recommendation count are externalized to config.
"Tell me about Inception"
Folder: blog-agent/ Β· Config prefix: blog-agent
Takes a topic and produces a publish-ready Markdown post with YAML front matter, written to disk β plus Twitter/X and LinkedIn promotion copy.
| Agent | Responsibility |
|---|---|
BlogWriterAgent |
The spine: research β outline β title options β hook β draft β review β TLDR β front matter π― |
ContentQualityAgent |
Fact-checks the draft against web sources; scores readability |
PromotionAgent |
Hero-image prompt; social posts π― |
Design points:
- Outline-first drafting β structure is committed to before any prose is written
- Fact-check feeds the reviewer β flagged claims are corrected in review, not merely noted
- Two tools, two jobs β
ReadingStatsTool(word count / read time) andReadabilityTool(a real Flesch Reading Ease calculation) both ground the model in actual numbers - A separate
reviewerLLM role β drafting and reviewing can run on different models (e.g. Sonnet to draft, Opus to review) - Live research through a Brave Search MCP server
"Why Java Virtual Threads change how you should think about thread pools"
Folder: careerforge/ Β· Config prefix: career-forge
Paste a job posting and your background in one message. It extracts both sides, matches skills against gaps, tailors resume bullets, scores ATS keyword coverage, writes a cover letter, and prepares interview questions.
| Agent | Responsibility |
|---|---|
ApplicationAgent |
Extraction β match β resume highlights β cover letter π― |
ApplicationQualityAgent |
Deterministic ATS keyword scoring, fed into the cover letter |
InterviewPrepAgent |
Technical + behavioral questions weighted toward the candidate's gaps π― |
Design points:
- Two extractions from one input β the job posting and the candidate profile are parsed independently from the same text
- ATS scoring is real code (
AtsKeywordScoreTool), not an LLM estimate - The cover letter sees the keyword gaps β and is explicitly told to work them in only where they honestly reflect real experience. Every persona is instructed never to fabricate experience.
- Interview prep is independently reachable β it needs only the job requirements and the match analysis
Job Posting: Senior Backend Engineer at Acme Corp. Java, Spring Boot, Kafka, PostgreSQLβ¦
My Background: 4 years building microservices in Java and Spring Bootβ¦
Folder: festivalscout/ Β· Config prefix: festival-scout
"I'm going to Tomorrowland, I love techno and melodic house, traveling from Casablanca on a mid-range budget." β a researched lineup, personalized must-see picks, a conflict-checked itinerary, packing list, budget, and safety guidance.
| Agent | Responsibility |
|---|---|
FestivalPlannerAgent |
Extract β research the real lineup (web search) β pick artists β itinerary π― |
ScheduleQualityAgent |
Deterministic same-day time-overlap check, fed into the itinerary |
LogisticsAgent |
Packing list π―, budget estimate π―, safety tips π― |
Design points:
- Live lineup research β lineups change every edition; stale training data would recommend artists who aren't even playing
ScheduleConflictCheckerTooluses realLocalTimeinterval comparison β exactly the multi-item check LLMs get wrongBudgetCalculatorToolsums line items by actual arithmetic- Four independent goals from one agent, each reachable without the others
LineupUnavailableExceptionguards against recommending artists against an empty lineup
Folder: contractsentinel/ Β· Config prefix: contract-sentinel
Give it the previous and current version of an API contract. It diffs them, classifies what actually breaks for consumers, computes the correct semver bump by rule, and writes a migration guide and changelog.
| Agent | Responsibility |
|---|---|
ApiDiffAgent |
Extract both snapshots β structural diff β classify breaking changes β migration guide π― |
VersioningAgent |
Rule-based semver bump; the LLM only phrases the rationale |
ChangelogAgent |
Keep-a-Changelog entry π― |
Design points:
- The diff is code, not vibes β
ApiDiffTooldoes real set-based comparison of endpoints and fields; the LLM judges consumer impact, not what changed SemverRuleToolis deliberately not an@LlmToolβ by the time the bump is needed, the Java code already holds the counts; there's one correct answer per semver.org, so it's decided in plain Java and the model only writes the explanation- Two distinct snapshot types (
PreviousApiSnapshot/CurrentApiSnapshot) let the planner bind "old" and "new" to separate parameters
Folder: migrationguard/ Β· Config prefix: migration-guard
Scans a raw SQL migration for what will actually hurt in production, weighs severity against table size and criticality, proposes a safer staged rollout, and generates a rollback script that refuses to fabricate recovery for data that's gone.
| Agent | Responsibility |
|---|---|
MigrationAnalysisAgent |
Parse script + table context β staged rollout plan π― |
RiskAssessmentAgent |
Regex-based risky-pattern scan β context-weighted severity |
RollbackAgent |
Honest rollback script π― |
Design points:
- Mechanical detection first β
RiskyPatternScannerToolcatchesNOT NULLwithoutDEFAULT,CREATE INDEXwithoutCONCURRENTLY,DROP COLUMN, type changes, renames, and validating constraints, even when buried mid-script - Context-aware severity β the same pattern is
HIGHon a huge production-critical table andLOWon a small one - The safety pattern:
SqlReversalTooldecides reversibility in plain Java before any model call.ADD COLUMNis always reversible;DROP COLUMNnever is. The LLM only assembles the result and is instructed never to invent a rollback for aMANUAL_REVIEW_REQUIREDentry β a plausible-looking fake rollback is most dangerous exactly when it gets trusted.
Folder: wattwise/ Β· Config prefix: watt-wise
Describe your appliances and electricity tariff. Get a calculated per-appliance cost breakdown, cost-significant efficiency findings, a ranked savings plan with computed payback periods, a plain-language bill explanation, and an off-peak scheduling guide.
| Agent | Responsibility |
|---|---|
EnergyAnalysisAgent |
Extract β cost calculation β efficiency analysis β savings plan π― |
ReportingAgent |
Plain-language bill explanation π― |
SchedulingAgent |
Off-peak timing recommendations π― |
Design points:
EnergyCostCalculatorTool(@LlmTool) computes watts Γ hours Γ rate across every appliance β repeated arithmetic is exactly where LLMs driftPaybackPeriodTool(plain service) β the model estimates a replacement's upfront cost and monthly savings (genuine judgment), then Java does the division- Gracefully says "nothing to shift" when a flat-rate tariff gives scheduling nothing to optimize
HouseholdProfileIncompleteExceptionprevents silently reporting a $0 bill
Folder: skyclaim/ Β· Config prefix: sky-claim
Describe a flight delay or cancellation. SkyClaim computes the EU261 compensation figure, assesses likely eligibility, drafts the claim letter, and summarizes what the airline owes you right now regardless of how the claim turns out.
| Agent | Responsibility |
|---|---|
DisruptionAnalysisAgent |
Extract β compensation β eligibility β claim letter π― |
CareEntitlementsAgent |
Immediate meals / hotel / communication rights π― |
RebookingAdvisorAgent |
Next steps and evidence to keep π― |
Design points β the cleanest demonstration of the "judge vs. compute" split:
- The compensation amount (β¬250 / β¬400 / β¬600 by distance and delay) is fixed by the regulation, so
Eu261CompensationRuleTooldecides it in plain Java - Eligibility β whether a stated reason counts as an "extraordinary circumstance" β is genuinely nuanced, so it stays with the LLM
- Care entitlements are independent of compensation eligibility, so that goal depends only on the disruption facts and is available immediately, at the gate
β οΈ EligibilityAssessmentcarries a mandatory disclaimer field β informational guidance, not legal advice (see Notes & Disclaimers)
Folder: tripcompass/ Β· Config prefix: trip-compass
"2 days Paris, 1 day Brussels, 3 days Amsterdam" looks fine on paper. TripCompass computes how much of the trip transit actually consumes, and restructures the plan if it isn't realistic for your pace.
| Agent | Responsibility |
|---|---|
TripPlanningAgent |
Extract β transit estimates β feasibility check β itinerary π― |
BudgetPlannerAgent |
Category budget split + destination-aware notes π― |
PackingAdvisorAgent |
Packing list spanning every destination's climate π― |
Design points:
TransitTimeEstimatorTool(@LlmTool) β the model estimates distance and mode from geography; the tool turns that into hours using average speed plus fixed overhead (airport processes, station transfers)FeasibilityRuleTool(plain service) β the ratio of transit hours to usable trip hours against a pace-specific tolerance has one correct answer, so it's decided in JavaBudgetAllocatorTool(plain service) β Java computes the exact dollar split; the LLM can only add commentary, never alter the numbers- If the plan fails the check, the itinerary step is instructed to cut, combine, or extend β not just attach a warning
| Project | LLM-invoked tools (@LlmTool) |
Plain services (called directly in Java) |
|---|---|---|
| CineScout | β | β |
| Blog Agent | ReadingStatsTool, ReadabilityTool |
β |
| CareerForge | AtsKeywordScoreTool |
β |
| FestivalScout | ScheduleConflictCheckerTool, BudgetCalculatorTool |
β |
| ContractSentinel | ApiDiffTool |
SemverRuleTool |
| MigrationGuard | RiskyPatternScannerTool |
SqlReversalTool |
| WattWise | EnergyCostCalculatorTool |
PaybackPeriodTool |
| SkyClaim | β | Eu261CompensationRuleTool |
| TripCompass | TransitTimeEstimatorTool |
FeasibilityRuleTool, BudgetAllocatorTool |
Reading down the column on the right is the arc of the repo: the first projects ground the model with tools it calls; the later ones increasingly take decisions away from the model entirely when they have exactly one correct answer.
Ask these, in order, for every step:
- Does this have exactly one correct answer, given inputs I already hold as typed data? β plain Java service, called directly.
- Does it have a correct answer, but the model must first assemble or interpret the input? β
@LlmTool. - Is it a judgment where reasonable experts could differ? β the LLM, with a focused persona and a precise prompt.
- Could a wrong answer be dangerous precisely because it looks right? (rollbacks, legal amounts, money) β option 1, always, then let the model explain the decided result.
Every project uses the same layout, so once you've read one, you can navigate all of them:
<project>/
βββ src/main/java/com/<project>/
β βββ <Project>Application.java # @SpringBootApplication + @EnableConfigurationProperties
β βββ agent/ # one class per responsibility (core + side agents)
β βββ config/ # @ConfigurationProperties record with safe defaults
β βββ exception/ # a domain-specific exception, not a bare Assert
β βββ model/ # immutable records, one per file, + package-info.java
β βββ persona/ # RoleGoalBackstory prompt contributors
β βββ tool/ # @LlmTool classes and plain deterministic services
βββ src/main/resources/
βββ application.yml # Spring, Embabel model, and project config
- Records for every model β immutable, one per file, each with Javadoc explaining who produces and consumes it
- A typed exception per project β e.g.
LineupUnavailableException,UnparsableMigrationExceptionβ thrown when extraction fails, instead of silently proceeding with empty data and reporting a false "all clear" @ConfigurationPropertiesrecords with defaulting compact constructors β the app never fails to start on missing config- Personas in one place β prompt contributors live in
persona/, separate from control flow - Full Javadoc β every action documents what it consumes, what it produces, and how it fits the pipeline
embabel-agents-playground/
βββ README.md # β you are here
β
βββ cinescout/ # π¬ movie research agent
βββ blog-agent/ # βοΈ multi-agent blog writer
βββ careerforge/ # π§ job application assistant
βββ festivalscout/ # πͺ music festival planner
βββ contractsentinel/ # π°οΈ API contract guardian
βββ migrationguard/ # π‘οΈ database migration safety agent
βββ wattwise/ # β‘ home energy tracker
βββ skyclaim/ # βοΈ flight disruption & compensation agent
βββ tripcompass/ # πΊοΈ multi-city trip feasibility planner
Each folder is a self-contained Maven project with its own README.md. There is no shared parent POM.
| Layer | Technology |
|---|---|
| Language | Java 21 |
| Application framework | Spring Boot 3.x |
| Agent framework | Embabel |
| LLM integration | Spring AI |
| Default model | Claude Sonnet (claude-sonnet-4-6); Blog Agent also uses a reviewer role on Claude Opus |
| Web research | Embabel's web tool group; Brave Search via MCP (Blog Agent) |
| Build tool | Maven |
- Java 21+
- Maven 3.9+
- An Anthropic API key (or another provider supported by Spring AI β adjust
embabel.models.default-llm) - Blog Agent only: Node.js +
npx(to run the Brave Search MCP server) and a Brave Search API key - Blog Agent & FestivalScout: web research requires a configured web search tool group
1. Clone the repository
git clone https://github.com/drissiOmar98/Embabel-Agents-Playground.git
cd Embabel-Agents-Playground2. Pick a project and set its environment variables
| Project | Environment variables |
|---|---|
cinescout, careerforge, contractsentinel, migrationguard, wattwise, skyclaim, tripcompass |
ANTHROPIC_API_KEY |
festivalscout |
ANTHROPIC_API_KEY + a configured web search tool group |
blog-agent |
ANTHROPIC_API_KEY, BRAVE_API_KEY (and OPENAI_API_KEY as referenced in its application.yml) |
export ANTHROPIC_API_KEY=your-anthropic-key3. Build and run
cd tripcompass # or any other project folder
mvn clean install
mvn spring-boot:run4. Send it a request
Submit a free-text request through however your Embabel setup exposes agents (CLI/Shell or REST, depending on your platform configuration). Each project's README includes an example input and sample output for every stage.
5. Tune it
Every project's behavior limits live in its application.yml β for example:
trip-compass:
max-packing-items-per-category: 6
embabel:
models:
default-llm: claude-sonnet-4-6If you're reading these to learn Embabel, this order introduces one new idea at a time:
| Step | Project | New idea it introduces |
|---|---|---|
| 1 | CineScout | The basics: independent extraction actions, assembled by the planner into a goal |
| 2 | Blog Agent | Splitting into core + side agents; @LlmTool grounding; a dedicated reviewer model; web research |
| 3 | CareerForge | Extracting two different facts from one input; a deterministic score feeding back into generation |
| 4 | FestivalScout | Many independent goals from one agent; real interval math as an LLM tool |
| 5 | ContractSentinel | The pivot: a plain service called directly β LLM-invoked vs. direct-call tools |
| 6 | WattWise | Letting the model estimate, then letting Java do the arithmetic on those estimates |
| 7 | TripCompass | Several plain services in one pipeline; a deterministic check that changes what the LLM does next |
| 8 | MigrationGuard | The safety case: never let the model decide something that's dangerous when wrong-but-plausible |
| 9 | SkyClaim | The full "judge vs. compute" split in one project β plus disclaimers as part of the data model |
- Sample outputs are illustrative. The JSON and text samples in each project's README show the shape of the data; they were not captured from live runs. Real output will vary.
- SkyClaim is informational, not legal advice. It cannot verify weather records, maintenance logs, or an airline's actual reasoning. Always confirm eligibility with the airline or your national enforcement body.
- MigrationGuard is a second set of eyes, not a replacement for review. Its pattern scan covers a known set of risky constructs (Postgres-oriented); it does not guarantee a migration is safe. Test rollback scripts before relying on them.
- WattWise and TripCompass produce estimates. Appliance wattage, tariff handling, transit speeds, and budget splits are planning heuristics, not quotes.
- FestivalScout's conflict checker treats sets as same-day ranges and does not yet handle sets that cross midnight.
- A shared
embabel-agent-patternsmodule extracting the commonpersona/exception/configconventions - Unit tests for every deterministic tool (they're pure functions β ideal test targets)
- Docker Compose setup for running any project with one command
- REST controllers for each agent
- CI pipeline building every project on each push
- A tenth project: a multi-agent code-review assistant
Issues and pull requests are welcome. For a new project or action, please:
- Keep each agent focused on a single responsibility
- Follow the shared package layout above
- Add Javadoc explaining what every action consumes and produces
- Sort every step honestly: if it has exactly one correct answer, compute it in plain Java; reserve the LLM for genuine judgment
- Throw a typed domain exception when extraction fails β never proceed on empty data
- The Embabel project and its maintainers, for the agent framework these projects build on
- Community Embabel examples that served as starting points for the first two projects (Blog Agent and CineScout), which were then expanded and restructured
Distributed under the MIT License. See LICENSE for details.
Individual projects that touch regulated or high-stakes domains (SkyClaim, MigrationGuard) are technical demonstrations. They are not legal, financial, or operational advisory services, and using them does not create any advisory relationship.
Built by Omar Drissi β feel free to open an issue, star the repo β, or connect on GitHub.