DEV Community

yunchuan liu
yunchuan liu

Posted on

AgentHub: A Multi-Model Terminal Workspace for Coding Agents

I have been building AgentHub, an open-source terminal workspace for real coding-agent workflows.

GitHub: https://github.com/hoteye/AgentHub

Linux/macOS install:

curl -fsSL https://raw.githubusercontent.com/hoteye/AgentHub/main/scripts/install_agenthub_cli.sh | bash
Enter fullscreen mode Exit fullscreen mode

Run it:

agenthub-cli
agenthub-cli --headless --prompt "/provider"
Enter fullscreen mode Exit fullscreen mode

Why I Built It

Most AI coding tools are useful for small tasks: ask a question, edit a file, explain an error, generate a test.

Real engineering work is different.

A real task often includes:

  • understanding an unfamiliar repository
  • reading and searching files
  • running shell commands
  • applying patches
  • running tests
  • fixing failures from test output
  • switching models for different stages
  • splitting work into smaller subtasks
  • reviewing child-agent changes
  • resuming after interruption

That is no longer just a chat problem. It needs a runtime that can hold context, coordinate tools, apply safety policies, restore sessions, and manage multiple agents.

AgentHub is my attempt to build that runtime.

Codex-Style Engineering Workflow as the Base

AgentHub keeps the practical parts of a Codex-style terminal coding workflow:

  • repository-aware context from the current working directory
  • file read and search tools
  • shell execution
  • patch application
  • test feedback loops
  • tool-calling execution
  • approval policies for risky actions
  • sandbox policies for execution boundaries
  • persistent threads and resume support
  • sidecar-style execution for isolated tabs or subtasks

The goal is not to build another general chat interface. The goal is to let agents do real work inside a repository, with enough structure to make that work recoverable and reviewable.

Multi-Model by Design

No single model is best for every step of a software task.

One model may be better at architecture analysis. Another may be better at precise code edits. A cheaper model may be good enough for batch documentation cleanup or repetitive subtasks.

AgentHub supports multiple providers behind one runtime, including OpenAI, Anthropic, GLM, DeepSeek, and compatible APIs.

Common commands look like this:

/provider
/providers
/model gpt-5.4 high
Enter fullscreen mode Exit fullscreen mode

When provider calls fail, AgentHub surfaces diagnostics such as the active provider, model, config source, and latest exception. That makes it easier to debug API keys, base URLs, subscriptions, and regional restrictions.

Resumable Long-Running Work

Long coding tasks should not lose their working state just because the terminal closes or the task continues tomorrow.

AgentHub stores threads and supports resume commands:

/resume <thread_id>
/resume_last
/resume_path <rollout_path>
Enter fullscreen mode Exit fullscreen mode

The important part is that visible context, tool results, file analysis, and task progress can continue from the breakpoint.

For large refactors, test repair, code review, and documentation cleanup, this is a core feature rather than a convenience.

Delegated Agents and Background Teammates

Multi-agent workflows are not just about launching many agents at once. The useful pattern is scoped work with clear boundaries.

For example, a large-file refactor can be handled like this:

  1. The main agent analyzes the file and identifies boundaries.
  2. Subtasks are assigned to child agents or background teammates.
  3. Each child handles a small, verifiable scope.
  4. The main agent reviews diffs.
  5. The runtime runs the smallest useful test gate.
  6. The final change is committed only after review.

AgentHub supports delegated agents and background tasks with commands such as:

/spawn_agent ...
/send_input <agent_id> <message>
/wait_agent <agent_id>
/close_agent <agent_id>
/background_teammate ...
/background_task_status <task_id>
Enter fullscreen mode Exit fullscreen mode

The main agent remains responsible for integration and quality. Child agents handle bounded work.

Plugins and Automation

AgentHub has a plugin-oriented architecture. Domain-specific capabilities should live in plugins instead of being hardcoded into the host.

Plugins can provide:

  • slash commands
  • tools
  • external system connectors
  • gateway/webhook integrations
  • domain-specific workflows

For example, a GitHub plugin can handle issues, comments, labels, workflow dispatch, and approval-gated write actions.

AgentHub also supports headless and server-style execution, which makes it useful outside the interactive TUI:

agenthub-cli --headless --prompt "/provider"
agenthub-cli --headless --prompt "list current directory" --json
Enter fullscreen mode Exit fullscreen mode

Where This Can Go

Local terminal agents are useful, but I think the same architecture can grow into cloud or team-level agent workspaces:

  • a frontend for orchestration
  • backend sidecar/worker containers
  • isolated task environments
  • centralized provider credentials
  • approval and audit logs
  • multi-agent scheduling
  • plugins for internal systems

That is the direction I am exploring with AgentHub.

Who It Is For

AgentHub is currently most useful if you:

  • already use AI coding tools heavily
  • work on real repositories, not isolated snippets
  • need resumable long-running task context
  • want to combine multiple model providers
  • want delegated agents for scoped subtasks
  • care about approvals, sandboxing, and auditability
  • want both interactive TUI and headless automation

If you only need occasional code answers, a chat tool is enough. If you want agents to participate in repository-level engineering workflows, AgentHub may be a better fit.

Project Links

GitHub: https://github.com/hoteye/AgentHub

Latest release: https://github.com/hoteye/AgentHub/releases/tag/cli-v0.1.11

Install on Linux/macOS:

curl -fsSL https://raw.githubusercontent.com/hoteye/AgentHub/main/scripts/install_agenthub_cli.sh | bash
Enter fullscreen mode Exit fullscreen mode

Windows users can download the release archive and run:

.\agenthub-cli.exe
.\agenthub-cli.exe --headless --prompt "/provider"
Enter fullscreen mode Exit fullscreen mode

Feedback, issues, and PRs are welcome.

Top comments (0)