Agent tool call
TemplatesSequence
One turn of an agent that uses a tool: the model asks for a tool call, the agent runs it and returns the result, the model answers.
What is inside
- tool_use / tool_result
- Agent runs the tool, not the model
Use this template
Opens in the playground, no account needed. Sign up to save it.
Show the Inkline text
diagram sequence "Agent tool call" actor user "User" participant agent "Agent" participant model "LLM" participant tool "Order tool" user -> agent : "Where is order 42?" agent -> model : messages + tool definitions model --> agent : tool_use get_order(42) agent -> tool : get_order(42) tool --> agent : order JSON agent -> model : tool_result model --> agent : final answer agent --> user : "It ships tomorrow."