Ask agy
agy_askDelegate broad codebase exploration to a low-cost agentic model that locates candidate files, summarizes structure, or drafts an approach — returning leads you verify before acting.
Instructions
Delegate a task to agy (Google's Antigravity CLI), a cheap agentic model that's good at broad exploration but prone to hallucination. Use it to cast a wide net over a codebase or question — locating candidate files, summarizing structure, drafting an approach — before you commit your own more expensive tool calls to verifying and acting on it. Starts a brand-new agy conversation; use agy_continue to follow up on this one. agy is a cheap, fast model and explores well, but it fabricates file paths, line numbers, function names, and quoted code with some regularity. Treat everything in response as an unverified lead, not fact: before repeating a specific claim (a path, a symbol, a line number, an exact quote) to the user or acting on it, confirm it yourself with Read/Grep/Glob.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"prompt": "<prompt>"
},
"name": "agy_ask"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | Working directory / project root for agy to run in. Defaults to this server's own working directory. | |
| mode | No | agy execution mode. Only meaningful with permission=read_write. | |
| model | No | Override agy's model, e.g. 'gemini-3.8-flash-low' for the cheapest/fastest option. Use agy_list_models to see choices. | |
| effort | No | Reasoning effort. | |
| prompt | Yes | The task or question to give agy. | |
| add_dir | No | Extra directories to add to agy's workspace (repeatable --add-dir). | |
| log_file | No | If set, also stream this task's activity to this file as plain text lines. The file is created immediately (so a wait-loop never spins on a nonexistent file), and once the task reaches a terminal state — success, a real error, or even a crash before it properly started — the raw response/error text is appended between "###AGY_RESPONSE_START###"/"###AGY_RESPONSE_END###" lines (for extracting just that text without JSON-parsing), then the full JSON result, then a closing marker: "###AGY_TASK_DONE###" on success or "###AGY_TASK_ERROR###" on any failure — always exactly one of the two, guaranteed. Meant to be paired with background:true and your own Bash tool's run_in_background, instead of polling agy_status in a loop: after starting this call, run `until grep -qE '###AGY_TASK_DONE###|###AGY_TASK_ERROR###' <file>; do sleep 5; done` with run_in_background:true — you'll get an automatic completion notification (success or failure) the same way any other background shell command notifies you when it exits. | |
| background | No | Run this as a background task instead of blocking the call: returns a task_id immediately (status "running") instead of waiting for agy to finish. Poll it with agy_status (optionally long-polling via its wait_seconds) to check progress or retrieve the final result once done. Use this for anything that seems likely to take a while — exploring a large codebase, a multi-step task — so a slow run doesn't cost you the whole call to a timeout. | |
| permission | No | Tool-access level for this call. none: agy answers from context only — no tools at all (even reading files is denied). read_only: agy may read files, glob, and search the codebase, plus run a curated set of read-only shell commands (ls, cat, head, tail, wc, pwd, file, stat, du, and git log/diff/show/status/blame) with any arguments but no chaining/piping/substitution/redirection. It cannot write files, edit files, or run anything else. Safe default for exploration. read_write: agy gets full tool access (read, write, edit, run shell commands) via --dangerously-skip-permissions — no guardrails. Only use when you specifically want agy to make changes. | read_only |
| timeout_seconds | No | Max seconds to wait for agy to finish. For anything that might run longer than a couple minutes, prefer background:true instead of raising this — a blocking call that hits this timeout kills the underlying agy process and the work is lost, whereas a background task keeps running and you just check back later. |