Spec / 004-02 · pattern 02 of 06
Tool Agent
A tool agent is defined by function calling. The important events are tool selection, invocation, and results — not a private inner monologue.
Input → plan → tool → check → output
Station 01 of 05 · Input
- intake
- agent
- tool
- gate
- output
- packet on the wire
intake
Input
The question.
Task.
Shape
The type is the contract. If you cannot write it, you do not have this pattern yet.
type ToolCall = {
name: string;
arguments: Record<string, unknown>;
};
type Observation = { ok: boolean; data: unknown };
type ToolAgentStep = ToolCall | Observation | Final;When to use it
Use when the task depends on search, files, browsers, or APIs.
Not this
Not a chatbot with a tool mentioned in the prompt. If no observation comes back, it is not this pattern.
Risks
- 01
Tool errors get hidden.
- 02
The model answers without calling tools.
Agents that use this pattern
505 agents · page 1 of 22
Showing 1–24 of 505
Read next
Tool-Using Agents
Tool-Using Agents: Calling, Design, Memory, Middleware
Tool calling is how models take actions. Tool design, memory, and middleware decide whether those actions are safe to repeat.
Agent Fundamentals
Agent Fundamentals: Autonomy, the Loop, Structured Output, Routing
An agent is a system with a job, tools, state, and a stop condition — not a chat box with a costume.