ag-bash
v6.0.4Sandboxed AI-native bash with 70 agentic tools: run_bash, code edit/diff, WASM Python/JS.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
run_bash
Run a bash script in a persistent sandboxed environment. State (cwd, variables, functions) persists between calls.
| Parameter | Type | Description |
|---|---|---|
script * | string | The bash script to execute. |
get_state
Retrieve the current state of the shell (CWD and Environment Variables).
snapshot
Capture a complete binary snapshot of the current shell state (filesystem + environment).
restore
Restore the shell to a previously captured state via a snapshot.
| Parameter | Type | Description |
|---|---|---|
snapshot * | string | The base64 encoded snapshot state to restore. |
create_delta
Create a differential delta between a base snapshot and current state for efficient sync.
| Parameter | Type | Description |
|---|---|---|
baseSnapshot * | string | The base64 encoded base snapshot. |
apply_delta
Apply a differential delta to the current shell state.
| Parameter | Type | Description |
|---|---|---|
delta * | string | The base64 encoded delta to apply. |
fork_speculate
Fork-speculation: copy-on-write branch the sandbox into N isolated children, run a candidate script sequence in each branch in parallel, and report each branch's output + exit code so you can pick a winner. Branch mutations (env, cwd, files) are invisible to the persistent shell and to each other. Optionally pass keepWinner to commit exactly one winning branch's scripts onto the persistent shell; otherwise the persistent shell is left untouched (all branches discarded).
| Parameter | Type | Description |
|---|---|---|
branches * | array | Candidate branches to try. Each branch is an array of bash scripts run in order within its own isolated fork. |
keepWinner | number | Optional 0-based index of the branch to commit onto the persistent shell. Omit to keep none (pure speculation). |
search_tools
Discover which agentic tools are available for a free-text task description (Code Mode). Returns the best-matching tools by relevance so an agent can pick a tool without pre-loading the full catalog.
| Parameter | Type | Description |
|---|---|---|
query * | string | Free-text description of the task or capability you need. |
limit | number | Maximum number of matches to return (1-25, default 5). |
add_todo
Add a new todo item.
| Parameter | Type | Description |
|---|---|---|
task * | string | The task description. |
status | string | Initial status. |
ag_convert
Convert documents (PDF, Docx, Xlsx) and images to Markdown with AI-powered visual intelligence and OCR.
| Parameter | Type | Description |
|---|---|---|
filePath * | string | Path to the file to convert. |
describeImages | boolean | Use AI to describe images (default: false). |
engine | string | Engine override (default: auto). |
highFidelity | boolean | Favor precision over speed (default: false). |
llmModel | string | Specific model for vision tasks. |
llmProvider | string | LLM provider for vision tasks. |
visionMode | string | Prompt template for image analysis. |
visionPrompt | string | Custom vision prompt (overrides visionMode). |
ag_edit
Advanced line-based file editor. Supports multiple non-contiguous edits in a single call and protects against stale writes using content hashes.
| Parameter | Type | Description |
|---|---|---|
edits * | string | List of edits to apply sequentially. |
filePath * | string | Absolute path to the file to edit. |
expectedHash | string | The expected SHA-256 hash of the file content before applying edits. If it doesn't match, the edit will fail. |
ag_explain
Parse and explain a shell command string, showing its structure and components.
| Parameter | Type | Description |
|---|---|---|
command * | string | The shell command string to explain. |
ag_find_files
Find files by name or glob pattern recursively.
| Parameter | Type | Description |
|---|---|---|
pattern * | string | The filename or glob pattern to search for. |
path | string | The directory to start searching from (default: current directory). |
ag_find_symbol
Search for symbols (functions, variables, classes) by name or pattern across the workspace.
| Parameter | Type | Description |
|---|---|---|
query * | string | The symbol name or search pattern. |
type | string | Filter by symbol type. |
ag_grep
High-performance recursive pattern search within files.
| Parameter | Type | Description |
|---|---|---|
query * | string | The pattern or string to search for. |
ignoreCase | boolean | Whether to ignore case when searching. |
path | string | The directory or file to search in (default: current directory). |
ag_hover
Get semantic information about a symbol at a specific line and character position.
| Parameter | Type | Description |
|---|---|---|
character * | number | 1-indexed character position. |
filePath * | string | Path to the file containing the symbol. |
line * | number | 1-indexed line number. |
ag_lsp
Advanced code intelligence: goToDefinition, findReferences, hover, etc.
| Parameter | Type | Description |
|---|---|---|
filePath * | string | Path to the file. |
operation * | string | The LSP operation to perform. |
character | number | 1-based character position. |
line | number | 1-based line number. |
symbolName | string | Name of the symbol (optional if position is provided). |
ag_multi_edit
Apply multiple non-contiguous text replacements to a file in a single operation.
| Parameter | Type | Description |
|---|---|---|
chunks * | string | List of replacement chunks. |
path * | string | Absolute path to the file to edit. |
ag_todo
Manage project tasks and todos. Support for listing, adding, updating, and removing tasks.
| Parameter | Type | Description |
|---|---|---|
operation * | string | The operation to perform. |
id | string | The todo ID (required for 'update' and 'rm'). |
status | string | The status to set (required for 'update'). |
task | string | The task description (required for 'add'). |
ag_web_fetch
Fetch the content of a web page and convert it to clean markdown. Results are cached for 15 minutes.
| Parameter | Type | Description |
|---|---|---|
url * | string | The URL of the page to fetch. |
noCache | boolean | If true, bypass the cache and fetch fresh content. |
ag_web_search
Search the web for current information, documentation, and answers.
| Parameter | Type | Description |
|---|---|---|
query * | string | The search query to execute. |
allowed_domains | string | Restrict results to these domains. |
blocked_domains | string | Exclude results from these domains. |
agent_memory_read
Read a memory entry for an agent type.
| Parameter | Type | Description |
|---|---|---|
agentType * | string | Agent type identifier. |
key * | string | Memory key. |
scope * | string | Memory scope: user, project, or local. |
agent_memory_write
Write a memory entry for an agent type.
| Parameter | Type | Description |
|---|---|---|
agentType * | string | Agent type identifier. |
key * | string | Memory key. |
scope * | string | Memory scope: user, project, or local. |
value * | string | Memory value. |
analyze_code
Perform semantic analysis on a source file.
| Parameter | Type | Description |
|---|---|---|
path * | string | Absolute path to the file to analyze. |
check_destructive
Check if a command contains destructive patterns (rm -rf, DROP TABLE, git reset --hard, etc.). Returns warning or null.
| Parameter | Type | Description |
|---|---|---|
command * | string | The command to analyze for destructive patterns. |
check_environment
Get diagnostics about the sandboxed environment.
close_session
Terminate a persistent session and release its resources.
| Parameter | Type | Description |
|---|---|---|
sessionId * | string | The ID of the session to close. |
cron_create
Schedule a recurring or one-shot prompt using a cron expression.
| Parameter | Type | Description |
|---|---|---|
cron * | string | 5-field cron expression (e.g., "*/5 * * * *"). |
prompt * | string | The prompt/command to run at each fire time. |
durable | boolean | True = persisted, false = session-only (default). |
recurring | boolean | True = repeating (default), false = one-shot. |
cron_delete
Delete a scheduled cron job.
| Parameter | Type | Description |
|---|---|---|
id * | string | The cron job ID to delete. |
cron_list
List all scheduled cron jobs.
diff_files
Generate a unified diff between two files.
| Parameter | Type | Description |
|---|---|---|
file1 * | string | Path to the first file. |
file2 * | string | Path to the second file. |
edit_file
Apply a text patch to a file (simple find and replace).
| Parameter | Type | Description |
|---|---|---|
path * | string | Absolute path to the file to edit. |
replacement * | string | The new text to insert instead. |
target * | string | The exact text block to be replaced. |
replace_all | boolean | If true, replaces all occurrences instead of just the first one. |
enter_worktree
Create and enter an isolated virtual worktree for independent development.
| Parameter | Type | Description |
|---|---|---|
name * | string | Worktree name. |
branch | string | Branch name (default: worktree/<name>). |
exit_worktree
Exit the active worktree and restore the original working directory.
explain_command
Parse and explain a shell command.
| Parameter | Type | Description |
|---|---|---|
command * | string | The shell command to explain. |
find_files
Search for files by name or glob pattern.
| Parameter | Type | Description |
|---|---|---|
path * | string | The directory to start searching from. |
pattern * | string | The filename pattern or glob (e.g., '*.ts'). |
find_symbols
Search for symbols (functions, variables) across the workspace.
| Parameter | Type | Description |
|---|---|---|
query | string | Query to filter symbol names. |
get_definition
Find the definition of a symbol.
| Parameter | Type | Description |
|---|---|---|
name * | string | The name of the symbol to find. |
get_references
Find all references to a function or variable.
| Parameter | Type | Description |
|---|---|---|
character | number | 1-based character position |
line | number | 1-based line number |
name | string | The name of the symbol to find |
path | string | Path to the file where the symbol is referenced |
git_audit_log
Get the git operations audit log, optionally filtered to destructive operations only.
| Parameter | Type | Description |
|---|---|---|
destructiveOnly | boolean | If true, return only destructive operations. |
git_track
Record and classify a git operation. Returns classification (safe/mutating/destructive) and audit entry.
| Parameter | Type | Description |
|---|---|---|
command * | string | The git command to classify and record. |
glob_files
Fast glob pattern matching over the filesystem. Returns matching file paths sorted by name or mtime.
| Parameter | Type | Description |
|---|---|---|
pattern * | string | Glob pattern (e.g., "**/*.ts", "src/**/*.{ts,tsx}"). |
limit | number | Max results (default: 1000). |
path | string | Root directory (default: cwd). |
sort | string | "alpha" (default) or "mtime". |
grep_search
Search for a text pattern across multiple files.
| Parameter | Type | Description |
|---|---|---|
path * | string | Absolute path to the directory to search in. |
query * | string | The text or regex pattern to search for. |
help_builtin
Get detailed help for a shell builtin command.
| Parameter | Type | Description |
|---|---|---|
command * | string | The name of the builtin command. |
hover_info
Get information about a symbol at a specific position.
| Parameter | Type | Description |
|---|---|---|
character * | number | 1-based character position |
line * | number | 1-based line number |
path * | string | Path to the file |
index_workspace
Trigger a full scan and indexing of all supported files in the workspace.
| Parameter | Type | Description |
|---|---|---|
path | string | Root directory to scan. Defaults to /. |
list_dir
List contents of a directory.
| Parameter | Type | Description |
|---|---|---|
path * | string | Absolute path to the directory to list. |
list_mcp_tools
List all tools available via connected MCP servers.
list_todos
List all todo items.
plan_enter
Enter plan mode to design an approach before making changes.
plan_exit
Exit plan mode and return to execution mode.
query_json
Run a jq query against a JSON file or string.
| Parameter | Type | Description |
|---|---|---|
query * | string | The jq filter/query string. |
json | string | Optional JSON string to query directly. |
path | string | Optional path to a JSON file to query. |
read_file
Read the contents of a file from the virtual filesystem.
| Parameter | Type | Description |
|---|---|---|
path * | string | Absolute path to the file to read. |
run_command
Execute a shell command in the sandbox.
| Parameter | Type | Description |
|---|---|---|
command * | string | The shell command to execute. |
run_js
Execute JavaScript code in the sandbox. For persistent state, use run_js_session.
| Parameter | Type | Description |
|---|---|---|
code * | string | The JS code to execute. |
run_js_session
Execute JavaScript code in a persistent session (stateful REPL). Maintains variables and modules between calls.
| Parameter | Type | Description |
|---|---|---|
code * | string | The JS code to execute. |
sessionId * | string | Session identifier (e.g., 'main', 'test'). |
run_python
Execute Python code in the sandbox. For persistent state, use run_python_session.
| Parameter | Type | Description |
|---|---|---|
code * | string | The Python code to execute. |
run_python_session
Execute Python code in a persistent session (stateful REPL). Maintains variables and imports between calls.
| Parameter | Type | Description |
|---|---|---|
code * | string | The Python code to execute. |
sessionId * | string | Session identifier (e.g., 'data-analysis'). |
search_tools
Search for available tools by keyword, or select by exact name with 'select:Name1,Name2'.
| Parameter | Type | Description |
|---|---|---|
query * | string | Keyword query or "select:Name1,Name2" for exact lookup. |
limit | number | Max results (default: 10). |
send_message
Send a message from one agent to another.
| Parameter | Type | Description |
|---|---|---|
content * | string | Message content. |
from * | string | Sender agent ID. |
to * | string | Recipient agent ID. |
sync_mcp_tools
Synchronize and register all MCP tools into the central toolbox.
task_create
Create a new tracked task with subject, description, owner, and progress text.
| Parameter | Type | Description |
|---|---|---|
description * | string | What needs to be done. |
subject * | string | Brief title for the task. |
activeForm | string | Spinner text when in_progress (e.g., "Running tests"). |
owner | string | Agent ID that owns this task. |
task_get
Get full details of a specific task by ID.
| Parameter | Type | Description |
|---|---|---|
taskId * | string | The task ID. |
task_list
List all tracked tasks, optionally filtered by status or owner.
| Parameter | Type | Description |
|---|---|---|
owner | string | Filter by owner agent ID. |
status | string | Filter by status. |
task_stop
Stop (fail) a running task.
| Parameter | Type | Description |
|---|---|---|
taskId * | string | The task ID to stop. |
task_update
Update a task's status, subject, description, owner, or dependencies.
| Parameter | Type | Description |
|---|---|---|
taskId * | string | The task ID to update. |
addBlockedBy | string | Task IDs that block this task. |
addBlocks | string | Task IDs that this task blocks. |
description | string | New description. |
owner | string | New owner agent ID. |
status | string | New status: pending, in_progress, completed, failed, blocked. |
subject | string | New subject. |
team_create
Create a new agent team for coordinated multi-agent work.
| Parameter | Type | Description |
|---|---|---|
name * | string | Team name. |
description | string | Team purpose. |
team_delete
Delete an agent team.
| Parameter | Type | Description |
|---|---|---|
name * | string | Team name or ID. |
update_todo
Update the status of a todo item.
| Parameter | Type | Description |
|---|---|---|
id * | string | The ID of the todo to update. |
status * | string | New status. |
write_file
Create or overwrite a file in the virtual filesystem.
| Parameter | Type | Description |
|---|---|---|
content * | string | The content to write to the file. |
path * | string | Absolute path to the file to write. |