Documentation
¶
Overview ¶
Example agentloop: the shape of a tool-using agent, built from generic parts — packtrail knows nothing about LLMs.
A planner task decides what to do next and routes there itself with a dynamic edge (worker.Result.Next, LangGraph's Command(goto)); the possible targets are declared in the flow. Tools append to a `messages` channel and loop back to the planner. max_steps is the recursion limit, and the `calls` budget caps how many tool calls the loop may make. Here the planner is a few lines of rules; in a real agent it would call a model.
go run ./examples/agentloop
Click to show internal directories.
Click to hide internal directories.