AI Orchestration - tmux-based interactive AI CLI wrapper and multi-agent orchestration system
Project description
Orchestration Library (jleechanorg-orchestration)
Python package and CLI for AI CLI task execution (passthrough and async tmux modes).
Table of Contents
- Install from PyPI
- Verify Install and Version
- CLI Entry Points
- Primary Usage: ai_orch
- Task Dispatcher Python Interface
- Legacy: orchestrate_unified (deprecated)
- Design Summary
- Tech Stack (Summary)
- Local Development (Package Source)
Install from PyPI
python3 -m pip install jleechanorg-orchestration
Upgrade:
python3 -m pip install --upgrade jleechanorg-orchestration
Install a specific version:
python3 -m pip install "jleechanorg-orchestration==0.1.40" # omit version for latest
Verify Install and Version
python3 -m pip show jleechanorg-orchestration
ai_orch --version
CLI Entry Points
Console scripts installed by the package:
ai_orchorch(alias)
Both map to orchestration.runner:main.
Primary Usage: ai_orch
Passthrough (default)
Run the selected CLI directly and stream output to stdout:
ai_orch "explain this code"
ai_orch --agent-cli codex "print 1"
ai_orch --agent-cli gemini "fix the bug"
Async (detached tmux)
Spawn a detached tmux session and return immediately:
ai_orch --async "implement feature X"
ai_orch --async --resume "add error handling" # resume existing session for this dir
ai_orch --async --worktree "refactor auth" # create git worktree first, then async
Flags:
--agent-cli: CLI to use (claude,codex,gemini,minimax,cursor)--model: model override for supported CLIs--async: spawn detached tmux session--resume: reuse existing session for this directory (requires--async)--worktree: create git worktree before async (requires--async)
Task Dispatcher Python Interface
For programmatic multi-agent orchestration (used by automation/), use TaskDispatcher directly:
from orchestration.task_dispatcher import TaskDispatcher
dispatcher = TaskDispatcher()
agent_specs = dispatcher.analyze_task_and_create_agents(
"Fix failing tests in PR #123 and push updates",
forced_cli="claude",
)
for spec in agent_specs:
ok = dispatcher.create_dynamic_agent(spec)
print(spec["name"], ok)
Core methods
TaskDispatcher.analyze_task_and_create_agents(task_description: str, forced_cli: str | None = None) -> list[dict]TaskDispatcher.create_dynamic_agent(agent_spec: dict) -> bool
Agent spec fields used by create_dynamic_agent
name: unique agent/session nametask: full task instructionscliorcli_chain: selected CLI or fallback chainworkspace_config(optional): workspace placement/settingsmodel(optional): model override
Legacy: orchestrate_unified (deprecated)
orchestrate_unified.py is retained as a stub for import compatibility. Its orchestration logic has moved to runner.py. Use ai_orch for passthrough/async or TaskDispatcher for programmatic agent creation.
Design Summary
Full design details live in orchestration/design.md.
High-level design:
- Entry point is
ai_orch/orch(mapped toorchestration.runner:main). - Default flow is passthrough: invoke CLI directly, stream output.
- Async flow (
--async) spawns detached tmux sessions with resume and optional worktree support. TaskDispatcherremains for programmatic multi-agent orchestration (automation, PR monitors).- Coordination uses file-backed A2A/task state under
/tmp(no Redis dependency).
Tech Stack (Summary)
- Runtime: Python 3.11+
- Session/process isolation:
tmux - VCS/PR operations:
git,gh - Agent CLIs:
claude,codex,gemini,minimax,cursor-agent - Coordination: file-backed A2A/task state under
/tmp(no Redis requirement)
Detailed architecture and implementation docs:
orchestration/design.mdorchestration/A2A_DESIGN.mdorchestration/AGENT_SESSION_CONFIG.md
Local Development (Package Source)
cd orchestration
python3 -m pip install -e .
python3 -m pytest tests -q
Use editable installs only for local package development.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file jleechanorg_orchestration-0.2.3.tar.gz.
File metadata
- Download URL: jleechanorg_orchestration-0.2.3.tar.gz
- Upload date:
- Size: 204.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b2725adcc6652aa66de1ba9b88a8dcdc106266726a7b8c0892987684519f9307
|
|
| MD5 |
2e3086717d871ffec8836cd4c4b7177f
|
|
| BLAKE2b-256 |
688039972d46a233fe6170c0149b814fd8914cf385fdb8d71573d21f599c08f1
|
File details
Details for the file jleechanorg_orchestration-0.2.3-py3-none-any.whl.
File metadata
- Download URL: jleechanorg_orchestration-0.2.3-py3-none-any.whl
- Upload date:
- Size: 156.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2912a4d6bbbc73967f0004b872f5f27e781ec9ff4f6565bbb632c0a8cbd8d878
|
|
| MD5 |
e5abe2223fde087b06f7d10ca44a577e
|
|
| BLAKE2b-256 |
128a51f9949cd6aaeaedda8a573af5213188fe8515075ffd4823476a57c7c741
|