Areev
Areev / Developers

Connect another agent with A2A

Discover an Areev agent, hand it a task and follow the task through its supported interface.

1. Read the agent card

You need an active deployment with this interface enabled, its deployment ID and its assigned gateway URL. Ask your Areev setup contact for these values. The Store URL and the control API URL are not your deployment’s gateway. A product SKU is not a deployment ID.

Read the authenticated agent card for the deployment. It describes the exposed agent and skills. The A2A JSON-RPC endpoint is {gateway}/a2a/{deployment_id}; the agent card is beneath that address.

curl --fail-with-body \
  "$AREEV_GATEWAY/a2a/$DEPLOYMENT_ID/.well-known/agent-card.json" \
  -H "Authorization: Bearer $AREEV_API_KEY"

2. Send a task

POST message/send to the A2A endpoint. Use a data part containing the product’s exact contract input; the empty data object below is an envelope example, not a valid input for every product. File parts reference files already uploaded for the deployment. An optional contextId groups related work.

Keep the task ID from the response. Treat submission as the start of work and check the task before taking a business action. Repeated message/send calls are not guaranteed to deduplicate: this path does not forward a caller’s job idempotency key.

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "message/send",
  "params": {
    "message": {
      "role": "user",
      "parts": [{ "kind": "data", "data": {} }]
    }
  }
}

3. Poll for progress

Use tasks/get with the returned task ID. tasks/cancel is also implemented; whether cancellation succeeds depends on the job’s state.

Use polling for ongoing updates. message/stream currently returns a task response, not a continuous event stream; the subscribe endpoint sends one event and closes. Push-notification configuration methods are not implemented.

curl --fail-with-body "$AREEV_GATEWAY/a2a/$DEPLOYMENT_ID" \
  -H "Authorization: Bearer $AREEV_API_KEY" \
  -H "Content-Type: application/json" \
  --data '{"jsonrpc":"2.0","id":2,"method":"tasks/get","params":{"id":"JOB_ID"}}'