# A2A in Java: hands on Embabel

DevFeed: [A2A in Java: hands on Embabel](<https://devfeed.tech/articles/a2a-in-java-hands-on-embabel-22587.md>)

Original publisher: [Read original article](<https://medium.com/amex-gbt-technology/a2a-in-java-hands-on-embabel-b18d514be424?source=rss----60a0578f4096---4>)

Author: Aneshka Goyal

Published: 2026-06-21T07:01:03Z

Content type: tutorial

Language: en

Sources: [Amex GBT Technology](<https://devfeed.tech/sources/amex-gbt-technology.md>)

Topics: [Embabel](<https://devfeed.tech/topics/embabel.md>), [A2A protocol](<https://devfeed.tech/topics/a2a-protocol.md>), [Java](<https://devfeed.tech/topics/java.md>), [MCP](<https://devfeed.tech/topics/mcp.md>), [Spring AI](<https://devfeed.tech/topics/spring-ai.md>), [Maven](<https://devfeed.tech/topics/maven.md>), [bedrock](<https://devfeed.tech/topics/bedrock.md>), [Large Language Model](<https://devfeed.tech/topics/llm.md>)

Tags: [a2a](<https://devfeed.tech/tags/a2a.md>), [agent](<https://devfeed.tech/tags/agent.md>), [ai](<https://devfeed.tech/tags/ai.md>), [embabel](<https://devfeed.tech/tags/embabel.md>), [java](<https://devfeed.tech/tags/java.md>), [maven](<https://devfeed.tech/tags/maven.md>), [mcp-server](<https://devfeed.tech/tags/mcp-server.md>), [software-engineering](<https://devfeed.tech/tags/software-engineering.md>), [spring-ai](<https://devfeed.tech/tags/spring-ai.md>)

## AI overview

A hands-on tutorial for building a Java agent with Embabel. It demonstrates LLM-based story generation and review, Amazon Bedrock integration, a local Spring AI MCP server for word counts, Maven dependency management, and A2A-compliant endpoints.

## Source excerpt

Part 2: Hands on with Embabel! In Part 1, we discussed how Embabel works internally. In Part 2, we'll now try to get an application started that has an LLM interaction, talks to local MCP server (for tools), and helps us achieve a goal. This time, we'll also make sure we use A2A protocol for our agent (something Embabel makes easier to do allowing us to focus on core business logic and offloading boilerplate code to Embabel). We'll use the project creator to create a skeleton project for us with some Embabel dependencies and code. uvx --from git+https://github.com/embabel/project-creator.git project-creator Please note we can use Java or Kotlin as our preferred language, I would be leveraging Java. This is a simple story teller agent who writes a story and gets it reviewed (both story generation and review comes from LLM). We'd be using Bedrock for connection to our LLM model. For fetching the word count for a topic, it uses an MCP server which is a Spring AI MCP server running locally. Dependency management is handled using Maven, and the POM file looks like this: <?xml version="1.0" encoding="UTF-8"?> <project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>3.5.9</version> <relativePath/> <!-- Lookup parent from repository --> </parent> <groupId>com.example.demo-city-agent</groupId> <artifactId>Demo-city-agent</artifactId> <version>0.1.0-SNAPSHOT</version> <packaging>jar</packaging> <name>My first agent</name> <description>Generated agent project</description> <properties> <java.version>21</java.version> <embabel-agent.version>0.3.1</embabel-agent.version> </properties> <dependencies> <!-- Main Dependencies --> <dependency> <groupId>com.embabel.agent</groupId> <artifactId