cd /news/ai-agents/show-hn-h5i-python-python-sdk-for-pr… · home topics ai-agents article
[ARTICLE · art-61221] src=github.com ↗ pub= topic=ai-agents verified=true sentiment=↑ positive

Show HN: H5i-Python: Python SDK for Programmable Multi-Agent Orchestration

H5i-Python, a new Python SDK for the h5i orchestration engine, enables developers to define and execute multi-agent coding workflows across AI coding agents like Claude Code and Codex. The tool allows agents to work in sandboxed Git worktrees, with support for parallel implementation, mutual review, automated testing, and winner selection, aiming to create reproducible and auditable development processes.

read2 min views1 publishedJul 15, 2026
Show HN: H5i-Python: Python SDK for Programmable Multi-Agent Orchestration
Image: source

Claude Code, Codex, and other coding agents have different strengths. However, naive multi-agent orchestration such as simply launching several agents in parallel or allowing them to exchange messages does not define a reproducible development process. A real workflow must specify:

  • who implements;
  • who reviews whom;
  • when an agent must revise its work;
  • which candidates are independently tested;
  • how the winner is selected; and
  • when the selected change is applied to the original branch.

h5i-python is the Python SDK for the h5i orchestra engine. This SDK lets you define and execute multi-agent coding workflows across Claude Code, Codex, and other runtimes as ordinary Python programs.

Each agent works inside its own sandboxed Git worktree, so it cannot overwrite the original checkout or another agent's work. Agent turns produce Git-backed artifacts that can be reviewed, revised, neutrally verified, compared, selected, and applied as one auditable workflow.

Install the h5i engine:

curl -fsSL https://raw.githubusercontent.com/h5i-dev/h5i/main/install.sh | sh

Install the Python SDK from GitHub:

pip install h5i-orchestra

Create ensemble.py

inside the Git repository the agents should modify. This workflow let Claude and Codex independently implement the same task, review and improve each other’s work, and then select the better result.

from h5i.orchestra import Conductor

async def main(task):
    async with Conductor(repo=".", run="demo-task", launcher="resident") as c:
        claude = await c.hire("claude-agent", runtime="claude")
        codex  = await c.hire("codex-agent",  runtime="codex")

        claude_work, codex_work = await asyncio.gather(claude.work(task), codex.work(task))

        await c.freeze() # Seal the round, ensuring that neither agent influenced the other beforehand

        await asyncio.gather(codex.review(claude_work), claude.review(codex_work))

        await c.verify(claude_work, ["pytest", "--quiet"])
        await c.verify(codex_work, ["pytest", "--quiet"])

        verdict = await c.judge() # Select the smallest diff among the submissions that pass all tests
        print("winner:", verdict.selected_submission)

asyncio.run(main("implement quicksort in python with unit test"))

Run it as a normal Python program:

python ensemble.py

With the default launcher="resident"

, h5i

automatically starts the agent sessions through tmux

.

For example, you can program:

  • ask Claude and Codex to implement the same task independently, have them review and improve each other's work, and select the smallest candidate that passes the tests;
  • let Claude Fable and Codex GPT-5.6 Sol iteratively refine a design, then hand the agreed design to Claude Opus for implementation; or
  • repeat a Fable-design/Sol-review loop ten times, ask Opus to implement the result, and invoke Sol to repair the implementation only when Fable rejects it.

See examples/ for complete scores, including:

arena_score.py: independent arena ranking;ensemble_score.py: mutual-review ensembles;debate_then_build.py: architect-to-implementer pipelines;review_escalation.py: conditional review escalation;judge_panel_score.py: LLM judge panels;tournament.py: tournament brackets; andcustom_control_flow.py: custom Python control flow.

Apache-2.0

── more in #ai-agents 4 stories · sorted by recency
── more on @h5i 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/show-hn-h5i-python-p…] indexed:0 read:2min 2026-07-15 ·