Documentation
¶
Overview ¶
Example: multi_round_tools demonstrates an agent performing MULTIPLE sequential tool-calling rounds, where the result of tool A feeds the arguments of tool B.
A small deterministic mock model.Provider drives the loop, so the example runs with NO API keys and NO network access. The mock decides its next action purely from the most recent message:
round 0: user asks a question -> call resolve_customer(name) round 1: resolve_customer returned an id -> call fetch_orders(customer_id) (A feeds B) round 2: fetch_orders returned orders -> emit the final natural-language answer
Chronos' agent loop (Agent.Chat) runs the tools, feeds each result back to the model, and repeats until the model stops requesting tools.
go run ./examples/multi_round_tools/
Click to show internal directories.
Click to hide internal directories.