17#include <unordered_map>
20namespace neograph::llm {
46 Agent(std::shared_ptr<Provider> provider,
47 std::vector<std::unique_ptr<Tool>> tools,
48 const std::string& instructions =
"",
49 const std::string& model =
"");
74 int max_iterations = 10);
88 int max_iterations = 10);
99 std::vector<std::unique_ptr<
Tool>> tools_;
104 std::unordered_map<std::
string,
Tool*> tools_by_name_;
105 std::
string instructions_;
108 void ensure_system_message(std::vector<
ChatMessage>& messages);
109 std::vector<
ChatTool> get_tool_definitions() const;
NEOGRAPH_API export/import macro for shared-library builds.
Abstract base class for LLM providers.
Standalone ReAct agent that loops between LLM calls and tool execution.
Agent(std::shared_ptr< Provider > provider, std::vector< std::unique_ptr< Tool > > tools, const std::string &instructions="", const std::string &model="")
Construct an agent with a provider and tools.
Abstract LLM provider interface.
std::function< void(const std::string &chunk)> StreamCallback
Callback invoked per token during streaming completion.
LLM completion response including the message and token usage.
A message in the conversation history.