Houmao
Run teams of autonomous CLI agents that coordinate peer to peer, without a central orchestration layer.
Project docs: https://igamenovoer.github.io/houmao/
Motivation
Houmao starts from two core motivations:
- No central orchestration layer. Most multi-agent frameworks route every turn, tool call, and handoff through one central orchestrator. That layer becomes a single point of failure, hardcodes team topology, and forces humans or external services through one bottleneck. Real teams do not share one brain: each member owns an independent workspace, inbox, and access rules, then coordinates directly with peers.
- The native CLI agent as the basic unit. Building a strong single agent from raw model APIs takes heavy engineering across tool use, file access, context compaction, and recovery. CLI coding agents already solve that single-agent problem and follow plain-language instructions like human teammates. Houmao gives each CLI agent a durable session, memory, gateway, and mailbox so agents cooperate peer to peer with no central controller.
Who this is for:
- Multi-agent system developers building peer-to-peer teams or connecting external hubs: start with Agent Loops,
examples/writer-team/, and thehoumao-mgrandhoumao-passive-serversurfaces. - Agent system end users delegating real tasks: Houmao runs independent, persistent agents that you instruct directly and let hand work to peers. Expect persistent agent threads that talk to you and each other, not a black-box orchestrator that hides the team behind one prompt.
- Houmao extenders building plugins or modifying the runtime: jump to Development, the Gateway Plugins guide, and the developer docs.
What It Is
Name Origin:
Houmao(猴毛, "monkey hair") comes from the classic novel Journey to the West. Sun Wukong plucks magical hairs that act independently in the world rather than hanging from puppet strings, and Houmao spins up autonomous helpers the same way.
Houmao builds and runs decentralized teams of CLI-based AI agents. You keep talking to your own CLI agent (claude, codex, or kimi), and Houmao lets it launch and coordinate independent peers across claude, codex, kimi, and dsh (DeepSeek Harness). (copilot is also supported as a target for installing Houmao's skills, not as an agent Houmao launches.)
The model has five load-bearing pieces:
- Managed agent: a real native agent process running in
tui,headless,service, orwebmode with its own isolated home, disk state, memory, and execution owner. - Specialist: a named role you define once, bundling a provider tool, credentials, skills, tool parameters, and a system prompt. Houmao launches it as many managed agents as you need.
- Project profile: reusable launch defaults over one specialist, such as agent name, working directory, run mode, tmux server, or mailbox bindings.
- Gateway: an optional per-agent HTTP sidecar for prompt and work-request admission, state observation, reminders, signed access control, skill or MCP updates, and plugins.
- Mailbox: a shared async messaging layer over local files or Stalwart JMAP so peers exchange work without calling each other in process.
Why This Design
Eliminate the central orchestration bottleneck. Agents do not live inside one Python object graph or depend on a resident master server. houmao-mgr is a stateless CLI that updates persisted manifests and exits, while each running agent keeps its own session, gateway sidecar, and mailbox bindings. Stopping your operator chat, one gateway, or an optional observer never takes down the rest of the team.
Use native CLI agents as the atomic unit. Houmao does not rebuild an LLM agent loop or flatten providers behind a lowest-common-denominator SDK. Each managed agent runs the real claude, codex, kimi, or dsh harness with its native tools, context management, skills, MCP servers, and system prompt intact.
Manage agents like human contractors. A specialist is the job description, written once with role, tool, credentials, and skills. The project profile is the standing assignment that sets where the agent works and how it starts. Each managed agent then works at its own desk with private notes (managed memory), an inbox, and per-agent permissions from observer up to admin.
Let your CLI agent operate the system. You do not learn a bespoke control console first. Install Houmao's skills into Claude, Codex, Kimi, or Copilot, then ask that assistant in plain language to create specialists, launch peers, inspect state, and supervise runs.
Compile workflows instead of centralizing runtime control. Start with one reviewer, then add peers that message each other directly over mail or authenticated gateways. When a workflow outgrows ad-hoc prompting, ask for a loop: a multi-agent plan compiled into contracts, skills, and mailbox wakeups so peers coordinate directly.
Architecture at a Glance
Your CLI agent operates Houmao from outside the team through stateless houmao-mgr commands and installed system skills. Once launched, each managed agent runs independently under its execution owner (local, sudo, ssh, or docker) in tui, headless, service, or web mode. A per-agent gateway sidecar handles authenticated requests, prompt queueing, state observation, and plugins without routing traffic through a central server. Peers hand work to each other horizontally through shared mailboxes or direct gateway requests, while project definitions live in a .houmao/ overlay inside your repo.
One managed agent, from the inside:
The normal experience stays conversational: your CLI agent reads Houmao's skills and invokes houmao-mgr for you. Direct CLI use and optional passive-server APIs remain supported, while this README shows the agent-driven path first.
Quick Start
Prerequisites: Python 3.11+ with uv, tmux 3.3a or later, and Linux or macOS. The preferred skill installer also needs npx. Local managed sessions use tmux-backed supervision across your default server, a shared Houmao server, or isolated sockets.
# 1. Install the CLI: `houmao-mgr --version` should print a version after this
uv tool install houmao
# 2. Verify tmux is version 3.3a or later
tmux -V
# 3. Install Houmao skills into your CLI agent: select your agent and the complete
# admin surface (welcome, admin entrypoint, shared routines, and both loop skills)
npx skills add https://github.com/igamenovoer/houmao-skills
The unqualified skills URL tracks the latest stable Houmao release. Append a matching tag such as #v3.1.0 to pin the skills to an exact houmao-mgr version. Without npx or internet access, or when you need an explicit agent home, use houmao-mgr system-skills install --tool <tool> --pack admin. System Skills CLI Reference
Now start your CLI agent from the project directory and ask:
$houmao-admin-welcome start-guided-tour
A $name line invokes an installed skill in your CLI agent's chat. If you learn only one Houmao invocation, learn this one. The welcome tour is read-only: it checks your setup and walks beginner, intermediate, and advanced paths. When you are ready to act, it hands execution to $houmao-admin-entrypoint. Both welcome and the actor entrypoints also answer help (for example, $houmao-admin-welcome help).
Your first real task looks like this:
You: $houmao-admin-entrypoint create a houmao Codex backend-reviewer specialist
for this repo, make a reusable launch profile, launch it, and ask it to
review the current working tree.
AI: Done. I initialized the Houmao project overlay, created specialist
`backend-reviewer` (tool: codex), prepared profile
`backend-reviewer-default`, launched managed agent `reviewer-1` with its
gateway attached, and sent the review prompt. The agent is running; I will
report when the turn completes.
Naming the entrypoint skill explicitly works best for the first request of a session. Later requests can drop the handle; keep the keyword houmao in the prompt so your agent routes them to Houmao skills. Underlying commands are documented in the Easy Specialists guide, the Launch Profiles guide, and the houmao-mgr CLI reference.
Provider version minimums. Claude Code requires 2.1.296+. Codex requires 0.162.1+ (0.169.0+ for
servicemode). Kimi Code requires 2.1.1+ forheadlessandtui, or 2.6.0+ forserviceandweb, and receives its composed role prompt through$KIMI_CODE_HOME/SYSTEM.mdafter${base_prompt}. DeepSeek Harness (dsh) requires 0.2.2-rc.1+ forweband 0.2.2-rc.3+ forheadlessandservice. See Launch Policy.
Agent-Driven Examples
Once an agent is running, later requests read naturally. Including houmao in the prompt keeps implicit routing reliable:
You: Use houmao to ask reviewer-1 whether the migration is safe, then show me
its current state.
AI: Sent the prompt through reviewer-1's gateway and inspected the
managed-agent state. It is running, the last turn is complete, and the
response is ready.
Per-agent gateways give operators and peers a direct interface for attributed work requests, verbatim prompts, interrupts, state and usage queries, native home refresh, Web browser entry, and signed access control. You never need a central broker to reach one agent. See the Gateway Reference, Gateway Authorization Policy, and Managed Agent Memory.
Core Concepts
| Concept | Mental model |
|---|---|
| User CLI agent | The assistant you talk to now. It has Houmao skills installed and operates Houmao from outside the managed team. |
| Specialist | A reusable role, tool, skill, and credential definition: "backend reviewer", "story writer", "researcher", "release engineer". |
| Project profile | Reusable birth-time defaults over one specialist: agent name, working directory, run mode, tmux server, credential override, mailbox bindings, and skill policy. |
| Managed agent | An independent live agent (tui, headless, service, or web) running under its execution owner with durable manifest, registry, and memory state. |
| Gateway | An optional per-agent HTTP sidecar for request queueing, state, reminders, signed role-based access (agent-observer through agent-admin), versioned file edits, and plugins. |
| Mailbox | Shared async messaging over local filesystem or online Stalwart JMAP bindings (plus optional CCCC plugin channels) without a central orchestrator. |
| Loop | A generated multi-agent plan compiled into per-agent contracts, skills, and mailbox wakeups. Your CLI agent authors, launches, and observes it from outside the execution loop. |
Project state lives under a .houmao/ overlay with specialists, profiles, credentials, projected content, mailbox roots, memory, and catalog metadata. Concrete setup routes through $houmao-admin-entrypoint project-mgr ...; layout details live in the Quickstart guide.
Agent Loops
Complex multi-agent workflows still do not require a central orchestration server. Invoke $houmao-agent-loop-pro with a complex multi-agent plan, and your CLI agent compiles it into per-agent contracts, skills, and mailbox wakeups:
You: $houmao-agent-loop-pro create a loop for this plan:
three agents should design, implement, and review a migration.
The planner decomposes the work, the builder edits code, the reviewer
checks behavior, and the team should stop only after tests and review
notes are complete.
AI: I created the loop intention, clarified the topology, generated the
execplan, prepared specialists and launch profiles, checked workspace
and mailbox/gateway posture, launched the participants, started the run,
and I will report status from outside the execution loop.
Pro loops own the schema-rich path: intention clarification, tree-loop versus generic-loop topology choice, generated contracts, harnesses, skills, validation, launch, run control, and recovery. The houmao-agent-loop-lite sibling is the lighter Markdown/direct-SQL path for smaller loops, without JSON schemas, Jinja2, or generated harnesses. Both loops require explicit invocation and an explicit <loop-dir> before any filesystem work.
The reusable examples/writer-team/ template shows a three-agent story-writing team with prompt files, a tree loop plan, a start charter, and local setup commands. A story-writer drafts and finalizes chapters, a character-designer builds profiles, and a story-reviewer checks logic and pacing while the operator watches from outside the loop.
The video below shows this writer team running: three managed agents drafting, refining, and reviewing chapters peer to peer while the operator observes.
https://github.com/user-attachments/assets/6cff608a-8b5b-4dcd-96fb-f2f0208a18b6
For the full loop-authoring workflow, see the Loop Authoring Guide and the System Skills Overview.
System Skills
Houmao ships six system skills. Each directory works at rest and installs with a standard Agent Skills tool; Houmao does not assemble skill Markdown at runtime.
| Standalone skill | Pack | Role |
|---|---|---|
houmao-admin-welcome |
admin |
Start here. Read-only first-use orientation with five guided paths; $houmao-admin-welcome start-guided-tour is the one invocation to learn first. |
houmao-admin-entrypoint |
admin |
Router for any Houmao-related request from a human operator. Informational requests stay local; operational work keeps the admin frame and requires explicit targets. |
houmao-agent-entrypoint |
agent |
Router for any Houmao-related request from a genuine managed-agent session. Operational work requires fresh identity verification first. |
houmao-shared-routines |
admin, agent |
Advanced router for parent-scoped routines, including project definitions, messaging, gateway access, versioned files, and inspection. |
houmao-agent-loop-pro |
admin, agent |
Explicit entrypoint for schema-rich loop authoring and run control. |
houmao-agent-loop-lite |
admin, agent |
Explicit entrypoint for Markdown/direct-SQL loop authoring and run control. |
Routing follows the actor: in a human-operator session your agent selects the admin entrypoint, and in a genuine managed session it selects the agent entrypoint. Welcome and both loop skills run only when invoked explicitly, and advanced users may call $houmao-shared-routines directly. The complete admin pack installs five roots (welcome, admin entrypoint, shared routines, both loops); the agent pack installs four. Pack membership, install lifecycle, route selection, and the full route map live in the System Skills Overview and the System Skills CLI reference.
For example, use $houmao-admin-entrypoint agent-access help for gateway permissions or $houmao-agent-entrypoint agent-files help for versioned skill and MCP edits on a peer gateway.
Subsystems at a Glance
| Subsystem | Description | Docs |
|---|---|---|
| Gateway and Access Policy | Per-agent FastAPI sidecar for request queues, state, reminders, SSHSIG/PyCasbin permissions, versioned skill/MCP edits, AG-UI routes, Web dashboard, and plugins | Gateway Reference, Authorization Policy |
| Mailbox and CCCC | Independent offline filesystem and online Stalwart JMAP bindings, plus optional houmao-cccc Actor chat and deferred mail |
Mailbox Reference, CCCC Integration |
| Run Modes and Execution Owners | tui, headless, service, and web sessions across local, sudo, ssh, and docker execution contexts and configurable tmux servers |
Session Lifecycle, Execution Contexts |
| TUI and Hook Tracking | Shadow terminal state machine, CLI hook observation channel, detectors, and replay engine | TUI Tracking Reference |
| Usage and Native Refresh | Normalized per-turn usage ledgers and non-restarting native skill/MCP freshness inspection and refresh | Usage Records, Native Refresh |
| Passive Server | Optional stateless, registry-driven HTTP server for discovery, observation, and gateway or mail relay without owning agent sessions | Passive Server Reference |
Demos and Examples
examples/writer-team/- Complete tree-loop template for the three-agent story-writing team shown above.examples/gateway-plugin/- Standalone gateway plugin package built on thehoumao.gateway.pluginsSDK.examples/cccc-gateway/- Live CCCC Actor chat and deferred mail attachment on an existing managed agent.examples/agent-authoring/- Portable immutable agent-definition authoring and deployment example (swe-critic).scripts/demo/minimal-agent-launch/- Recipe-backed headless launch with Claude or Codex.scripts/demo/single-agent-mail-wakeup/- Specialist plus gateway and mailbox-notifier wakeup.scripts/demo/single-agent-gateway-wakeup-headless/- Headless specialist with gateway wakeup and turn evidence.scripts/demo/shared-tui-tracking-demo-pack/- Standalone tracked-TUI capture, watch, and replay validation.
CLI Entry Points
| Entrypoint | Purpose | Status |
|---|---|---|
houmao-mgr |
Stateless operator CLI for project setup, specialists/profiles, launch, requests, gateway access, mailbox, memory, credentials, and houmao-mgr manual guides |
Active |
houmao-passive-server |
Optional registry-driven stateless API server for discovering, observing, and relaying requests to running agents | Active |
Detailed command syntax lives in the houmao-mgr CLI reference, System Skills CLI reference, agents mail reference, agents gateway reference, and internals graph reference. Use a managed launch to start a worker. If an earlier release managed a manually started session, follow the upgrade instructions.
houmao-mgr --help
houmao-mgr manual
houmao-mgr --version
houmao-passive-server --help
Full Documentation
Complete reference, guides, and developer docs are published at igamenovoer.github.io/houmao.
Development
pixi run format
pixi run lint
pixi run typecheck
pixi run test-runtime
pixi run docs-serve
License
Houmao is licensed under the Apache License, Version 2.0.
Legacy note: Houmao was originally inspired by CAO (CLI Agent Orchestrator). Retired surfaces (
houmao-cli, standalonehoumao-server, andcao_rest) are no longer supported. Usehoumao-mgr,houmao-passive-server, and decentralized per-agent workflows instead.
Metadata
Release files for Houmao 3.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| houmao-3.1.0.tar.gz | 2.7 MB | With provenance | Details for houmao-3.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| houmao-3.1.0-py3-none-any.whl | Python 3 | none | any | Details for houmao-3.1.0-py3-none-any.whl |
Total release size: 6.3 MB
Release files / houmao-3.1.0.tar.gz
| Download URL | houmao-3.1.0.tar.gz |
|---|---|
| Size | 2.7 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
62240ab3d53ff6dfe3c9bf4ddb79624f760eaaa2436a348db46efcaceee08698
|
|
BLAKE2b-256 checksum How to use checksums |
b57cf9c844e82a79ee984d758afc38c18358dfef27e40dc42eea8a4f9ba5e10f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.
Transparency logRelease files / houmao-3.1.0-py3-none-any.whl
| Download URL | houmao-3.1.0-py3-none-any.whl |
|---|---|
| Size | 3.5 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4fe6a246e41d2904123dff4f73d281f0368526b5a94d4ae4bdfe1898d4119ceb
|
|
BLAKE2b-256 checksum How to use checksums |
97bc18e3ffeba3f6f537f9300cfa07d9a3bcf837a49316ef0df0551327779e8a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.
Transparency logSecurity for Houmao 3.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for houmao-3.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.