Expand description
cersei-tools: Tool trait, built-in tool implementations, and permission system.
Modules§
- apply_
patch - ApplyPatch tool: apply unified diff patches to files.
- ask_
user - AskUserQuestion tool: prompt the user for input during agent execution.
- bash
- Bash tool: execute shell commands with persistent shell state.
- bash_
classifier - Bash command risk classification.
- code_
search - CodeSearch tool: hybrid BM25 + vector semantic search.
- config_
tool - ConfigTool: read and modify agent configuration.
- cron
- Cron tools: schedule, list, and delete recurring/one-shot tasks.
- exa_
search - ExaSearch tool: AI-powered web search via the Exa API (https://exa.ai).
- file_
edit - File edit tool: performs exact string replacements.
- file_
history - File history: track which files were accessed during a session.
- file_
read - File read tool.
- file_
snapshot - File snapshot system: stores before/after content per tool call for undo.
- file_
watcher - File watching: detect changes in the project directory.
- file_
write - File write tool.
- git_
utils - Git utilities: repo detection, status, diff, and history.
- glob_
tool - Glob tool: find files by pattern.
- grep_
tool - Grep tool: search file contents with regex.
- lsp_
tool - LSP tool: query language servers for code intelligence.
- notebook_
edit - NotebookEdit tool: edit Jupyter/IPython notebook cells.
- permissions
- Permission policies for tool execution.
- plan_
mode - Plan mode tools: enter/exit read-only planning mode.
- powershell
- PowerShell tool: execute PowerShell commands (Windows/cross-platform).
- remote_
trigger - RemoteTrigger tool: fire cross-session events.
- send_
message - SendMessage tool: inter-agent message passing.
- skill_
tool - Skill tool: load and execute skill prompt templates. Supports:
- skills
- Skills system: discover, load, and execute skill prompt templates.
- sleep
- Sleep tool: delay execution for a specified duration.
- synthetic_
output - SyntheticOutput tool: return structured JSON data for SDK/coordinator sessions.
- tasks
- Task system: create, track, update, and manage background tasks.
- todo_
write - TodoWrite tool: structured task list management.
- tool_
primitives - Tool primitives — low-level building blocks for agent tools.
- tool_
search - ToolSearch tool: search available tools by name or description.
- web_
fetch - WebFetch tool: fetch and parse web page content.
- web_
search - WebSearch tool: search the web via a configurable search API.
- worktree
- Worktree tools: create/exit isolated git worktrees for parallel work.
Structs§
- Cost
Tracker - Tracks cumulative token usage and cost.
- Extensions
- Type-map for injecting custom data into the tool context.
- Shell
State - Tool
Context - Tool
Result
Enums§
Traits§
- Tool
- Tool
Execute - Typed tool execution trait — used with
#[derive(Tool)].
Functions§
- all
- All built-in tools (35 tools).
- clear_
session_ shell_ state - coding
- All coding-oriented tools (filesystem + shell + web).
- estimate_
cost - Estimate USD cost from token counts based on model pricing (per 1M tokens).
- filesystem
- File system tools: Read, Write, Edit, Glob, Grep, NotebookEdit.
- none
- No tools (for pure chat agents).
- orchestration
- Orchestration tools: SendMessage, Tasks, Worktree.
- planning
- Planning tools: EnterPlanMode, ExitPlanMode, TodoWrite.
- scheduling
- Scheduling tools: Cron (Create/List/Delete), Sleep, RemoteTrigger.
- session_
shell_ state - shell
- Shell tools: Bash, PowerShell.
- web
- Web tools: WebFetch, WebSearch, ExaSearch.