[
https://issues.apache.org/jira/browse/CAMEL-23063?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Luigi De Masi resolved CAMEL-23063.
-----------------------------------
Resolution: Fixed
> Add camel-a2a component for Agent-to-Agent (A2A) protocol integration
> ---------------------------------------------------------------------
>
> Key: CAMEL-23063
> URL: https://issues.apache.org/jira/browse/CAMEL-23063
> Project: Camel
> Issue Type: New Feature
> Components: camel-ai
> Reporter: Luigi De Masi
> Assignee: Luigi De Masi
> Priority: Major
> Fix For: 4.21.0
>
>
> Add a new camel-a2a component under camel-ai that implements the A2A
> (Agent-to-Agent) protocol
> ([https://a2a-protocol.org|https://a2a-protocol.org/]), enabling Camel routes
> to participate in A2A ecosystems as both
> server (consumer) and client (producer).
> h2. Overview
> The A2A protocol is transport-level — it defines how AI agents discover each
> other via Agent Cards,
> advertise skills, and exchange tasks over HTTP. It does not mandate LLM
> usage; agents can be rule
> engines, keyword matchers, or LLM-powered, making it a natural fit for
> Camel's integration-first
> approach.
> h2. Component
> URI syntax: {{{}a2a:\{protocol}:{agentNameOrRemoteUrl{}}}}
> * Consumer: {{a2a:rest:my-agent}} — exposes agent card and task endpoints
> * Producer:
> {{a2a:rest:[http://remote-agent:8080|http://remote-agent:8080/]}} — sends
> tasks to remote agents
> h3. Consumer (A2A Server)
> Hosts an A2A agent by exposing:
> * {{/.well-known/a2a-agent-card}} — agent card discovery endpoint
> * Task endpoints — {{{}message/send{}}}, {{{}message/stream{}}},
> {{{}tasks/get{}}}, {{{}tasks/cancel{}}},
> {{{}tasks/list{}}}, {{tasks/pushNotificationConfig/*}}
> The consumer registers itself with the selected HTTP server component
> (platform-http by default)
> and routes incoming tasks to the Camel route processor.
> h3. Producer (A2A Client)
> Sends tasks to remote A2A agents. Fetches and caches the remote agent's card
> at startup.
> Operation selection via the {{A2AOperations}} header:
> * {{messageSend}} — synchronous message send
> * {{messageStream}} — SSE streaming message send
> * {{{}taskGet{}}}, {{{}taskCancel{}}}, {{taskList}} — task management
> * {{{}pushConfigCreate{}}}, {{{}pushConfigGet{}}}, {{pushConfigDelete}} —
> push notification config
> * {{taskSubscribe}} — subscribe to task updates
> h2. Protocol Support
> * A2A v1.0 specification
> * REST and JSON-RPC 2.0 protocol bindings ({{{}A2AProtocol{}}} abstraction)
> * Synchronous, asynchronous (push notifications via webhooks), and streaming
> (SSE) delivery modes
> * In-memory task store with configurable capacity, lazy eviction, and push
> notification dispatch
> h2. Data Format
> The {{dataFormat}} endpoint option follows the CXF naming convention:
> ||Mode||Consumer body||Producer body||Default||
> |{{PAYLOAD}}|Extracted text ({{{}String{}}})|Extracted text
> ({{{}String{}}})|Yes|
> |{{POJO}}|Full {{Message}} object|{{Task}} or {{Message}} object|No|
> |{{RAW}}|Raw JSON ({{{}String{}}})|Raw JSON ({{{}String{}}})|No|
> h2. Simple Language Functions
> * {{{}$\{a2a:card{}}}} — full agent card as JSON
> * {{{}$\{a2a:card.name{}}}}, {{{}$\{a2a:card.description{}}}},
> {{{}$\{a2a:card.skills{}}}} — card fields
> * {{{}$\{a2a:card.skills.json{}}}} — skills as JSON array
> * {{{}$\{a2a:emit(...){}}}} — emit progress updates from within Simple
> expressions
> h2. Authentication
> Integrates with Camel's {{camel-oauth}} profiles through the {{oauthProfile}}
> endpoint option.
> Supports the A2A spec's per-scheme security model with a strategy-per-scheme
> pattern: the agent
> card advertises security schemes while {{oauthProfile}} bridges to Camel's
> runtime enforcement
> (OIDC discovery, JWKS validation, opaque token introspection). Configuration
> follows a
> card-as-base hierarchy with endpoint-level overrides.
> h2. Example
> {code:yaml}
> - route:
> from:
> uri: 'a2a:rest:weather-agent'
> parameters:
> agentDescription: Provides real-time weather data
> oauthProfile: keycloak
> steps:
> - process:
> ref: weatherProcessor
> {code}
> {code:yaml}
> - route:
> from:
> uri: "direct:query-agent"
> steps:
> - to:
> uri: "a2a:rest:http://remote-agent:8080"
> parameters:
> dataFormat: POJO
> {code}
> h2. Dependencies
> * {{a2a-java-sdk-spec}} — A2A protocol model (reference implementation)
> * Uses the selected HTTP server component for consumer hosting
> (platform-http, undertow, etc.)
> * {{camel-oauth}} for incoming token validation (optional)
> h2. Related
> * [A2A Protocol specification|https://a2a-protocol.org/]
> * CAMEL-23685 — OAuth token validation SPI (prerequisite for
> {{oauthProfile}} support)
> * CAMEL-23723 — extends {{oauthProfile}} to additional HTTP consumer
> components
--
This message was sent by Atlassian Jira
(v8.20.10#820010)