CAMEL-23063: Add camel-a2a component for Agent-to-Agent (A2A) protoco…#23711
CAMEL-23063: Add camel-a2a component for Agent-to-Agent (A2A) protoco…#23711luigidemasi wants to merge 6 commits into
Conversation
|
🌟 Thank you for your contribution to the Apache Camel project! 🌟 🐫 Apache Camel Committers, please review the following items:
|
davsclaus
left a comment
There was a problem hiding this comment.
Thank you for this substantial contribution — the A2A component is well-structured, follows Camel conventions, and has impressive test coverage. I have one blocking security finding and a few additional items.
Positive observations
- Good security defaults:
followRedirects=false, agent card loader blocks redirects,WebhookUrlValidatorhas SSRF protection with private IP/IPv6 checks - Comprehensive test coverage across operations, protocols, streaming, auth, and push notifications
- Proper
MojoHelperregistration,SimpleFunctionDispatcherintegration,secret = trueannotations on sensitive params - No new external dependencies beyond Jackson (already managed by parent BOM)
General (non-inline) findings
- Missing upgrade guide entry — per project conventions, new user-visible features should be documented in
docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_21.adoc - Dead code — the private method
executeStreamProcessinginA2AConsumer(line ~1077) appears unused and should be removed - CI — one CI check ("build") is currently failing; the three matrix builds pass, so this may be infrastructure, but worth confirming
Note: This review evaluates the PR against Apache Camel's project rules and conventions. It does not replace specialized review tools (CodeRabbit, Sourcery) or static analysis (SonarCloud).
This review was generated by an AI agent and may contain inaccuracies. Please verify all suggestions before applying.
orpiske
left a comment
There was a problem hiding this comment.
LGTM ... one minor thing about an unused method, but other than that looks fine.
Thanks @luigidemasi !
5654a96 to
22e7873
Compare
The curly brace path parameters ({taskId}, {configId}, {id}, {param}) were being interpreted as AsciiDoc attribute references by Antora, causing 15 build warnings. Escaped with backslash prefix.
- Fix header filter to strip all Camel* headers (security, CVE-2025-27636 vector) - Use Camel ExecutorServiceManager for PushNotificationDispatcher threads - Fix openIdConnect preference logic in auth scheme sorting - Move filterInboundHeaders before header reads in handleListTasks - Remove unused executeStreamProcessing method - Change component label from "ai,a2a" to "ai,agent" - Add upgrade guide entry for 4.21
…nd producer Following the CXF DataFormat convention, the dataFormat parameter now controls the exchange body format on both sides. PAYLOAD (default) extracts text, POJO delivers full Java model objects, RAW passes JSON strings. Renamed the old MESSAGE value to RAW and changed the default from POJO to PAYLOAD for backward compatibility.
…/RAW) Adds producer-level tests verifying the full HTTP pipeline delivers the correct body type for each mode, and consumer-level tests verifying the processor receives the right body (String, Message, or JSON) based on the configured dataFormat. Includes regenerated catalog and endpoint DSL files for the dataFormat enum rename (MESSAGE → RAW, default → PAYLOAD). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
4fdc0a3 to
f6d1fcf
Compare
…access
Enables route code to read fields from the cached agent card via Simple
expressions (e.g., ${a2a:card.name}, ${a2a:card.skills}). Resolves the
card from the exchange's fromEndpoint (consumer) or by scanning context
endpoints (producer). Supports all AgentCard fields including formatted
skills text and JSON serialization.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
davsclaus
left a comment
There was a problem hiding this comment.
All findings from my previous CHANGES_REQUESTED review have been addressed:
- Security (was blocking) —
filterInboundHeadersnow strips allcamel*headers case-insensitively, matching the project's security model for consumer header filtering. - Header read ordering —
filterInboundHeadersis called before reading untrusted headers (pageSize,contextId);httpPathis extracted before the filter in other handlers. - ExecutorService —
PushNotificationDispatchernow receives the executor via injection fromgetCamelContext().getExecutorServiceManager().newScheduledThreadPool(), properly shut down indoStop(). - Upgrade guide — entry added.
- Category/labels — fixed.
This review does not replace specialized AI review tools (CodeRabbit, Sourcery) or static analysis (SonarCloud).
This review was generated by an AI agent and may contain inaccuracies. Please verify all suggestions before applying.
gnodet
left a comment
There was a problem hiding this comment.
This PR adds the camel-a2a component implementing the Agent-to-Agent protocol — a significant new feature. The diff exceeds 20,000 lines, which is beyond what can be reviewed automatically via the GitHub API diff endpoint.
The CI checks all pass (build on JDK 17, 21, and 25), and the PR description is comprehensive — covering consumer/producer support, protocol bindings, streaming, authentication, task management, and type converters.
This PR requires manual review given its size and the scope of the new component (REST + JSON-RPC 2.0 bindings, SSE streaming, OAuth/OIDC auth, in-memory task store). I'd recommend reviewers focus on:
- Security: authentication implementation and header filtering
- Protocol correctness: JSON-RPC 2.0 compliance
- Resource management: task store TTL and cleanup
Fully automatic review from Claude Code
|
LGTM @luigidemasi its a massive work so when you think its ready then go ahead and merge - we need it in 4.21 so we have both MCP and A2A |
|
Are we getting in shape for this to be included next week |
@davsclaus yes, it is almost ready and I think we are in good shape for next week. Before marking it ready, I want to finish and incorporate the OAuth authentication support for HTTP consumers from CAMEL-23685 (#23866) and CAMEL-23723 (#23926), so A2A lands with the right auth path for 4.21. |
…l integration
Adds the
camel-a2acomponent implementing the A2A (Agent-to-Agent) protocol for Apache Camel. The component provides both producer and consumer support, enabling Camelroutes to participate in standardized agent-to-agent communication.
Features
/.well-known/agent-card.jsona2aText(),a2aData(),a2aFile())A2AProgress.emit()for status updates from any routeDemo
A multi-agent demo showcasing
camel-a2ain action is available at:https://github.com/luigidemasi/camel-a2a-morning-routine