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

ACP server — exposes a NeoGraph as an Agent Client Protocol agent. More...

#include <neograph/api.h>
#include <neograph/acp/types.h>
#include <neograph/graph/engine.h>
#include <chrono>
#include <iosfwd>
#include <memory>
#include <optional>
#include <string>
#include <string_view>
Include dependency graph for server.h:

Go to the source code of this file.

Classes

class  neograph::acp::ACPClient
 Agent-side handle for issuing requests back to the editor. More...
 
class  neograph::acp::ACPGraphAdapter
 Map between ACP ContentBlock[] and the engine's channels. More...
 
class  neograph::acp::ACPServer
 HTTP-less, stdio-first ACP server hosting a NeoGraph engine. More...
 

Detailed Description

ACP server — exposes a NeoGraph as an Agent Client Protocol agent.

Speaks JSON-RPC 2.0 over a transport. The default transport is newline-delimited JSON over stdio (one message per line on stdin, one per line on stdout) — the form used by Zed's agent-client-protocol Rust crate and by every editor that launches an agent as a sub-process.

Methods served (client → agent):

  • initialize
  • session/new
  • session/prompt
  • session/cancel (notification — no response)

Methods emitted (agent → client):

  • session/update (streaming notification while a prompt is in flight)

Deferred (return JSON-RPC -32601 Method not found until added): authenticate, session/load, session/resume, session/list, session/close, session/set_config_option, session/set_mode.

Adapter pattern mirrors neograph::a2a — by default the inbound prompt text is dropped into the prompt channel and the response channel is sent back. Subclass ACPGraphAdapter to plug in a richer mapping (multi-modal blocks, system prompts, conversation history).

Definition in file server.h.