Trace an agent’s tool calls

See which tools an agent called in a run: its page lays out every model call and tool call in order and as a graph.

Before you start

You need an agent run that called a tool, such as the chat at the end of Add a tool.

See the tool calls

  1. Sign in to the CLI.
  2. Set RUN_ID to the run's ID (Find your IDs): export RUN_ID=<id>.
  3. List the run's tool-call events. You should now see TOOL_CALL_START for get-time, TOOL_CALL_ARGS whose delta pieces, joined per toolCallId, read {"timeZone":"Asia/Tokyo"}, then TOOL_CALL_RESULT:
    Shell
    npx veryfront project runs events --run-id $RUN_ID --query '{"event_type":["TOOL_CALL_START","TOOL_CALL_ARGS","TOOL_CALL_RESULT"],"limit":100}'
  4. If page_info.next is not null, run it again with that value as "cursor" in --query. You should now see the next events.

Try it in a sandbox

  1. Before you start: the tool's source

  2. Before you start: the tool

  3. Before you start: an agent with the tool

  4. Before you start: ask it the time in Tokyo

  5. Before you start: let the agent answer

  6. Set RUN_ID

  7. Before you start: wait until the run is completed

  8. List the run's tool-call events

  9. Check it

Try it out

Next steps