Skip to content

Think Tool

think gives the agent a dedicated space to reason before it acts. It doesn’t execute code, fetch data, or change state — it just writes the agent’s reasoning into the conversation trace so it (and you) can see the plan.

Complements deepagents’ write_todos (external task tracking) — think is internal deliberation before committing.

  • Analyze tool outputs before deciding the next step
  • Break a complex request into numbered actions
  • Compare implementation approaches
  • Reason through project rules or coding standards
  • Formulate hypotheses before inspecting code

Without think, agents tend to act impulsively — call the first tool that seems relevant. think encourages “plan → act” and produces more coherent multi-step solutions.

Single argument, thought: string. Free-form. Example agent output:

[think]
The user wants to refactor auth. Analysis:
1. login.ts: SQL injection via string concatenation.
2. session.ts: in-memory store — breaks in multi-instance deployment.
3. middleware.ts: clean; could add rate limiting.
Plan:
1. Fix SQL injection first (security priority).
2. Migrate session store to Redis-adapter pattern.
3. Add rate limiting.
4. Update tests per change.

The plan becomes part of the conversation context — the agent can reference it in subsequent turns, and you see it in the chat panel.

  • Subagents — for delegating complex work rather than reasoning through it alone
  • Tools — full tool list