12#include <agents-cpp/agent.h>
13#include <agents-cpp/agent_context.h>
14#include <agents-cpp/coroutine_utils.h>
97 std::vector<Message> conversation_;
102 int run_interval_ms_ = 100;
107 std::promise<String> feedback_promise_;
112 std::mutex queue_mutex_;
117 std::condition_variable queue_cv_;
122 std::queue<String> inbound_tasks_;
127 std::atomic<bool> stop_flag_{
false};
132 std::thread worker_thread_;
146 virtual void onResponse(
const String& response);
152 virtual void onError(
const String& error);
168 virtual String createAgentPrompt()
const;
ActorAgent(std::shared_ptr< AgentContext > context)
Constructor with agent context.
ActorAgent(std::shared_ptr< AgentContext > context)
Constructor with agent context.
void stop() override
Stop the agent.
Task< JsonObject > run(const String &task) override
Run the agent with a task using coroutines.
void provideFeedback(const String &feedback) override
Provide human feedback.
Task< String > waitForFeedback(const String &message, const JsonObject &context) override
Wait for feedback using coroutines.
void setSystemPrompt(const String &system_prompt)
Set the system prompt for the agent.
virtual ~ActorAgent()
Destructor.
void init() override
Initialize the agent.
String getSystemPrompt() const
Get the current system prompt.
Agent(std::shared_ptr< AgentContext > context)
Constructor.
Provide a future-based fallback for Task.
Definition coroutine_utils.h:115
Framework Namespace.
Definition agent.h:18
nlohmann::json JsonObject
JSON object type.
Definition types.h:39
std::string String
String type.
Definition types.h:27