Actions12
- Transfer Actions
- Account Actions
- Agent Actions
Overview
This node enables communication with an A2A (Agent-to-Agent) protocol endpoint, allowing users to send messages and interact with agents via JSON-RPC calls. It supports sending simple text messages or fully custom JSON message structures, optionally including file attachments. The node can also subscribe to streaming responses from the agent, retrieve agent card metadata, or perform custom JSON-RPC method calls.
Common scenarios include:
- Sending conversational messages to AI agents or chatbots.
- Streaming real-time responses from an agent for live interaction.
- Uploading files alongside messages for richer context.
- Customizing requests with additional parameters, headers, and authentication.
- Retrieving agent metadata for integration or discovery purposes.
Practical example:
- A user sends a support query message to an AI agent with attached screenshots.
- A workflow subscribes to streaming events from an agent to display progressive answers.
- A developer uses custom JSON to invoke specialized agent methods beyond standard messaging.
Properties
| Name | Meaning |
|---|---|
| Agent URL | The base URL of the A2A agent endpoint to which requests are sent. |
| Message | The plain text message content to send to the agent (used when not using custom JSON). |
| Use Custom JSON | Whether to use a fully custom JSON structure for the message instead of the simple text message input. |
| Custom JSON Message | The complete custom JSON object representing the message, used if "Use Custom JSON" is enabled. |
| Session ID | Optional identifier for the conversation session; if omitted, a unique session ID is generated automatically. |
| Task ID | Optional identifier for the task/message; if omitted, a unique task ID is generated automatically. |
| Custom Parameters JSON | Additional custom parameters included in the JSON-RPC request when using custom JSON messages. |
| Include Files | Whether to include file attachments along with the message. |
| Files | Collection of files to attach, each specified by the input binary field name, optional filename, and MIME type. Files are base64 encoded before sending. |
| Accepted Output Modes | List of output modes the agent should use in its response. Options: Audio, Code, Image, Text, Video. |
| Additional Options | Collection of extra options including: API key for authentication, custom HTTP headers, whether to include metadata in the response, max retry attempts, message role (user/assistant/system/model), response format, retry delay, stream processing mode, timeout, and SSL validation. |
Output
The node outputs JSON data representing the agent's response to the sent message or request. The structure depends on the operation and response format selected:
- For standard send operations, the output includes the JSON-RPC response containing the task status and message parts.
- When streaming subscription is used, the output may be a single final event, all events collected together, or individual streaming events as separate items depending on configuration.
- If "Response Format" is set to "Message Only," only the textual message content is returned.
- If set to "Status Only," only task status information such as state and timestamp is returned.
- For custom JSON-RPC calls, the full JSON-RPC response is returned.
- Binary data (files) can be included as base64 encoded bytes within the message parts when files are attached.
Dependencies
- Requires an accessible A2A agent endpoint URL.
- May require an API key credential for authentication, sent as an
x-api-keyheader. - Supports additional custom HTTP headers for advanced authentication or routing.
- Network connectivity and proper SSL certificate validation (configurable).
- n8n environment must have access to the input binary fields if files are included.
Troubleshooting
- Invalid JSON Errors: If custom JSON message or parameters are malformed, the node throws errors indicating invalid JSON. Ensure JSON syntax correctness.
- Authentication Failures: Missing or incorrect API keys will cause authorization errors. Verify API key presence and correctness.
- Timeouts: Requests may time out if the agent endpoint is slow or unreachable. Adjust the timeout property accordingly.
- File Attachment Issues: If specified binary fields do not exist or contain invalid data, files won't be attached properly. Confirm binary input field names and data integrity.
- SSL Validation Errors: If connecting to endpoints with self-signed certificates, disable SSL validation or provide valid certificates.
- Streaming Response Handling: Misconfiguration of stream processing mode may lead to unexpected output formats. Choose the appropriate mode based on use case.
Links and References
- JSON-RPC 2.0 Specification
- Documentation or API reference of the specific A2A agent endpoint you are integrating with (not provided here).
- n8n documentation on HTTP Request Node for understanding underlying HTTP call behavior.