← Lab

Tool calling — the agent move

The model can’t do math or look things up — it emits a tool call, the host runs the real function, and the result comes back into the context. Toggle a tool off and watch the model get stuck.

what you’re looking at

The model can’t actually do math or look anything up. So when it needs to, it asks the program to run a function for it (a “tool call”), the program runs the real function, and hands the answer back for the model to use.

why it matters

This is how every AI agent does real work — booking, searching, calculating, calling APIs. The model is the decider; the tools are the hands. Whatever tools you give it is exactly what it can and can’t do.

try this yourself
  1. 1Press Run — watch the trace: request → tool_call → tool result → answer.
  2. 2Click calculator to turn it off, Run again — the model wants it but is now stuck.
  3. 3Edit the question (e.g. “what time is it and what is retry?”) — different tools fire.
✓ saved to this browser
tools enabled
3
tool calls made
0
turns in trace
0
clock
logical
tool registry — click to enable/disable
message trace (the loop)

Run to see the request → tool_call → tool result → answer loop.

what just happened (say it out loud)

Run an operation to see it step by step.

사상: A tool call is the model saying 'run this function for me'. The model never executes anything — the host does, then feeds the result back. An agent's real power ceiling is the tool set you give it.
▶ deep-dive videos — “LLM tool calling function calling agents explained