internal/impl/a2a/README.md
Redpanda Connect processor for communicating with A2A protocol agents.
a2a_messageSends messages to an A2A agent and returns the agent's response.
processors:
- a2a_message:
agent_card_url: "https://agent.example.com"
prompt: "${! content() }" # Optional, defaults to message payload
Required (OAuth2 Client Credentials):
REDPANDA_CLOUD_TOKEN_URL - OAuth2 token endpoint URLREDPANDA_CLOUD_CLIENT_ID - OAuth2 client IDREDPANDA_CLOUD_CLIENT_SECRET - OAuth2 client secretOptional:
REDPANDA_CLOUD_AUDIENCE - OAuth2 audience parameteragent_card_url (string, required) - The base URL where the agent card is hosted. The processor fetches the card from <base_url>/.well-known/agent-card.json to discover the actual agent endpoint URL.prompt (string, optional) - Interpolated string for the user prompt. Defaults to message payload.<agent_card_url>/.well-known/agent-card.json (authenticated with OAuth2)message/send request to the A2A agent (with OAuth2 authentication from env vars)tasks/get every 2 secondsNote on Authentication: The processor uses hardcoded OAuth2 client credentials from environment variables. The agent card's securitySchemes field is currently ignored.
a2a_task_id - The task ID from the A2A agenta2a_context_id - The context ID for the conversationa2a_status - The final task status (completed, failed, etc.)input:
generate:
mapping: 'root = "Create a task that gets weather of San Francisco. Output a succinct report."'
interval: 600s
count: 1
pipeline:
processors:
- a2a_message:
agent_card_url: "${AGENT_CARD_URL}"
prompt: "${! content() }"
final_message_only: true
output:
processors:
- log:
level: INFO
message: "A2A Response: ${! content() }"
drop: {}
logger:
level: INFO
format: logfmt
Authentication uses OAuth2 Client Credentials Grant flow, following the same pattern as other Redpanda Cloud components:
message/send - Send a message (blocking)tasks/get - Poll for task completionmessage/stream - Streaming not yet implementedtasks/resubscribe - Reconnection not yet implementedauth.go - OAuth2 client credentials helpertransport_http.go - HTTP/JSON-RPC 2.0 transport implementationprocessor_message.go - Main processor implementationprocessor_message_test.go - Integration testsgithub.com/a2aproject/a2a-go - Official A2A protocol librarygolang.org/x/oauth2 - OAuth2 client implementation