A2A
Since Camel 4.21
Both producer and consumer are supported
The A2A component implements the Agent-to-Agent (A2A) v1.0 protocol, enabling Camel routes to both expose and call A2A-compliant agents.
As a consumer, it turns a Camel route into an A2A agent — automatically serving an agent card at /.well-known/agent-card.json, exposing all A2A operations via HTTP, and managing task state. As a producer, it calls remote A2A agents with automatic agent card discovery, protocol wrapping, and credential management.
The component follows the same design philosophy as REST OpenAPI: it handles protocol plumbing and delegates business logic entirely to the route.
| A2A Protocol The A2A protocol is an open standard for communication between AI agents. It defines how agents discover each other (via agent cards), exchange messages, manage long-running tasks, stream progress updates, and deliver push notifications. The protocol supports both REST (HTTP+JSON) and JSON-RPC 2.0 bindings over HTTP. |
Preview Limitations
The A2A component is Preview in Camel 4.21. It targets the A2A v1.0 protocol, but endpoint options, model classes, generated metadata, and the task-store SPI may still change before the component reaches stable support.
Current Preview limitations:
-
Extended Agent Card /
GetExtendedAgentCardis not implemented in this first release. -
Consumers validate operation requests by default. Local-only examples in this page set
validateAuth=false; network-exposed agents should use an agent card withsecuritySchemesandsecurityRequirementsplusapiKey,bearerToken, oroauthProfileendpoint configuration. -
The REST binding uses A2A custom-method paths containing colons, such as
/message:send. These paths collide on Vert.x/platform-http. UseprotocolBinding=JSONRPCwith platform-http, or usehttpServerComponent=undertoworhttpServerComponent=jettyfor REST custom-method routes. -
Real-time SSE streaming is verified with Vert.x/platform-http, Undertow, and Jetty.
-
The default task store is in-memory and single-JVM. Register a custom
A2ATaskStorefor durable or cross-node task state.
Maven users will need to add the following dependency to their pom.xml:
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-a2a</artifactId>
<version>x.x.x</version>
<!-- use the same version as your Camel core version -->
</dependency> Consumer routes also need an HTTP server component at runtime. For example, add camel-platform-http-vertx for JSON-RPC agents (including SSE streaming), or camel-undertow / camel-jetty for REST custom-method routes. See Dependencies and HTTP Server Component Discovery.
URI Format
a2a:agentCardSource[?options]
How agentCardSource determines where the agent card is loaded from:
| Source | Example |
|---|---|
Remote URL (partial) |
|
Remote URL (full) |
|
Classpath |
|
File |
|
Plain name |
|
The same URI works in both from() (consumer: "I am this agent") and to() (producer: "I am calling this agent").
Configuring Options
Camel components are configured on two separate levels:
-
component level
-
endpoint level
Configuring Component Options
At the component level, you set general and shared configurations that are, then, inherited by the endpoints. It is the highest configuration level.
For example, a component may have security settings, credentials for authentication, urls for network connection and so forth.
Some components only have a few options, and others may have many. Because components typically have pre-configured defaults that are commonly used, then you may often only need to configure a few options on a component; or none at all.
You can configure components using:
-
the Component DSL.
-
in a configuration file (
application.properties,*.yamlfiles, etc). -
directly in the Java code.
Configuring Endpoint Options
You usually spend more time setting up endpoints because they have many options. These options help you customize what you want the endpoint to do. The options are also categorized into whether the endpoint is used as a consumer (from), as a producer (to), or both.
Configuring endpoints is most often done directly in the endpoint URI as path and query parameters. You can also use the Endpoint DSL and DataFormat DSL as a type safe way of configuring endpoints and data formats in Java.
A good practice when configuring options is to use Property Placeholders.
Property placeholders provide a few benefits:
-
They help prevent using hardcoded urls, port numbers, sensitive information, and other settings.
-
They allow externalizing the configuration from the code.
-
They help the code to become more flexible and reusable.
The following two sections list all the options, firstly for the component followed by the endpoint.
Component Options
The A2A component supports 3 options, which are listed below.
| Name | Description | Default | Type |
|---|---|---|---|
Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the likes, will now be processed as a message and handled by the routing Error Handler. Important: This is only possible if the 3rd party component allows Camel to be alerted if an exception was thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not possible. In other situations we may improve the Camel component to hook into the 3rd party component and make this possible for future releases. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or ERROR level and ignored. | false | boolean | |
Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel’s routing error handlers. Beware that when the first message is processed then creating and starting the producer may take a little time and prolong the total processing time of the processing. | false | boolean | |
Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching type, which then gets configured on the component. This can be used for automatic configuring JDBC data sources, JMS connection factories, AWS Clients, etc. | true | boolean |
Endpoint Options
The A2A endpoint is configured using URI syntax:
a2a:agentCardSource
With the following path and query parameters:
Query Parameters (35 parameters)
| Name | Description | Default | Type |
|---|---|---|---|
Agent card bean reference or inline configuration. | AgentCard | ||
The base path for HTTP requests. | String | ||
The data format for the exchange body, following the CXF DataFormat convention. PAYLOAD (default) extracts text content from message parts as a String backward compatible, simple for chatbot routes. POJO sets the body to the full Java model object (Message on consumer, Task or Message on producer) preserving all parts, metadata, and file content. RAW passes the raw JSON string without deserialization useful for forwarding, logging, or compliance. Enum values:
| PAYLOAD | A2ADataFormat | |
The agent description (overrides agent card). | String | ||
Maximum number of history messages to include in the context. | Integer | ||
The host to connect to for producers. | String | ||
The agent name (overrides agent card). | String | ||
The port to connect to for producers. | Integer | ||
The protocol binding to use for communication. Legacy aliases rest and jsonrpc are also accepted. Enum values:
| HTTP+JSON | String | |
Whether to return immediately without waiting for task completion. | false | boolean | |
Whether to validate authentication on incoming consumer operation requests. Disable explicitly only for unauthenticated A2A operation serving. | true | boolean | |
The agent version (overrides agent card). | String | ||
Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the likes, will now be processed as a message and handled by the routing Error Handler. Important: This is only possible if the 3rd party component allows Camel to be alerted if an exception was thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not possible. In other situations we may improve the Camel component to hook into the 3rd party component and make this possible for future releases. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or ERROR level and ignored. | false | boolean | |
To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this option is not in use. By default the consumer will deal with exceptions, that will be logged at WARN or ERROR level and ignored. | ExceptionHandler | ||
Sets the exchange pattern when the consumer creates an exchange. Enum values:
| ExchangePattern | ||
The Camel HTTP component to use for serving incoming A2A requests (consumer side). Must implement RestConsumerFactory (e.g., platform-http, jetty, netty-http, undertow, servlet). When not set, the component is auto-discovered from the classpath or falls back to the global camel.rest.component setting. | String | ||
Maximum number of tasks the agent can process concurrently. When the limit is reached, new requests are rejected with ServerBusyError (HTTP 429). Set to 0 (default) for unlimited concurrency. | 0 | int | |
Interval in milliseconds for SSE keep-alive heartbeat comments. Sent as ':' comment lines to prevent proxies from closing idle connections. Independent from asyncTimeout which controls task processing timeout. | 15000 | long | |
Maximum number of SSE events that can be buffered per streaming connection. When the queue is full, new events are dropped with a warning log. Prevents unbounded memory growth from slow clients. | 1000 | int | |
Maximum number of tasks that can wait in the pending queue when all concurrent slots are occupied. Only applies to async requests (returnImmediately=true). Queued tasks receive SUBMITTED status and are processed as capacity becomes available. Set to 0 (default) for no queueing requests are rejected immediately when at capacity. | 0 | int | |
The A2A operation to perform. Enum values:
| MESSAGE_SEND | A2AOperations | |
Connect timeout in milliseconds for the HTTP client used by the producer. | 30000 | long | |
Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel’s routing error handlers. Beware that when the first message is processed then creating and starting the producer may take a little time and prolong the total processing time of the processing. | false | boolean | |
Read timeout in milliseconds for the producer’s SSE streaming connection. If no SSE event arrives within this period, the stream is closed with an error. Prevents indefinite blocking when a remote agent stops sending events. | 300000 | long | |
Timeout in milliseconds for asynchronous task operations. | 300000 | long | |
Time-to-live in milliseconds for completed tasks before cleanup. | 3600000 | long | |
Whether the HTTP client should follow redirects. Disabled by default to prevent credential leakage on cross-origin redirects. Enable only when the remote agent is known to issue redirects (e.g., behind a load balancer). | false | boolean | |
Maximum payload size in bytes (default 6MB). | 6291456 | long | |
Maximum number of retry attempts for push notification webhook delivery. | 3 | int | |
Initial backoff in milliseconds for push notification retry. Retries use exponential backoff with this delay multiplied by 2 to the attempt number. | 1000 | long | |
Whether to allow webhook URLs pointing to localhost/loopback addresses. When false (default), push notification webhook URLs targeting 127.0.0.0/8, ::1, or localhost are rejected as SSRF protection. Enable for local development only. | false | boolean | |
API key for authentication. | String | ||
HTTP header name for API key authentication (e.g., X-API-Key, Authorization). | Authorization | String | |
Bearer token for authentication. | String | ||
OAuth profile name for obtaining an access token via the OAuth 2.0 Client Credentials grant. When set, the token is acquired from the configured identity provider and used for authentication. Requires camel-oauth on the classpath. The profile properties are resolved from camel.oauth.profile-name.client-id, camel.oauth.profile-name.client-secret, and camel.oauth.profile-name.token-endpoint. | String |
Message Headers
The A2A component supports 19 message header(s), which is/are listed below:
| Name | Description | Default | Type |
|---|---|---|---|
| Constant: | A2A operation to invoke. | String | |
| Constant: | Task ID. | String | |
| Constant: | Push notification config ID. | String | |
| Constant: | Context ID for multi-turn conversations. | String | |
| Constant: | Message ID. | String | |
| Constant: | Task state. | String | |
| Constant: | A2A method name invoked. | String | |
| Constant: | Response type: task or message. | String | |
CamelA2AReturnImmediately (common) Constant: | Return immediately flag. | Boolean | |
CamelA2AHistoryLength (common) Constant: | Max history messages. | Integer | |
CamelA2AStreamEmitter (consumer) Constant: | SSE stream emitter for route processors. | A2AStreamEmitter | |
CamelA2AListContextId (common) Constant: | Context ID filter for task listing. | String | |
| Constant: | Page size for task listing. | Integer | |
CamelA2AListPageToken (common) Constant: | Page token for task listing pagination. | String | |
CamelA2AListIncludeArtifacts (common) Constant: | Whether to include artifacts in task listing. | Boolean | |
CamelA2AListHistoryLength (common) Constant: | History length for task listing. | Integer | |
CamelA2AListStatusTimestampAfter (common) Constant: | Filter tasks by status timestamp after this value. | String | |
| Constant: | Comma-separated status filter for task listing. | String | |
| Constant: | Negotiated A2A extension URIs requested by the client. | List |
Sub-Pages
For more details on consumer and producer usage, see:
-
Consumer Guide - Exposing an A2A agent with authentication, SSE streaming, async tasks, push notifications, and capacity limiting
-
Producer Guide - Calling remote agents with streaming, async task lifecycle, push notifications, and parallel multicast
Simple Language Functions
The component registers custom Simple language functions under the a2a: namespace:
| Function | Description |
|---|---|
| Emit a status update with |
| Emit a status update with an explicit |
| Extract |
| Extract |
| Extract |
| Extract |
| Extract |
| Extract |
| Full agent card as JSON string. Resolves the card from the A2A endpoint (consumer’s own card, or the cached remote card on the producer). |
| Agent card name. |
| Agent card description. |
| Agent card URL. |
| Agent card version. |
| Skills formatted as human-readable text, one per line: |
| Skills as a JSON array string. |
| Agent card icon URL. |
| Agent card documentation URL. |
| Agent provider as JSON string. |
| Agent capabilities as JSON string. |
| Supported interfaces as JSON array string. |
| Security schemes as JSON object string. |
| A2A v1.0 security requirements as JSON array string. |
| Legacy draft |
The ${a2a:card} functions resolve the agent card from the exchange context. On a consumer route, exchange.getFromEndpoint() provides the agent’s own card. On a producer route, the component scans registered endpoints for a cached remote card. Returns an empty string if no card is available.
The card functions support flat field access only — nested property access like ${a2a:card.skills[0].name} or ${a2a:card.provider.organization} is not supported. For structured data, use ${a2a:card.skills.json} or ${a2a:card} (full JSON) and parse downstream. |
Example — including remote agent skills in an LLM prompt:
- setBody:
simple: |
Generate a plan using these available skills:
${a2a:card.skills} For the full text of all parts combined, use the TypeConverter:
- convertBodyTo:
type: String Exchange Headers
| Header | Type | Description |
|---|---|---|
|
| A2A operation to invoke. Accepts both enum names ( |
|
| Task ID for |
|
| Push notification config ID for get/delete operations. |
|
| Context ID for multi-turn conversations. Set automatically on consumer inbound and producer response. |
|
| Message ID from the request/response. |
|
| Task state from the response (e.g., |
|
| A2A method name invoked (set on producer response). |
|
| Response type after a producer call ( |
|
| Override |
|
| Producer request field for |
|
| Authenticated user profile (set as exchange property, not a header). Populated when |
|
| Context ID filter for |
|
| Page size for |
|
| Pagination token for |
|
| Comma-separated status filter for |
|
| Whether |
|
| Maximum history messages to include per task in |
|
| Status timestamp filter for |
|
| Consumer-side negotiated A2A extension URIs from the |
|
| Consumer-side: the stream emitter injected for streaming routes. Available for advanced use cases — prefer |
CamelA2AResponseTask and CamelA2AUserProfile are exchange properties, not headers. Access them via $\{exchangeProperty.CamelA2AResponseTask} and $\{exchangeProperty.CamelA2AUserProfile} in Simple expressions. CamelA2AResponseTask contains the full Task object from the producer response, useful in polling workflows. CamelA2AUserProfile contains the authenticated user’s profile map, available when validateAuth=true. |
Supported Operations
| Operation (enum) | Method Name | Producer | Consumer |
|---|---|---|---|
|
| Send message, receive Task or Message | Route processes message |
|
| Lazy | Route emits via |
|
| Retrieve task from remote | Read from task store |
|
| List tasks from remote | Query task store |
|
| Cancel remote task | Update store + cancel in-flight async |
|
| Lazy | Event-to-Stream Bridge (real-time SSE) for REST and JSON-RPC bindings |
|
| Register webhook | Store config + SSRF validation |
|
| Retrieve config | Read from store |
|
| List configs | Read from store |
|
| Delete config | Remove from store |
The CamelA2AOperation header accepts both the enum name (left column) and the PascalCase method name (second column).
The built-in JSON-RPC consumer dispatches SendMessage, SendStreamingMessage, GetTask, ListTasks, CancelTask, SubscribeToTask, and the push notification config operations.
Pluggable Authentication
Authentication uses a strategy-per-scheme pattern via the A2ASecuritySchemeHandler SPI. One handler covers both producer (apply credentials) and consumer (validate credentials) for a given security scheme type.
Default handlers:
| Scheme Type | Handler | Description |
|---|---|---|
|
| OAuth profile or static bearer token |
|
| API key in |
|
| Token via |
|
| Same as OAuth2, stores OIDC discovery URL |
Override or extend by registering a custom handler bean:
@BindToRegistry("myCustomAuth")
public class MutualTlsHandler implements A2ASecuritySchemeHandler {
public String schemeType() { return "mutualTls"; }
public void applyCredentials(Exchange exchange, SecurityScheme scheme,
A2AConfiguration config, CamelContext context) {
// producer: configure mTLS
}
public A2AUserProfile validateCredentials(Exchange exchange,
SecurityScheme scheme, A2AConfiguration config) {
// consumer: extract client certificate
return A2AUserProfile.fromMap(Map.of(
"scheme", "mutualTls",
"subject", "CN=client"));
}
} Security Scheme Priority
When the agent card declares multiple security schemes, selection is based on configuration hints:
-
oauthProfileconfigured → OAuth2 / OpenID Connect schemes tried first -
bearerTokenconfigured → HTTP bearer schemes tried first -
apiKeyconfigured → API key schemes tried first -
No hint → schemes tried in agent card declaration order
On the producer, the first matching handler applies credentials. On the consumer, all declared schemes are tried until one succeeds (or all fail with 401).
Task State Machine
A2A tasks follow this state machine:
+--> COMPLETED
|
SUBMITTED --> WORKING +--> FAILED
|
+--> CANCELED
|
+--> INPUT_REQUIRED --> WORKING (resumed)
|
+--> AUTH_REQUIRED --> WORKING (after re-auth)
|
+--> REJECTED All valid task states (wire values use the A2A v1.0 proto names shown below; the $\{a2a:emit()} function uses the short Java enum names — e.g., INPUT_REQUIRED, not TASK_STATE_INPUT_REQUIRED):
| State | Description |
|---|---|
| Unknown or missing task state fallback |
| Task accepted, not yet processing |
| Task is actively being processed |
| Task completed successfully (terminal) |
| Task failed due to error or timeout (terminal) |
| Task was canceled by the client (terminal) |
| Agent needs additional input from the client before proceeding |
| Agent needs the client to re-authenticate before proceeding |
| Agent rejected the task (terminal) |
The consumer manages transitions automatically:
-
SUBMITTED— whenreturnImmediately=trueand the task is accepted -
WORKING— when the route starts processing (async tasks) -
COMPLETED— whensetBodyproduces a non-null response -
FAILED— when the route throws an exception orasyncTimeoutexpires
Routes can emit any state explicitly via ${a2a:emit(INPUT_REQUIRED, 'Please provide your address')} or A2AProgress.emit(exchange, TaskState.AUTH_REQUIRED, "Re-authentication needed").
Unified Body-as-Response
Both streaming and async agents use the same route pattern — setBody is always the final response:
steps:
- script:
simple: "${a2a:emit('progress...')}" # optional status events
- setBody:
constant: "final response" # consumer handles delivery The consumer handles delivery regardless of mechanism:
-
Synchronous: returned directly in the HTTP response
-
Streaming: emitted as an SSE message event
-
Async + polling: stored in the task’s history and status message, returned via
GetTask -
Push notifications: included in the
COMPLETEDstatus webhook payload
Agent Card Resolution
Card fields are resolved with layered precedence (lowest to highest):
-
Agent card JSON file — loaded from the URI source (base)
-
Bean reference —
agentCard=#myBeanfills/overrides fields from a programmatic object -
URI parameters —
name,description,versionoverride everything
Bean reference example — useful when the card needs programmatic construction (e.g., dynamic skills):
- route:
from:
uri: a2a:classpath:agent-card.json
parameters:
agentCard: "#myCardBean" URI parameter overrides — customize base cards per environment via properties:
- route:
from:
uri: a2a:classpath:agent-card.json
parameters:
name: "{{agent.name}}"
version: "{{agent.version}}" Security schemes from the card drive auth handler selection. Config parameters (oauthProfile, bearerToken, apiKey) provide the runtime credentials and influence scheme priority.
The resolver currently merges these card fields from file and bean cards: name, description, url, version, provider, capabilities, skills, supportedInterfaces, securitySchemes, securityRequirements, iconUrl, documentationUrl, defaultInputModes, defaultOutputModes, supportsAuthenticatedExtendedCard, and unknown extension properties. Legacy input cards using security are converted to securityRequirements. URI parameters can override only name, description, and version.
| The card is loaded once at endpoint startup and cached. Periodic card refresh is not yet implemented. |
HTTP Server Component Discovery
The consumer needs an HTTP server to register A2A endpoints. The discovery order is:
-
Explicit
httpServerComponentparameter (e.g.,undertow,jetty) -
Global
camel.rest.component/ REST DSL component configuration -
Already registered
platform-httpcomponent -
Exactly one already registered Camel component implementing
RestConsumerFactory -
Exactly one registry bean implementing
RestConsumerFactory
The preview component does not auto-create arbitrary HTTP server components and does not choose between multiple discovered server factories. Add and register one of the tested server components, or set httpServerComponent explicitly.
Tested behavior in this Preview release:
-
camel-platform-http/ Vert.x - suitable for JSON-RPC agents (including SSE streaming) and serving the public agent card. REST custom-method paths containing colons can collide. -
camel-undertowandcamel-jetty- suitable for REST custom-method paths and real-time SSE streaming.
Data Format
The dataFormat parameter controls what the exchange body contains, following the same convention as the CXF component. It applies to both consumer (inbound request) and producer (response) sides.
| Value | Default | Description |
|---|---|---|
| Yes | Extracts text content from message parts as a |
| No | Full Java model objects. On the consumer, the body is the |
| No | Raw JSON string with no deserialization. On the consumer, the body is the JSON representation of the incoming |
Example — consumer in POJO mode for multimodal processing:
- route:
from:
uri: a2a:classpath:agent-card.json?dataFormat=POJO
steps:
- log:
message: "Received ${body.parts().size()} parts"
- setBody:
simple: "Processed ${body.parts()[0]}" Example — producer in RAW mode for proxying:
- route:
from:
uri: direct:proxy
steps:
- to: a2a:http://remote-agent:8080?dataFormat=RAW
- log:
message: "Raw JSON: ${body}" Task Store
The default InMemoryTaskStore manages task state with lazy cleanup. It is thread-safe, using concurrent maps for storage and lock-protected eviction for task-associated data such as message-id mappings, subscribers, and push configs.
The completedTaskTtl URI parameter (default 3,600,000 ms / 1 hour) controls the TTL for terminal tasks. Expired tasks are evicted on read or during periodic cleanup.
The following settings are configurable programmatically on the InMemoryTaskStore bean, not via URI parameters:
| Property | Default | Description |
|---|---|---|
|
| Maximum tasks in the store. When exceeded, the oldest terminal task is evicted; if no terminal task exists, no task is evicted. Set to 0 for unlimited. |
|
| Number of |
|
| TTL for non-terminal stuck tasks ( |
To customize, register a bean implementing A2ATaskStore in the Camel registry. The preview SPI is also split into narrower parent contracts (A2ATaskRepository, A2ATaskSubscriptions, A2APushConfigStore, and A2ATaskCleanup) so custom stores can keep storage, subscription, push-config, and cleanup responsibilities separate. Registry-provided stores are wrapped by a guard that enforces terminal-state protection, delegates subscriber registration and notification to the custom store, tracks endpoint subscribers for terminal-event cleanup, validates push webhook URLs, and normalizes push config IDs/task IDs on the endpoint path. Custom stores still need to preserve durable storage and any cross-node notification semantics inside their own implementation; the dispatcher revalidates webhook URLs before delivery.
Custom subscribers can be registered on a task-store bean for audit logging, metrics, or custom delivery:
@BindToRegistry
public A2ATaskStore taskStore() {
MyAuditingTaskStore store = new MyAuditingTaskStore();
store.addGlobalSubscriber((taskId, event) -> auditLog.record(taskId, event));
return store;
} Model Classes
The component uses Java model classes aligned with A2A v1.0:
| Class | Description |
|---|---|
| Task with |
| Agent or user message with |
| Operation request wrapper with |
| Send-message runtime options with |
| Response wrapper containing exactly one of |
| List-tasks request with |
| List-tasks response with |
| SSE event wrapper containing exactly one of |
| Text content part implementing |
| Structured data part implementing |
| File content with |
| Status snapshot with |
| Named output with |
| Push notification webhook config with |
| Push notification config list response with |
Core immutable model types such as Task, Message, Artifact, and AgentCard provide builders, for example: Task.builder().id("t1").contextId("ctx-1").status(new TaskStatus(TaskState.WORKING)).build(). Mutable request/configuration classes use standard getters and setters.
Preview API and SPI Boundaries
The stable user-facing surface for this Preview release is the endpoint URI/options, exchange headers, documented model classes, type converters, and these registry SPIs: A2ATaskStore, A2AExtensionHandler, and A2ASecuritySchemeHandler.
The protocol and operation implementation classes under org.apache.camel.component.a2a.protocol and org.apache.camel.component.a2a.operation are public so the component can share implementation code across packages and tests, but they are not extension SPIs. A2AProtocol is sealed deliberately to the built-in REST and JSON-RPC bindings; select a binding with protocolBinding rather than implementing a custom protocol class.
The JSON mapper helper returns configured mapper copies. Customizing the returned ObjectMapper does not change component-wide serialization behavior.
Dependencies
The component has zero compile-time coupling to any HTTP library. Transport is discovered at runtime:
| Role | SPI | Examples |
|---|---|---|
Consumer HTTP server |
|
|
Producer HTTP client | Built-in | No additional dependency |
OAuth tokens |
|
|
Task state |
| Built-in |
Add the HTTP server component you want as a runtime dependency. Consumer routes require one of these dependencies; producer-only routes do not.
<!-- Consumer: JSON-RPC or non-streaming HTTP endpoint serving -->
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-platform-http-vertx</artifactId>
<version>x.x.x</version>
<!-- use the same version as your Camel core version -->
</dependency>
<!-- Consumer: REST custom-method routes and real-time SSE streaming -->
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-undertow</artifactId>
<version>x.x.x</version>
<!-- use the same version as your Camel core version -->
</dependency>
<!-- Alternative consumer transport for REST custom-method routes and real-time SSE streaming -->
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-jetty</artifactId>
<version>x.x.x</version>
<!-- use the same version as your Camel core version -->
</dependency>
<!-- Optional: OAuth authentication -->
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-oauth</artifactId>
<version>x.x.x</version>
<!-- use the same version as your Camel core version -->
</dependency>