Skip to content

Tools

Tools allow Bub to read and write files, run commands, fetch web pages, and manage sessions.

The Bub app ships with these built-in tools:

Category Tool Purpose
Processes bash Run Shell commands with working directory, timeout, and background options
bash.output, bash.kill Read background process output incrementally or terminate a process
Files fs.read, fs.write, fs.edit Read files by line range (or images), write whole files, and replace exact text
Web web.fetch Send HTTP GET requests to fetch web pages (prefers Markdown)
Discovery skill List discovered skills or load a skill’s SKILL.md body
tool.describe Load the full schema of deferred tools (deferred=True) on demand
Session & Tape tape.info, tape.search Inspect session metrics and token usage, or search session history
tape.handoff, tape.reset Advance the context start point, or archive and reset session history
spill.read Read large tool outputs in chunks
Subagents subagent Delegate a task to a background subagent
subagent.wait, subagent.send, subagent.cancel Wait for subagent results, send follow-up instructions, or cancel a subagent
Code mode run_code Compose multiple tools in Python when code mode is enabled

For full parameter tables and defaults, see the Built-in tools reference.

In the Bub app, tools can be invoked in two ways:

  1. Called by the model: ask a question normally, and the model selects and calls tools based on their descriptions.
  2. Called directly from the terminal: prepend the command prefix (, by default) to execute a tool without calling the model or spending tokens:
    Terminal window
    bub run ",fs.read path=README.md"

To guide how the model uses tools:

  • Workspace rules: add project-wide rules to AGENTS.md in the workspace root.
  • Step-by-step workflows: package multi-step procedures as skills.

For tasks involving loops, conditionals, or batch data processing, repeated tool round-trips consume extra context. With code mode enabled, the model writes Python code (executed via run_code) to compose multiple tool calls in a single step:

,code_mode enable=true
  • Takes effect on the next Turn and persists in the current session Tape.
  • Run ,code_mode enable=false to disable code mode.
  • See the run_code reference for Python call syntax.

Built-in tools (bash, fs.*, and run_code) run directly on the local host with the current user’s permissions:

  • No default sandbox: commands executed by the model have real filesystem and process side effects on the host.
  • Approval and interception: use tool interception hooks to require human approval or block dangerous arguments before execution.
  • Isolated environments: provide a containerized or remote execution environment via a plugin when isolation is required.

When the built-in tools are not enough, you can extend Bub in two ways: