Codex Agy Bridge
About
Run parallel, resumable, human-operable Antigravity CLI sessions from Codex, Claude Code, or any MCP-capable agent harness.
Details
- Author
- varadfromeast
- Downloads
- 312
- Categories
- Developer Tools, Automation, AI
Jump to
—
—
Async Parallel Antigravity for Codex & Claude Code
Run parallel, resumable, human-operable Antigravity CLI sessions from Codex, Claude Code, or any MCP-capable agent harness.
Run Antigravity from an agent harness as durable, parallel, human-operableagysessions over MCP.
codex-agy-bridgewraps the official Antigravity CLI with a resumable MCP control plane. Agent harnesses like Codex, Claude Desktop, or your own GPT/Claude-powered MCP client can startagyruns, wait on sparse events, attach a real terminal, send guarded input, cancel safely, continue exact conversations, and collect final results later byrun_id.
- Codex CLI for the command below, or another local stdio MCP-capable harness
- The official Antigravity CLI (agy), already authenticated locally
- uv/uvx
- tmuxon macOS:
codex --version agy --version agy models uvx --version tmux -V
agy --prompt-interactive "Authenticate Antigravity and then exit." agy models
Afteragy modelssucceeds, install or restart the MCP server. If a bridge run still hits auth,agy_run_startreturnsstatus="auth_required"and opens a visibleagyauthentication session by default. Complete sign-in there, then start a fresh run. You can also useagy_run_observe(view="terminal")oragy_admin(action="doctor")to inspect the auth-required status.
codex mcp add codex-agy-bridge \ --env AGY_CMD="$(command -v agy)" \ -- "$(command -v uvx)" codex-agy-bridge@latest
Restart the harness, then verify in Codex if you used the command above:
codex mcp get codex-agy-bridge codex mcp list
For Claude Desktop or a custom MCP client, use the same stdio command shape:uvx codex-agy-bridge@latestwithAGY_CMDset to the authenticatedagyexecutable.
- Parallel Antigravity sessions:launch multiple independentagyruns, each with its own durable state, logs, transcript projection, and result.
- Human-operable terminals:foreground runs live in persistenttmuxsessions, so Terminal.app can attach without killing the agent.
- Resumable MCP control:MCP calls can time out, the harness can restart, and the run can still be observed later byrun_id.
- Goal orchestration:create a goal, start named targets with bounded parallelism, and inspect the whole batch as one coordinated effort.
- Sparse wake events:agy_run_waitshort-polls lifecycle, attention, progress, and terminal events without transcript-polling spam.
- Guarded input:agy_run_inputcan reject stale writes when event or transcript cursors changed after the caller observed the run.
- Trajectory-aware observability:bounded transcript summaries and terminal evidence are exposed without private model reasoning.
- Operational hygiene:duplicate active starts are deduplicated, process groups are cancelled safely, and completed result artifacts are preserved.
Help the user install it; do not silently mutate their machine.
command -v codex command -v agy command -v uvx command -v tmux agy --version agy models
- If anything is missing, ask before installing it.
- Ifagy modelsreports an auth error, help the user complete the Day 0 authentication flow above before adding the MCP server.
- Then run:
codex mcp add codex-agy-bridge \ --env AGY_CMD="$(command -v agy)" \ -- "$(command -v uvx)" codex-agy-bridge@latest
codex mcp get codex-agy-bridge codex mcp list
- Tell the user to restart their agent harness so the new MCP tools load.
The Quick Install command stores an stdio MCP server definition. When the agent harness starts the server,uvxresolvescodex-agy-bridge@latestfrom PyPI, installs it into an isolated cached environment, and runs thecodex-agy-bridgeconsole script.AGY_CMDpins the bridge to the user's already-installed and authenticatedagyexecutable.
Do not replace$or$(...)manually in the command. In POSIX shells,$(command -v agy)and$(command -v uvx)expand to absolute executable paths.
Use this when you want the repository version directly:
codex mcp add codex-agy-bridge \ --env AGY_CMD="$(command -v agy)" \ -- uvx --from git+https://github.com/varadfromeast/codex-agy-bridge \ codex-agy-bridge
git clone https://github.com/varadfromeast/codex-agy-bridge.git cd codex-agy-bridge uv sync --extra dev codex mcp add codex-agy-bridge \ --env AGY_CMD="$(command -v agy)" \ -- uv --directory "$PWD" run codex-agy-bridge
flowchart LR H["Agent harness<br/>(Codex, Claude, custom MCP client)"] M["codex-agy-bridge<br/>MCP stdio server"] S["Durable control plane<br/>runs, goals, events, results"] W["Detached run supervisor"] A["Antigravity CLI<br/>agy"] T["Persistent tmux session<br/>human attach/input"] L["Local Antigravity<br/>trajectory files"] H <-->|"MCP tools"| M M <--> S S --> W W --> A W <--> T A --> L W -->|"bounded transcript projection"| S T -->|"terminal logs and attention prompts"| S
The bridge keeps the MCP server responsive while detached supervisors own the long-runningagyprocesses. State and events are persisted locally, so a run can continue after the original MCP call returns. For the deeper process model, seedocs/ARCHITECTURE.md. For the MCP control-loop vision, seedocs/MCP_VISION.md.
agy_run_start -> agy_run_wait -> agy_run_observe -> agy_run_result
In Codex MCP, tools may be exposed with the server prefix, for examplecodex_agy_bridge_agy_run_wait. Run responses include exactwait_callarguments; note thatagy_run_waitalways takesrun_ids: ["..."], even for a single run. Supported wait conditions areany_attention,any_terminal,all_terminal,any_event, and aliasesattention,terminal,finished,finish,complete,completed,result,all_finished,all_complete, andall_completed.
Useagy_goalwhen the harness should split work into named targets with a shared objective and bounded parallelism.
Run state survives MCP server restarts under~/.local/state/codex-agy-bridge/.
This project is experimental. It currently targets Python 3.11+, macOS,tmux, and Antigravity CLI 1.0.8-compatible commands and trajectory files.
Antigravity is an agentic CLI. It can read and write files, execute commands, and access the network with the current user's privileges. This bridge is not a sandbox or security boundary.
The bridge always enables Antigravity's dangerous permission-skip policy so unattended runs do not stall on CLI approval prompts. Anydangerously_skip_permissions=falseinput is rejected; the only allowed value istrue.sandbox=trueandadditional_directoriesare CLI policy hints, not filesystem containment.
The bridge does not read or copy Antigravity OAuth credentials. It invokes the installedagybinary and reads ordinary local conversation metadata and trajectory files.
git clone https://github.com/varadfromeast/codex-agy-bridge.git cd codex-agy-bridge uv sync --extra dev uv run pytest uv run ruff check . uv build
The server uses stdio transport. Do not print diagnostic text to stdout; it would corrupt MCP framing.
A pushed version tag runs.github/workflows/publish.yml, which verifies versions, runs checks, builds distributions, publishes to PyPI through GitHub OIDC, creates a GitHub release, and publishesserver.jsonto the MCP Registry.
The current reader expects Antigravity trajectory JSONL under:
~/.gemini/antigravity-cli/brain/<conversation-id>/ .system_generated/logs/transcript.jsonl
If Antigravity moves to SQLite or a local daemon API, a new adapter can replace this reader without changing the MCP tool contract.
This is a web browser that enables your coding agent, such as Claude Code, to visit websites on your behalf and assist you in identifying bugs or creating UI test cases.
Agent-native developer Q&A API with MCP + A2A endpoints for citations, job pickup, and answer submission.
MCP bridge that lets Claude Code delegate heavy tasks to the Antigravity CLI (agy) — purpose-built tools, model routing with fallback, session continuity, and output truncation to save Claude's context and tokens.
Embeds intelligent guidance into AI workflows to organize development and ensure quality.
Open-source AI coding stack — bundled MCP servers, agent runtime, and developer tooling for shipping AI-native dev tools.
Local agent workbench bundling OpenHands, Goose, Aider, and ashlrcode against one local LLM, with ashlr-plugin MCP servers pre-wired.
knowledge network for AI coding agents. Developers connect their agents to a shared pool of verified solutions — saving tokens, reducing debugging time, and getting better results. Solution authors earn when their work helps others.
Orchestrates multiple Claude Code agents across iTerm2 sessions, providing centralized management and inter-agent communication.
Multi-LLM Design and Build Team. Confer and create with a team of LLMs.
An MCP server for initial app planning and creating a good starting point for an app.
An AI-powered server that facilitates feature discussions between developers and AI, acting as a lead developer to guide implementation and architectural decisions.
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.


