12#include <agents-cpp/types.h>
13#include <agents-cpp/agent_context.h>
36 Workflow(std::shared_ptr<AgentContext> context);
57 std::function<
void(
const JsonObject&)> callback
89 std::shared_ptr<AgentContext> context_;
int getMaxSteps() const
Get maximum number of steps.
~Workflow()=default
Destructor.
virtual void runAsync(const String &input, std::function< void(const JsonObject &)> callback)
Run the workflow with a user input asynchronously.
std::shared_ptr< AgentContext > getContext() const
Get the workflow's context.
void setMaxSteps(int max_steps)
Set maximum number of steps.
void setStepCallback(std::function< void(const String &, const JsonObject &)> callback)
Set a callback for intermediate steps.
virtual JsonObject run(const String &input)=0
Run the workflow with a user input and return the result.
Workflow(std::shared_ptr< AgentContext > context)
Constructor.
Worflows Namespace.
Definition workflow.h:22
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