Actions12
- Transfer Actions
- Account Actions
- Agent Actions
Overview
This node enables communication with an A2A (Account to Account) agent endpoint using JSON-RPC protocol. Specifically, the Agent - Custom Request operation allows users to send arbitrary JSON-RPC method calls with custom parameters to a specified Agent URL. This flexibility is useful when interacting with advanced or less common features of the Agent API that are not covered by predefined operations.
Common scenarios include:
- Sending custom commands or queries to an Agent service.
- Integrating with specialized workflows requiring direct JSON-RPC calls.
- Testing or debugging Agent API methods by crafting specific requests.
For example, you might call a method like "tasks/send" with a complex message payload to initiate a task or query the status of an ongoing process.
Properties
| Name | Meaning |
|---|---|
| Agent URL | The base URL of the A2A agent endpoint where the JSON-RPC request will be sent. Example: https://agent-api.example.com |
| JSON-RPC Method | The name of the JSON-RPC method to invoke on the Agent endpoint. For example, "tasks/send" or any other valid method supported by the Agent API. |
| Request Parameters | A JSON object containing the parameters for the JSON-RPC request. This should be a valid JSON string representing the method's input parameters. |
| Request ID | Optional identifier for the JSON-RPC call. If omitted, the node generates a unique ID automatically. Useful for tracking or correlating requests and responses. |
| Additional Options | Collection of optional settings including: • API Key: API key for authentication, sent as x-api-key header.• Custom Headers: Additional HTTP headers. • Include Metadata: Whether to include extra metadata in response. • Max Retries: Number of retry attempts for failed requests. • Message Role: Role of the message sender ( user, assistant, system, model).• Response Format: How to format the response ( auto, full, message, status).• Retry Delay: Delay between retries in milliseconds. • Timeout: Request timeout in milliseconds. • Validate SSL: Whether to validate SSL certificates. |
Output
The node outputs the JSON-RPC response from the Agent endpoint in the json field of the output data. The structure depends on the chosen response format:
- Auto (default): Returns the full response but may extract message content or status depending on context.
- Full Response: Returns the complete JSON-RPC response object exactly as received.
- Message Only: Extracts and returns only the textual message content from the response.
- Status Only: Returns only the task status information such as state and timestamp.
No binary data output is produced by this operation.
Dependencies
- Requires access to the target Agent API endpoint specified by the Agent URL.
- If authentication is needed, an API key can be provided via the Additional Options; it will be sent as an
x-api-keyHTTP header. - The node uses standard HTTP POST requests with JSON payloads.
- Proper network connectivity and valid SSL certificates (if enabled) are required.
Troubleshooting
- Invalid JSON in Request Parameters: If the JSON string provided in "Request Parameters" is malformed, the node throws an error indicating invalid JSON. Ensure the JSON is correctly formatted.
- Authentication Errors: If the API key is missing or incorrect, the Agent endpoint may reject the request. Verify the API key and provide it in the additional options if required.
- Timeouts: Requests may time out if the Agent endpoint is slow or unreachable. Adjust the Timeout property or check network connectivity.
- SSL Validation Failures: If SSL validation is enabled and the endpoint has an invalid certificate, the request will fail. You can disable SSL validation in the options for testing purposes.
- Unexpected Response Format: If the response format does not match expectations, try switching the Response Format option to see more or less detail.
Links and References
- JSON-RPC 2.0 Specification
- Documentation for your specific Agent API endpoint (usually provided by the service owner)
- n8n HTTP Request node documentation for understanding underlying HTTP mechanics: https://docs.n8n.io/nodes/n8n-nodes-base.httpRequest/