Agent Hub: one chat for Codex, Claude and OpenCode
Agent Hub brings 18 local AI CLI tools including Codex, Claude Code, and OpenCode into one 127.0.0.1 browser chat with file-based host delegation.
In short
Developers using multiple local AI CLI agents · 18 built-in AI CLI tools supported · Open source under MIT License on GitHub · Run python3 hub.py with Python 3.8+
By Dillip Chowdary • Dec 05, 2026 • Source: github.com

At a glance
- Who it is for
- Developers using multiple local AI CLI agents
- The number
- 18 built-in AI CLI tools supported
- Available
- Open source under MIT License on GitHub
- What to do
- Run python3 hub.py with Python 3.8+
- Security
- Listens on 127.0.0.1 without shell execution
- Testing
- 8 fault-tolerance assertion tests pass
In this post
Developer zzy35150310 released Agent Hub on GitHub, an open-source local web workspace that connects 18 built-in AI command-line tools inside a single browser window.
The tool is built for developers who run Codex, Claude Code, OpenCode, Qwen, or CodeBuddy side by side and want to stop switching terminal tabs or copying text between windows. Readers can clone the MIT-licensed repository and launch the interface locally with Python 3.8+ and zero external dependencies.
01Group chat and host delegation
Agent Hub offers two interaction modes in one browser interface. In group chat mode, mentioning an agent directs a prompt to that specific tool, while clicking Everyone runs all active agents in parallel and displays their answers side by side. In host mode, the user speaks only to one designated host agent, which decides whether to answer directly or split the work into dependent subtasks for other agents before summarizing the final result.
Unlike wrapper chat apps that pass plain strings over HTTP APIs, Agent Hub runs each member as a real operating system process with its own context, tools, and shell permissions. All agents share the same run directory on disk, so one tool can write a file that the next tool imports, modifies, or executes directly.
In a recorded three-agent benchmark building a currency tool, Claude wrote fx.py in 149 seconds, OpenCode read fx.py and wrote cli.py in 127 seconds while importing the first script's functions, and Codex read cli.py to write USAGE in 123 seconds. The project's documentation notes that calling an API only accesses a model, whereas calling a CLI invokes an agent that can read files, run code, and use tools.
02Eighteen built-in CLI agent integrations
Starting the server requires Python 3.8+ and zero third-party packages. Running python3 hub.py launches the local server and opens a browser window automatically, while optional flags cover custom setup and discovery tasks.
- Change port Pass python3 hub.py --port 8790 to bind the interface to another local port.
- List detected agents Run python3 hub.py --list to see which built-in CLI tools are available on the machine.
- Scan PATH Use python3 hub.py --scan to search PATH for AI-like CLI binaries not yet connected.
- Set host Run python3 hub.py --host claude to designate the default host agent at startup.
- Generate config Execute python3 hub.py --init-config to create a template for custom agent definitions.
Agent Hub detects 18 built-in CLI tools automatically when their commands are runnable, using an ALIASES table to match alternate binary names such as cursor with cursor-agent and claude with claude-code.
| Agent | Invocation command | Role or behavior |
|---|---|---|
| codex | codex exec -s workspace-write --skip-git-repo-check | Coding agent with workspace writes |
| claude / qwen / codebuddy / gemini / cursor-agent / copilot | <binary> -p | Prompt-mode coding and chat CLIs |
| opencode | opencode run | Coding CLI in run mode |
| aider | aider --message --yes | Automated git-aware code editor |
| crush / goose / amp / droid / iflow / openclaw | Respective run modes | Multi-vendor coding and agent CLIs |
| autoglm | autoglm run --task | Doubao browser agent for web tasks |
| sgpt / tgpt / llm | Standard non-interactive CLI | Pure question-and-answer utilities |
Advertisement
Tech Pulse Daily
Get tomorrow's pulse first
Join engineers who read Tech Pulse before stand-up. Free, weekday mornings.
Users can add unlisted tools in ~/.agent-hub/agents.json with label, color, cmd, tags, and timeout fields, defaulting to 600 seconds. Any tool that accepts a non-interactive prompt via {prompt} or trailing arguments works in the hub.
03Host planning and fault tolerance
The host-mode interface pairs a numbered task list on the left with a detail pane on the right, placing the final summary at the bottom. When a user sends a request, the host outputs a JSON plan containing a reasoning summary and a tasks array where each item specifies id, to, task, and depends.
Tasks without dependencies execute in parallel, while dependent tasks wait until upstream agents write T1.md, T2.md, and subsequent files to disk so downstream prompts receive those outputs. The host also evaluates whether delegation is worthwhile; when asked to write a palindrome-checking function, it declined to split a single-file task and returned the code directly.
The scheduler includes six fault-tolerance safeguards verified by eight passing assertion tests. It accepts depends, depends_on, deps, after, and Chinese dependency keys, auto-numbers missing task IDs as t1, t2, and t3, strips nonexistent dependency IDs, breaks dependency cycles instead of hanging, falls back to the host when an agent is missing, and batches multiple tasks assigned to the same agent so they do not collide in the working directory.
04Run artifacts and local security
Every orchestrated run saves its complete state inside ~/.agent-hub/runs/<id>/. That folder stores plan.raw.txt for inspecting the host's raw JSON plan, individual T1.md and T2.md task logs, board.json for task-board state, FINAL.md for the synthesized answer, and actual output files such as fx.py, cli.py, and README.md.
For security, the server binds only to 127.0.0.1 so external networks cannot reach it without firewall configuration. Commands execute via argument lists rather than a shell to block command injection, each process has a timeout to kill hung runs, and agents work strictly inside their assigned run folder.
Note: Codex requires the -s workspace-write flag to modify files in the shared run directory, because its default read-only sandbox breaks file-based handoffs between agents.
05Known limits and HTTP endpoints
Agent Hub documents five current limitations across execution and authentication. A single agent runs only one task at a time rather than handling concurrent tasks, responses appear only after completion without token streaming, and every invocation starts a fresh process without persistent sessions, relying on prompts to carry context.
Additionally, tools such as CodeBuddy and Qwen surface raw login errors if unauthenticated, while AutoGLM is wired in but untested to avoid opening browser windows unexpectedly during work. The local backend exposes five HTTP endpoints under the MIT License: GET /api/agents, POST /api/ask, POST /api/orchestrate, GET /api/run?id=<id>, and GET /api/runs.
Frequently asked questions
What does Agent Hub require to run locally?
Agent Hub requires Python 3.8+ and has zero external dependencies. Running python3 hub.py starts the server on 127.0.0.1 and opens the web interface automatically.
How do agents share work in Agent Hub?
Each agent runs as a separate CLI process inside the same ~/.agent-hub/runs/ / directory. One agent writes files such as fx.py or T1.md to disk, and downstream agents read or import those files directly.
Which AI CLI tools work out of the box?
Agent Hub includes 18 built-in tools, including codex, claude, opencode, qwen, codebuddy, gemini, cursor-agent, copilot, aider, autoglm, sgpt, tgpt, and llm. Users can also add custom non-interactive CLIs in ~/.agent-hub/agents.json.
Does Agent Hub support streaming responses or persistent sessions?
No, responses appear only after an agent finishes its full output, and each call starts a new process without a persistent session. Context is passed between steps through prompts and saved files.
Sources
Author
Dillip Chowdary
Writes Tech Bytes coverage of AI, engineering, and the tools that actually ship. Editor of Tech Pulse Daily.
Related on Tech Bytes
Advertisement