NeoGraph 0.16.0
A C++20 Graph Agent Engine Library — LangGraph for C++
Loading...
Searching...
No Matches
client.h File Reference

A2A (Agent-to-Agent) JSON-RPC client over Streamable HTTP. More...

#include <neograph/api.h>
#include <neograph/a2a/types.h>
#include <asio/awaitable.hpp>
#include <chrono>
#include <functional>
#include <memory>
#include <atomic>
#include <mutex>
#include <optional>
#include <stdexcept>
#include <string>
Include dependency graph for client.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  neograph::a2a::A2AClient
 A2A client — call a remote agent over JSON-RPC + HTTP. More...
 
class  neograph::a2a::A2ARpcError
 JSON-RPC error object returned by the remote agent. More...
 

Detailed Description

A2A (Agent-to-Agent) JSON-RPC client over Streamable HTTP.

Implements the JSON-RPC 2.0 binding of the A2A protocol — see https://a2a-protocol.org/latest/specification/. Methods supported:

  • send message (SendMessage / message/send)
  • streaming send (SendStreamingMessage / message/stream, SSE)
  • get task (GetTask / tasks/get)
  • cancel task (CancelTask / tasks/cancel)
  • AgentCard discovery via GET /.well-known/agent-card.json

Two wire generations are spoken (see WireDialect in types.h): the A2A 1.0 protobuf-JSON form (PascalCase methods, A2A-Version: 1.0 header, ROLE_* / TASK_STATE_* enums, flat Parts, no kind) — the primary version — and the 0.3 JSON-Schema form (slash-form methods, kind discriminators), kept for compatibility. The first call fetches the AgentCard and selects an interface from it; only when no card can be fetched does the client probe, 1.0 first.

Definition in file client.h.