# AI CLI Delegator

> Route self-contained tasks to Copilot CLI, Antigravity or Codex by live quota, run them headless and safely, and review the results.

AI CLI Delegator is a paid AI agent skill on Agensi by TringyTrongy, in Agents & Orchestration. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: $5 (one-time purchase)
- Creator: [TringyTrongy](https://www.agensi.io/creators/tringytrongy)
- Category: [Agents & Orchestration](https://www.agensi.io/skills/agents-orchestration)
- Version: 1.0.0
- Last updated: 2026-12-01
- Security: scan passed (2026-12-01); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/ai-cli-delegator
- Tags: delegation, multi-agent, copilot-cli, antigravity, codex, quota, code-review

## About this skill

You probably pay for more AI than you use. Copilot premium requests reset monthly and Antigravity quota resets every few hours, while your main agent keeps hitting its own limits.

AI CLI Delegator lets your agent (Claude Code, Cursor, Codex, or any agent that can run a command) hand self-contained work to the other AI CLIs you already have installed and signed in: GitHub Copilot CLI, Google Antigravity (`agy`) and OpenAI Codex CLI.

### What it does
- **Checks quota first.** Reads Copilot premium requests left (via the GitHub CLI) and each Antigravity model pool (via `agy -p /usage`), then picks the strongest worker that still has room, spending quota that resets soon first.
- **Runs the worker headless and safely.** `read_only` for research and reviews; `worktree` for code changes, in a fresh git worktree on its own branch, so nothing touches your checkout until you approve the diff.
- **Flags blocked actions back to you.** Each CLI runs under its own auto-review. Anything it blocks comes back for your agent to approve with the narrowest rule, or refuse, and the same worker session carries on.
- **Treats output as untrusted.** Your agent checks claims and reads the diff before using anything.

### How it works
1. `delegate.py probe` lists the installed CLIs and the quota left.
2. Your agent writes a self-contained brief: goal, files, constraints, expected output.
3. `delegate.py run` runs the job until it finishes and returns a JSON summary: status, output, blocked actions, changed files. Every job's prompt, output and logs are kept in `~/.ai-cli-delegator/jobs/`.
4. `delegate.py resume` continues a Copilot or Antigravity session after you approve a blocked action.

### Good for
Bulk reading and summarising, web research, writing tests for existing code, mechanical refactors, and independent second-opinion reviews from a different model family.

### Not for
Secrets, credentials or customer data, design decisions, or anything that needs your current conversation's context. The skill tells your agent to keep those.

## Requires

- Git
- Python 3.8+
- GitHub Copilot CLI or Antigravity or Codex CLI
- Optional: GitHub CLI (gh), for Copilot quota readings

You only need ONE of these accounts: GitHub (for Copilot CLI), Google (for Antigravity) or OpenAI (for Codex CLI), with its CLI installed and signed in. More CLIs give the skill more quota to choose from.

## Known limitations

Needs Python 3.8+ and at least one AI CLI (Copilot CLI, Antigravity or Codex) installed and signed in. Workers only see the brief your agent writes, not your conversation, so it suits self-contained tasks. Tested live with the real CLIs on Windows 11; on macOS and Linux the script is tested in automated runs, and the skill's first-run check helps your agent work around CLI differences.

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the AI CLI Delegator skill from Agensi" and describe your task.
3. Buy it on the listing or let your agent ask you first; your agent then loads it from Agensi when it needs it. Every paid skill has a money-back guarantee: https://www.agensi.io/docs/money-back-guarantee

## Frequently asked questions

### How does this skill help me manage my AI usage limits?

It lets your AI agent hand self-contained coding and research tasks to the other AI CLIs you have installed: GitHub Copilot CLI, Antigravity or Codex. It checks how much quota each has left, picks the strongest one that still has room (using quota that resets soon first), runs the task headless until it finishes, and gives your agent the result to review. Your main agent's limits are saved for design and decisions.

### What external software or accounts do I need to have ready?

You must have the GitHub Copilot CLI, Google Antigravity, or OpenAI Codex CLI already installed and authenticated on your system. The skill also requires Python 3.8 or higher to run the coordination scripts that manage these external workers.

### How does it prevent delegated code changes from corrupting my project?

For code changes, use worktree mode: the worker edits a fresh git worktree on its own branch, so nothing touches your working directory until you have reviewed the diff and merged it. Read-only mode makes no edits at all. Edit mode changes the folder in place and is meant only for version-controlled folders, with your agreement.

### What kind of reports or files does the skill generate after a task?

Every job returns a JSON summary: status, the end of the worker's output, and any actions its sandbox blocked. A job folder in ~/.ai-cli-delegator/jobs/ keeps the full prompt, output and error log, plus the list of changed files for worktree jobs. You review the diff in the worktree itself.

### What are the specific limitations on what can be delegated?

It is not meant for tasks that need your current conversation's context, or for design decisions. The skill also tells your agent never to delegate credentials, .env files, customer data or personal information: those stay with your main agent.

### How do I tell my agent to start delegating?

You can start by asking your agent to probe for available workers to see which CLIs are active and how much quota remains. Once identified, you can instruct it to delegate a specific task, such as writing unit tests or summarizing a large log file, using one of the supported providers.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
