a2
Protocolo A2A (Agente-para-Agente)
O protocolo A2A permite que a Zoen chame agentes de IA externos que expõem um endpoint compatível com A2A. Use-o para conectar suas fluxos de trabalho a agentes remotos — bots com LLM, microserviços e outros sistemas de IA — através de um formato de mensagem padronizado.
Com o bloco A2A você pode:
- Enviar mensagens para agentes externos: Passe prompts, dados estruturados ou arquivos para um agente remoto e obtenha sua resposta.
- Rastrear e cancelar tarefas: Verifique o status de uma tarefa em andamento ou solicite seu cancelamento.
- Descobrir capacidades: Obtenha o Agent Card do agente para inspecionar suas habilidades, capacidades e modos suportados.
Usage Instructions
Use the A2A (Agent-to-Agent) protocol to call external AI agents over the latest A2A specification.
Tools
a2a_send_message
Send a message to an external A2A agent and return its response.
Input
| Parameter | Type | Required | Description |
|---|---|---|---|
agentUrl | string | Yes | The A2A agent endpoint URL |
message | string | Yes | The message text to send |
data | string | No | Optional structured JSON data to attach (JSON string or object) |
files | array | No | Files to attach, uploaded or referenced from a previous block |
taskId | string | No | Existing task ID to continue |
contextId | string | No | Conversation context ID to continue |
apiKey | string | No | API key for authentication (if required) |
Output
| Parameter | Type | Description |
|---|---|---|
content | string | Agent response text |
taskId | string | Task identifier |
contextId | string | Conversation/context identifier |
state | string | Task lifecycle state: submitted, working, input-required, auth-required, completed, failed, canceled, or rejected |
artifacts | array | Structured task output artifacts |
a2a_get_task
Retrieve the current state and result of an A2A task.
Input
| Parameter | Type | Required | Description |
|---|---|---|---|
agentUrl | string | Yes | The A2A agent endpoint URL |
taskId | string | Yes | The task ID to retrieve |
historyLength | number | No | Maximum number of history messages to include |
apiKey | string | No | API key for authentication (if required) |
Output
| Parameter | Type | Description |
|---|---|---|
content | string | Agent response text |
taskId | string | Task identifier |
contextId | string | Conversation/context identifier |
state | string | Task lifecycle state |
artifacts | array | Structured task output artifacts |
a2a_cancel_task
Request cancellation of an in-progress A2A task.
Input
| Parameter | Type | Required | Description |
|---|---|---|---|
agentUrl | string | Yes | The A2A agent endpoint URL |
taskId | string | Yes | The task ID to cancel |
apiKey | string | No | API key for authentication (if required) |
Output
| Parameter | Type | Description |
|---|---|---|
taskId | string | Task identifier |
state | string | Task lifecycle state after cancellation |
canceled | boolean | Whether the task reached the canceled state |
a2a_get_agent_card
Fetch the Agent Card (discovery document) for an external A2A agent.
Input
| Parameter | Type | Required | Description |
|---|---|---|---|
agentUrl | string | Yes | The A2A agent endpoint URL |
apiKey | string | No | API key for authentication (if required) |
Output
| Parameter | Type | Description |
|---|---|---|
name | string | Agent display name |
description | string | Agent description |
url | string | Agent endpoint URL |
version | string | The agent's own version |
protocolVersion | string | A2A protocol version the agent exposes |
capabilities | json | Agent capability flags |
skills | array | Skills the agent can perform |
defaultInputModes | array | Default accepted input media types |
defaultOutputModes | array | Default produced output media types |
Notes
- Category:
blocks - Type:
a2a - Send Message blocks until the agent reaches a terminal (
completed,failed,canceled,rejected) or interrupted (input-required,auth-required) state. Use Get Task to poll a task you continue later, and branch onstate. - Task IDs are scoped to the external agent, not to Zoen. Anyone who knows an agent URL and task ID can read or cancel that task unless the agent enforces its own authentication — set an API key for agents that require one.