NeoGraph 0.16.0
A C++20 Graph Agent Engine Library — LangGraph for C++
Loading...
Searching...
No Matches
a2a_caller_node.h
Go to the documentation of this file.
1
15#pragma once
16
17#include <neograph/api.h>
18#include <neograph/a2a/client.h>
19#include <neograph/graph/node.h>
20
21#include <functional>
22#include <memory>
23#include <string>
24
25namespace neograph::a2a {
26
38class NEOGRAPH_API A2ACallerNode : public neograph::graph::GraphNode {
39 public:
42 using MessageIdFactory = std::function<std::string()>;
43
44 A2ACallerNode(std::string name,
45 std::shared_ptr<A2AClient> client,
46 std::string input_key = "prompt",
47 std::string output_key = "response",
48 MessageIdFactory message_id_factory = {});
49
57 asio::awaitable<neograph::graph::NodeOutput>
59
60 std::string get_name() const override { return name_; }
61
62 private:
63 std::string name_;
64 std::shared_ptr<A2AClient> client_;
65 std::string input_key_;
66 std::string output_key_;
67 MessageIdFactory message_id_factory_;
68};
69
70} // namespace neograph::a2a
A2A (Agent-to-Agent) JSON-RPC client over Streamable HTTP.
NEOGRAPH_API export/import macro for shared-library builds.
Node that forwards an input string to a remote A2A agent.
asio::awaitable< neograph::graph::NodeOutput > run(neograph::graph::NodeInput in) override
v0.4 PR 9a: unified run — reads input_key from state, forwards to the remote A2A agent,...
std::function< std::string()> MessageIdFactory
Returns one message ID per outbound A2A call.
std::string get_name() const override
Get the node's unique name within the graph.
Abstract base class for all graph nodes.
Definition node.h:96
Graph node implementations: base class and built-in node types.
Per-call input bundle for the unified run() virtual.
Definition node.h:56