-
Notifications
You must be signed in to change notification settings - Fork 0
Agent Tools
Phi Trần tuấn edited this page Jun 30, 2026
·
1 revision
Agent Tools — Title: Agent Tools
# Agent Tools
20 built-in tools, grouped by category. These are the tools the model can call within the agentic loop (orchestrated by `09_api_system.py`, dispatched via `_dispatch_tool`).
| Category | Tools | Module |
|---|---|---|
| **Shell** | `bash` | `06_tools_fs.py` |
| **File I/O** | `read`, `write`, `edit`, `multiedit`, `extract`, `apply_patch` | `06_tools_fs.py` |
| **Search** | `glob`, `grep`, `view_symbol`, `file_index` | `06_tools_fs.py` / `07_tools_more.py` |
| **Web** | `webfetch`, `websearch` | `07_tools_more.py` |
| **Planning** | `todowrite`, `todoread`, `question` | `07_tools_more.py` |
| **Code intelligence** | `lsp` | `07_tools_more.py` |
| **Orchestration** | `task` (subagent dispatch), `set_tools`, `skill` | `08_undo_dispatch.py` / `07_tools_more.py` |
## Notes per category
**`bash`** — the only tool with a default permission of `ask` instead of `allow` (see [[Permissions & Sandbox]]), since it can execute arbitrary commands on the machine.
**File I/O** — all write/edit operations run inside the session sandbox (`_resolve_to_sandbox`, `_check_sandbox_read` in `04_agent_cache.py`) and are tracked by the undo/redo system (`08_undo_dispatch.py`). `extract` lets you relocate a line range **without the AI retyping the content** — a meaningful token saving compared to having the model retype an entire block.
**Search** — `glob`/`grep` do pattern-based search; `view_symbol`/`file_index` help locate symbols in code (functions, classes...) for code intelligence.
**Web** — `websearch` uses SearXNG HTML scraping with a DuckDuckGo fallback, with no dependency on any default MCP server.
**Planning** — `todowrite`/`todoread` manage the agent's todo list within a session (viewable via `/todos`); `question` lets the agent ask the user a clarifying question mid-task.
**`lsp`** — Language Server Protocol integration, for deeper code intelligence than plain-text glob/grep.
**Orchestration**:
- `task` — dispatches an independent **subagent** to run a sub-task (also used internally when a custom command has the `subtask` flag, see [[Custom Commands]]).
- `set_tools` — dynamically restricts which tools the model is allowed to use for a given turn.
- `skill` — loads an available skill (see `/skills`).
## Default permission per tool
| Tool | Default |
|---|---|
| `bash` | `ask` |
| All other tools (`write`, `edit`, `read`, `glob`, `grep`, `webfetch`, `websearch`, `todowrite`, `todoread`, `question`, `task`, `skill`, `lsp`, `extract`, `apply_patch`) | `allow` |
In **`plan` agent mode** (read-only), write-capable tools are overridden to `deny`: `bash`, `write`, `extract`, `edit`, `apply_patch`.
➡️ Change permissions with `/perm <tool> <level>` — see [[Slash Commands]] and [[Permissions & Sandbox]].