{"slug": "show-hn-h5i-python-python-sdk-for-programmable-multi-agent-orchestration", "title": "Show HN: H5i-Python: Python SDK for Programmable Multi-Agent Orchestration", "summary": "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.", "body_md": "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:\n\n- who implements;\n- who reviews whom;\n- when an agent must revise its work;\n- which candidates are independently tested;\n- how the winner is selected; and\n- when the selected change is applied to the original branch.\n\nh5i-python is the Python SDK for the [h5i](https://github.com/h5i-dev/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.\n\nEach 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.\n\nInstall the [ h5i](https://github.com/h5i-dev/h5i) engine:\n\n```\ncurl -fsSL https://raw.githubusercontent.com/h5i-dev/h5i/main/install.sh | sh\n# cargo install --git https://github.com/h5i-dev/h5i h5i-core\n```\n\nInstall the Python SDK from GitHub:\n\n```\npip install h5i-orchestra\n# pip install \"git+https://github.com/h5i-dev/h5i-python.git\"\n```\n\nCreate `ensemble.py`\n\ninside 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.\n\n``` python\nfrom h5i.orchestra import Conductor\n\nasync def main(task):\n    async with Conductor(repo=\".\", run=\"demo-task\", launcher=\"resident\") as c:\n        claude = await c.hire(\"claude-agent\", runtime=\"claude\")\n        codex  = await c.hire(\"codex-agent\",  runtime=\"codex\")\n\n        # Have both agents implement the task independently and in parallel\n        claude_work, codex_work = await asyncio.gather(claude.work(task), codex.work(task))\n\n        await c.freeze() # Seal the round, ensuring that neither agent influenced the other beforehand\n\n        # Have each agent review the other's work\n        await asyncio.gather(codex.review(claude_work), claude.review(codex_work))\n\n        # Verify each submission in a fresh, neutral sandbox\n        await c.verify(claude_work, [\"pytest\", \"--quiet\"])\n        await c.verify(codex_work, [\"pytest\", \"--quiet\"])\n\n        verdict = await c.judge() # Select the smallest diff among the submissions that pass all tests\n        print(\"winner:\", verdict.selected_submission)\n\nasyncio.run(main(\"implement quicksort in python with unit test\"))\n```\n\nRun it as a normal Python program:\n\n```\npython ensemble.py\n```\n\nWith the default `launcher=\"resident\"`\n\n, `h5i`\n\nautomatically starts the agent sessions through `tmux`\n\n.\n\nFor example, you can program:\n\n- 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;\n- let Claude Fable and Codex GPT-5.6 Sol iteratively refine a design, then hand the agreed design to Claude Opus for implementation; or\n- 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.\n\nSee [examples/](/h5i-dev/h5i-python/blob/main/examples) for complete scores, including:\n\n[arena_score.py](/h5i-dev/h5i-python/blob/main/examples/arena_score.py): independent arena ranking;[ensemble_score.py](/h5i-dev/h5i-python/blob/main/examples/ensemble_score.py): mutual-review ensembles;[debate_then_build.py](/h5i-dev/h5i-python/blob/main/examples/debate_then_build.py): architect-to-implementer pipelines;[review_escalation.py](/h5i-dev/h5i-python/blob/main/examples/review_escalation.py): conditional review escalation;[judge_panel_score.py](/h5i-dev/h5i-python/blob/main/examples/judge_panel_score.py): LLM judge panels;[tournament.py](/h5i-dev/h5i-python/blob/main/examples/tournament.py): tournament brackets; and[custom_control_flow.py](/h5i-dev/h5i-python/blob/main/examples/custom_control_flow.py): custom Python control flow.\n\nApache-2.0", "url": "https://wpnews.pro/news/show-hn-h5i-python-python-sdk-for-programmable-multi-agent-orchestration", "canonical_source": "https://github.com/h5i-dev/h5i-python", "published_at": "2026-07-15 22:25:13+00:00", "updated_at": "2026-07-15 22:55:42.382242+00:00", "lang": "en", "topics": ["ai-agents", "developer-tools", "artificial-intelligence"], "entities": ["h5i", "Claude Code", "Codex", "h5i-python"], "alternates": {"html": "https://wpnews.pro/news/show-hn-h5i-python-python-sdk-for-programmable-multi-agent-orchestration", "markdown": "https://wpnews.pro/news/show-hn-h5i-python-python-sdk-for-programmable-multi-agent-orchestration.md", "text": "https://wpnews.pro/news/show-hn-h5i-python-python-sdk-for-programmable-multi-agent-orchestration.txt", "jsonld": "https://wpnews.pro/news/show-hn-h5i-python-python-sdk-for-programmable-multi-agent-orchestration.jsonld"}}