{"slug": "show-hn-agentbridge-let-one-ai-think-while-another-ai-writes-the-code", "title": "Show HN: AgentBridge – Let one AI think while another AI writes the code", "summary": "AgentBridge, a new open-source tool released on GitHub and crates.io, lets developers split AI coding work by using one AI for reasoning and another for code execution, connected via the Model Context Protocol (MCP). The tool, which currently uses OpenCode as its local executor, aims to reduce subscription quota usage by separating planning from implementation, with a workflow of PLAN → EXECUTE → REVIEW → DONE.", "body_md": "**Use one AI to think and another AI to code.**\n\nAgentBridge connects AI reasoning environments to local coding agents through **MCP**, allowing a web-based AI to understand and plan changes while a local coding agent executes them in your workspace.\n\nLet the AI with the best reasoning access think. Let the coding agent you already use execute.\n\n[🇨🇳 中文](/IndexFlowing/AgentBridge/blob/main/README_zh.md) · [📦 crates.io](https://crates.io/crates/agentbridge) · [🐙 GitHub](https://github.com/IndexFlowing/AgentBridge)\n\nAI coding tools increasingly combine two different jobs:\n\n**Reasoning**— understanding a codebase, investigating problems, designing solutions, and reviewing changes.** Execution**— editing files, running commands, running tests, and applying changes.\n\nThese two jobs do not necessarily need to be performed by the same AI.\n\nYou may have a web AI with generous usage and strong reasoning capabilities, while your coding CLI has a more limited subscription quota.\n\nWithout a bridge, the coding agent has to spend its quota on everything:\n\n```\nUnderstand → Explore → Reason → Plan → Code → Test → Review\n```\n\nAgentBridge separates the workflow:\n\n```\n                 BRAIN\n          Web-based AI\n       Gemini / Claude / ...\n                 │\n          Reason / Plan\n                 │\n                MCP\n                 ▼\n        ┌─────────────────┐\n        │   AgentBridge   │\n        └────────┬────────┘\n                 │\n             C2C PLAN\n                 │\n                 ▼\n             EXECUTOR\n          Local coding agent\n             OpenCode\n                 │\n        Edit / Run / Test\n                 │\n                 ▼\n          Local Workspace\n```\n\nThe result is simple:\n\nUse the AI that is best at thinking, and the coding agent that is best at doing.\n\nAgentBridge introduces two explicit roles.\n\nThe **Brain** is the AI responsible for reasoning.\n\nIt can:\n\n- inspect the project;\n- search the codebase;\n- understand architecture;\n- investigate bugs;\n- design implementation strategies;\n- create implementation plans;\n- inspect Git diffs;\n- review the Executor's work.\n\nThe Brain interacts with the workspace through AgentBridge's **read-only MCP interface**.\n\nIt does not directly modify files or execute shell commands.\n\nThe **Executor** is the local coding agent responsible for execution.\n\nIt can:\n\n- modify files;\n- run commands;\n- run tests;\n- implement the Brain's plan;\n- report execution results.\n\nAgentBridge currently uses **OpenCode** as its Executor.\n\nThe architecture is designed so additional coding agents can be supported in the future.\n\nAgentBridge connects the two.\n\nIt provides:\n\n- MCP-based workspace access;\n- read-only project inspection;\n- structured task delegation;\n- task lifecycle management;\n- execution status;\n- Git diff inspection;\n- test status;\n- result reporting.\n\nA typical workflow looks like this:\n\n```\nUser\n │\n ▼\nBrain\n │\n ├── Inspect workspace\n ├── Understand architecture\n ├── Investigate problem\n └── Create PLAN\n          │\n          ▼\n     AgentBridge\n          │\n       C2C PLAN\n          │\n          ▼\n      Executor\n          │\n   ├── Edit files\n   ├── Run commands\n   └── Run tests\n          │\n          ▼\n    Git Diff / Result\n          │\n          ▼\n        Brain\n          │\n       Review\n          │\n     ┌────┴────┐\n     │         │\n    DONE    PLAN AGAIN\n```\n\nThis creates a feedback loop:\n\n```\nPLAN → EXECUTE → REVIEW → DONE\n             ↑            │\n             └── PLAN ────┘\n```\n\nThe Brain can therefore focus on high-value reasoning while the Executor focuses on actually changing the codebase.\n\nAI coding subscriptions are often metered differently from normal web or chat usage.\n\nA coding agent may consume its allowance while:\n\n- exploring the repository;\n- reading files;\n- searching for definitions;\n- understanding architecture;\n- reasoning about an implementation;\n- generating a plan;\n- implementing changes;\n- running tests;\n- retrying failed implementations.\n\nThat means a significant amount of coding-agent usage can happen **before the first useful code change**.\n\nAgentBridge lets you move much of the exploratory and reasoning-heavy work to another AI interface.\n\nFor example:\n\n```\nGemini Web\n    │\n    │ understand / reason / plan\n    ▼\nAgentBridge\n    │\n    │ compact implementation plan\n    ▼\nOpenCode CLI\n    │\n    │ implement / test\n    ▼\nYour repository\n```\n\nThe goal is not to bypass quotas.\n\nAgentBridge:\n\n- does not provide additional model credits;\n- does not bypass provider limits;\n- does not access paid models without authorization;\n- does not proxy model APIs.\n\nIt simply allows you to **use the AI services and coding agents you already have more efficiently**.\n\nAgentBridge uses the **Model Context Protocol (MCP)** to expose your local project to the Brain.\n\nThe Brain can use tools such as:\n\n| Tool | Purpose |\n|---|---|\n`workspace_info` |\nInspect workspace information and Git state |\n`list_directory` |\nExplore the project structure |\n`read_file` |\nRead files |\n`search_workspace` |\nSearch source code |\n`git_status` |\nInspect repository status |\n`git_diff` |\nReview changes |\n`test_status` |\nRead the latest test result |\n`execution_summary` |\nRead the latest Executor result |\n\nThe Brain does not receive a generic shell interface.\n\nIt also cannot directly write files.\n\nThis separation is intentional.\n\nAgentBridge uses a small structured protocol called **C2C (Context-to-Context)** to communicate between the Brain and Executor.\n\nInstead of passing an entire repository or a huge conversation to the coding agent, the Brain creates a compact implementation plan:\n\n```\n[C2C]\nSTATE: PLAN\nTASK_ID: c2c_12345\nITERATION: 1\n\nGOAL:\nAdd URL inspection support to the GSC client.\n\nACTIONS:\n1. Inspect the existing GSC client.\n2. Add URL inspection support.\n3. Add tests for indexed and non-indexed URLs.\n\nTESTS:\ncargo test\n\nSUCCESS_CRITERIA:\nTests pass and the API correctly reports indexed / non-indexed.\n```\n\nThe source code remains in the local workspace.\n\nOnly the task intent and implementation contract cross the Brain → Executor boundary.\n\nThis keeps the communication focused and avoids unnecessarily duplicating the entire project context.\n\nOne of the most important design decisions in AgentBridge is the trust boundary.\n\nThe Brain can inspect:\n\n```\nworkspace\n├── source files\n├── project structure\n├── Git status\n├── Git diff\n└── test results\n```\n\nBut it cannot:\n\n```\n✗ write files\n✗ delete files\n✗ execute shell commands\n✗ commit\n✗ push\n```\n\nThe Executor is the component that performs those actions.\n\n```\n                 Read-only\n                    │\n                    ▼\n              ┌───────────┐\n              │   Brain   │\n              └─────┬─────┘\n                    │\n                  PLAN\n                    │\n                    ▼\n              ┌───────────┐\n              │ Executor  │\n              └─────┬─────┘\n                    │\n             Write / Execute\n                    │\n                    ▼\n              Local Project\n```\n\nThe Brain decides **what should happen**.\n\nThe Executor performs **the implementation inside the local coding environment**.\n\nThe easiest way to install AgentBridge is through Cargo:\n\n```\ncargo install agentbridge\n```\n\nVerify the installation:\n\n```\nagentbridge --version\n```\n\nYou can also download pre-built binaries from [GitHub Releases](https://github.com/IndexFlowing/AgentBridge/releases).\n\n```\ngit clone https://github.com/IndexFlowing/AgentBridge.git\ncd AgentBridge\n\ncargo install --path .\n```\n\nStart the MCP server:\n\n```\nagentbridge serve\n```\n\nBy default, AgentBridge listens on:\n\n```\nhttp://127.0.0.1:8787/mcp\n```\n\nThe default configuration is intentionally localhost-only.\n\nYou can check your environment with:\n\n```\nagentbridge doctor\n```\n\nConnect an MCP-capable AI client to AgentBridge.\n\nYour Brain can then inspect the local workspace through the MCP tools.\n\nThe Brain instructions are provided in:\n\n```\nskill/SKILL.md\n```\n\nThe skill teaches the Brain how to:\n\n- inspect the workspace;\n- understand the task;\n- create a C2C PLAN;\n- delegate the task;\n- monitor execution;\n- inspect the result;\n- review the changes;\n- finish or create another iteration.\n\nFor example:\n\n```\nAdd Google Search Console URL inspection support to this project.\n\nFirst understand the existing architecture.\nThen create an implementation plan and delegate it to the Executor.\nAfter implementation, review the diff and test results.\n```\n\nThe Brain can inspect the actual repository instead of relying on files pasted into the conversation.\n\nIf your Brain runs in a web environment and cannot directly access localhost, you can expose AgentBridge through a tunnel.\n\nFor example, with Cloudflare Tunnel:\n\n```\nagentbridge serve --allow-any-host\n```\n\nThen:\n\n```\ncloudflared tunnel --url http://127.0.0.1:8787\n```\n\nYour MCP endpoint will be available at:\n\n```\nhttps://<your-tunnel-id>.trycloudflare.com/mcp\n```\n\nAgentBridge itself remains a local application.\n\nSecurity:If you expose AgentBridge outside localhost, use authentication and carefully choose which workspace is exposed. Do not point AgentBridge at your entire home directory.\n\n```\nagentbridge init <workspace>\n\nagentbridge serve\n\nagentbridge status\n\nagentbridge doctor\n\nagentbridge task start --goal \"...\"\n\nagentbridge task executed \\\n  --status success \\\n  --tests \"cargo test\" \\\n  --exit-code 0\n```\n\nRun:\n\n```\nagentbridge doctor\n```\n\nto check your local AgentBridge environment.\n\nGlobal configuration:\n\n```\n~/.agentbridge/config.toml\n```\n\nWorkspace-specific configuration:\n\n```\n<workspace>/.agentbridge.toml\n```\n\nExample:\n\n```\nworkspace = \"/absolute/path/to/project\"\nhost = \"127.0.0.1\"\nport = 8787\n\n[security]\nmax_file_size = 1048576\ndeny_sensitive_files = true\n```\n\nAgentBridge is designed around a simple security model:\n\nThe Brain receives a read-only view of the workspace you explicitly expose.\n\nPath traversal and sensitive files are restricted.\n\nExamples of protected paths and patterns include:\n\n```\n../\n/etc/passwd\nC:\\Users\\...\n~/.ssh\n.env\n*.pem\n*.key\nid_rsa\n```\n\nRecommended practices:\n\n- Point AgentBridge at a single project.\n- Do not expose your home directory.\n- Keep the default localhost binding whenever possible.\n- If you expose the server remotely, configure authentication.\n- Treat a remote Brain as an external service with access to the workspace you expose.\n\nAgentBridge is a local developer tool, not a multi-tenant security boundary.\n\nAgentBridge is intentionally built around clear boundaries:\n\n```\nAgentBridge\n│\n├── MCP Server\n│   └── Exposes workspace inspection tools\n│\n├── Workspace\n│   └── Secure filesystem access\n│\n├── Task Runtime\n│   └── PLAN → EXECUTE → RESULT lifecycle\n│\n├── C2C Protocol\n│   └── Brain → Executor communication\n│\n├── Executor\n│   └── Runs the local coding agent\n│\n└── Git / State\n    └── Tracks changes and execution results\n```\n\nThe key boundary is:\n\n```\n             Remote Brain\n                  │\n               MCP API\n                  │\n          ┌───────▼───────┐\n          │  AgentBridge  │\n          └───────┬───────┘\n                  │\n              C2C PLAN\n                  │\n          ┌───────▼───────┐\n          │    Executor   │\n          └───────┬───────┘\n                  │\n             Local process\n                  │\n          ┌───────▼───────┐\n          │    Workspace  │\n          └───────────────┘\n```\n\nAgentBridge is **not another AI coding agent**.\n\nIt does not try to replace:\n\n- Gemini\n- ChatGPT\n- Claude\n- OpenCode\n- Codex\n- your editor\n- your existing development workflow\n\nInstead, it connects them.\n\nAgentBridge does not:\n\n- provide AI models;\n- provide model credits;\n- bypass subscription limits;\n- proxy model APIs;\n- upload your repository to a hosted service.\n\nIt is a **local bridge between AI reasoning and local code execution**.\n\nAgentBridge is currently focused on the Brain / Executor workflow.\n\nCurrent capabilities include:\n\n- Rust-based local MCP server\n- workspace inspection\n- secure path handling\n- Git status and diff inspection\n- structured C2C task protocol\n- task lifecycle management\n- OpenCode Executor integration\n- execution status and result reporting\n- Brain skill instructions\n- local-first architecture\n\nThe Executor abstraction is designed to support additional coding agents as the project evolves.\n\nPotential future directions include:\n\n- Additional Executor backends\n- Executor selection and routing\n- Better task orchestration\n- Parallel task execution\n- Context optimization\n- Persistent task history\n- More Brain integrations\n- IDE integration\n- Richer review workflows\n\nThe goal is not to build another monolithic AI coding product.\n\nThe goal is to make the AI coding stack **composable**.\n\nRequirements:\n\n```\nRust 1.88+\nGit\n```\n\nRun:\n\n```\ncargo fmt --check\n\ncargo clippy --all-targets --all-features -- -D warnings\n\ncargo test\n\ncargo build --release\n```\n\nAI coding does not have to be a single-agent problem.\n\nDifferent AI products have different strengths, interfaces, context windows, pricing models, and usage limits.\n\nInstead of forcing one agent to handle everything, AgentBridge treats AI coding as a distributed workflow:\n\n```\n        THINK\n          │\n          ▼\n        PLAN\n          │\n          ▼\n      EXECUTE\n          │\n          ▼\n       REVIEW\n          │\n          ▼\n         DONE\n```\n\n**Use the AI that is best at thinking.**\n\n**Use the coding agent that is best at doing.**\n\n**Use AgentBridge to connect them.**\n\nContributions are welcome.\n\nIf you want to add a new Executor, improve the MCP interface, or enhance the Brain / Executor workflow, feel free to open an issue or pull request.\n\nMIT License.", "url": "https://wpnews.pro/news/show-hn-agentbridge-let-one-ai-think-while-another-ai-writes-the-code", "canonical_source": "https://github.com/IndexFlowing/AgentBridge", "published_at": "2026-08-29 08:35:00+00:00", "updated_at": "2026-08-29 08:48:19.695948+00:00", "lang": "en", "topics": ["ai-tools", "developer-tools", "ai-agents"], "entities": ["AgentBridge", "OpenCode", "GitHub", "crates.io", "MCP"], "alternates": {"html": "https://wpnews.pro/news/show-hn-agentbridge-let-one-ai-think-while-another-ai-writes-the-code", "markdown": "https://wpnews.pro/news/show-hn-agentbridge-let-one-ai-think-while-another-ai-writes-the-code.md", "text": "https://wpnews.pro/news/show-hn-agentbridge-let-one-ai-think-while-another-ai-writes-the-code.txt", "jsonld": "https://wpnews.pro/news/show-hn-agentbridge-let-one-ai-think-while-another-ai-writes-the-code.jsonld"}}