NeoGraph 0.10.0
A C++17 Graph Agent Engine Library — LangGraph for C++
Loading...
Searching...
No Matches
types.h File Reference

Core data types for the Agent-to-Agent (A2A) protocol. More...

#include <neograph/api.h>
#include <neograph/json.h>
#include <optional>
#include <string>
#include <vector>
Include dependency graph for types.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  neograph::a2a::AgentCard
 Subset of AgentCard required to interact (spec §5.5). More...
 
struct  neograph::a2a::Artifact
 Generated output (spec §6.7). More...
 
struct  neograph::a2a::Message
 A single conversational turn (spec §6.4). More...
 
struct  neograph::a2a::MessageSendConfiguration
 Optional knobs for message/send (spec §7.2). More...
 
struct  neograph::a2a::MessageSendParams
 Params object for message/send and message/stream. More...
 
struct  neograph::a2a::Part
 One content fragment of a Message or Artifact. More...
 
struct  neograph::a2a::StreamEvent
 Tagged union over the two streaming event types + the terminal Task message. More...
 
struct  neograph::a2a::Task
 A unit of work tracked by the agent (spec §6.1). More...
 
struct  neograph::a2a::TaskStatus
 Status snapshot of a running Task (spec §6.5). More...
 
struct  neograph::a2a::TaskStatusUpdateEvent
 SSE event emitted by message/stream and tasks/resubscribe while a Task is running. More...
 

Enumerations

enum class  neograph::a2a::Role
 Message role (spec §6.4).
 
enum class  neograph::a2a::TaskState
 TaskState — exact strings from spec §6.3 (kebab-case).
 

Functions

NEOGRAPH_API StreamEvent neograph::a2a::parse_stream_event (const json &j)
 Parse a single SSE data: {...} JSON object into the right variant.
 

Detailed Description

Core data types for the Agent-to-Agent (A2A) protocol.

Mirrors the canonical proto / JSON schema at https://github.com/a2aproject/A2A (specification/a2a.proto).

Only the surface needed by the client is modelled here. The wire format is JSON; structs round-trip through nlohmann::json via to_json/from_json ADL hooks defined in src/a2a/types.cpp.

Definition in file types.h.

Function Documentation

◆ parse_stream_event()

NEOGRAPH_API StreamEvent neograph::a2a::parse_stream_event ( const json &  j)

Parse a single SSE data: {...} JSON object into the right variant.

Discriminator priority: kind="status-update" | "artifact-update" | "task". Anything else falls back to Task.

References neograph::a2a::parse_stream_event().

Referenced by neograph::a2a::parse_stream_event().