BeakrGo to website

Tool system

The tool system manages how the agent interacts with external services and data: every tool call passes through a registry, a policy check, a context injection step, then parallel dispatch -- with one carefully drawn exception for database-writing tools.

A large part of agent quality lives here. The system decides which tools should be visible, when they should be used, which calls can safely run in parallel, and which writes must be serialized. That sequencing logic is treated as core agent behavior, not incidental plumbing.

DEFINITIONS@tool web_search@tool repl_run@tool artifact_*...TOOL REGISTRYactive setdeferred setTOOL EXECUTOR1Policy checkallowlist · rate · scope2Context injectioncontext · citations3Execute handlerparallel or serialized4Return ToolResult-> messages channelMeta-tools intercepted -> child agent spawnedregister()execute()

Parallelism rules

  • Read-only tools (search, file reading, data fetching) run in parallel -- all calls from a single model turn dispatch concurrently.
  • Database-writing tools run one at a time. This prevents data isolation issues when multiple tools try to write simultaneously.
  • Meta-tools (like delegating to another agent) have their own execution path -- they spawn a separate agent run.