Class AgentRunner
java.lang.Object
net.thevpc.naru.agent.AgentRunner
The core agent loop.
- Adds a system prompt + user task to the conversation history.
- Calls the model.
- If the model returns
tool_calls: dispatches each call viaToolRegistry, appends the results, and loops. - If the model returns plain text: that is the final answer.
- Stops after
maxStepsiterations regardless.
This class is pure Java — no Nuts dependency — so it can be extracted into a standalone library later.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidrun(String task, AgentContext context) Run the agent with the given user task.
-
Constructor Details
-
AgentRunner
-
-
Method Details
-
logger
-
run
Run the agent with the given user task.
-