indusagi (Python rebuild)
Python rebuild of indusagi — a terminal-first AI coding agent framework.
Ported from the TypeScript implementation in ../indus-rebuild/ following the
conversion plan in ../indus-rebuild/PYTHON_PORT_PLAN/.
Status: 0.1.0 — all plan milestones (M0-M8) built; 749 tests passing. See PARITY_REPORT.md for the item-by-item audit against the TypeScript build and CHANGELOG.md for the release summary.
Layout
src/indusagi/
├── _internal/ # CancelToken (AbortSignal replacement), env registry
├── llmgateway/ # zero-SDK LLM provider gateway (httpx wire connectors)
├── tracing/ # observability: segments, sinks, redaction, sampling
├── runtime/ # pure-FSM agent runtime: reducer, conductor, sessions
├── capabilities/ # built-in tool suite over Fs/Shell seams
├── interop/ # MCP bridge (official `mcp` SDK)
├── connectors/ # Composio SaaS connectors
├── swarm/ # file-backed multi-agent crew layer
├── smithy/ # agent-builder meta-tool
├── shell_app/ # CLI: print / NDJSON wire / REPL runners, OAuth login
├── tui/ # terminal primitives: keys, text width, fuzzy, bindings
├── react_ink/ # Textual widgets (markdown stream, diff view, dialogs)
├── ui_bridge/ # runtime ↔ TUI projection + interactive Textual app
├── react_host/ # backend-pinning shim (TS react-host collapsed)
└── ai/ agent/ mcp/ memory.py # compat facades (thin shims over the core)
Install
Not yet on PyPI (publish pending). Install from the built wheel:
pip install dist/indusagi-0.1.0-py3-none-any.whl
Extras:
indusagi[tui]— Textual + Pygments + markdown-it-py; required for the interactive terminal UI.indusagi[mcp]— officialmcpSDK; required for--mcpserver mounting and theindusagi.interop/indusagi.mcpsurfaces.
pip install "dist/indusagi-0.1.0-py3-none-any.whl[mcp,tui]"
The core (gateway, runtime, tools, CLI print/wire modes) needs only httpx, pydantic, wcwidth, python-ulid, and regex.
Development
Python >= 3.11 (developed and verified on 3.13).
python3.13 -m venv .venv
.venv/bin/pip install -e ".[dev,mcp,tui]"
Test:
.venv/bin/pytest # 749 tests; network-free (mock connector, respx, Textual Pilot)
Gates (run from the repo root; both must pass before publishing):
.venv/bin/python scripts/lineage_scan.py # lineage gate: exits 1 if any pi-mono lineage marker survives in src/indusagi (compat shims excluded)
npx -y pyright@1.1.405 # typecheck gate: 0 errors/0 warnings over the pyrightconfig.json ratchet scope (expand include as packages come clean)
Build sdist + wheel (hatchling):
.venv/bin/pip install build
.venv/bin/python -m build # → dist/indusagi-0.1.0.tar.gz + .whl
The wheel ships py.typed, the model-catalog data
(llmgateway/catalog/models_data.json), the smithy knowledge pack
(smithy/knowledge/manifest.json + guides), and NOTICE/CREDITS under
dist-info/licenses/.
Run
indusagi --help # usage; exit 0
indusagi --version # "indusagi 0.1.0"
indusagi -p "explain this repo" # one-shot print mode to stdout
indusagi --json # NDJSON wire mode over stdio (for hosts)
indusagi # interactive TUI in a terminal (needs [tui] extra)
indusagi auth login # OAuth + PKCE; writes ~/.pindusagi/auth.json
indusagi auth status # reads this build's own auth.json
Flags also include --model/-m, --interactive/-i, --cwd, --system,
--no-tools, and repeatable --mcp <server> — see indusagi --help. With a
prompt and no TTY it answers once and exits; attended with no prompt it opens
the interactive loop.
The TUI (Textual, alternate screen) provides streaming markdown, structured
diff and tool cards, twelve dialogs (model/session/theme/login/...), footer
token/cost/context stats, Esc to abort a run and Ctrl-C to exit. API keys are
read from the usual provider env vars (e.g. ANTHROPIC_API_KEY); state lives
under ~/.pindusagi/ (override with INDUSAGI_HOME). This is the Python
build's own state directory — deliberately separate from the TypeScript
installs' ~/.indusagi, which this build never reads or writes (owner
decision, 2026-06-10).
Licensing
MIT. See NOTICE and CREDITS.md (both included in the wheel).
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 indusagi-0.1.0.tar.gz.
File metadata
- Download URL: indusagi-0.1.0.tar.gz
- Upload date:
- Size: 806.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.13.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3e1c0c26a3a00b43b6e9ee49d407c9c805c8c1d04b2758cac89d30c700b1e8d0
|
|
| MD5 |
aa9e522b542c1193881467447501892d
|
|
| BLAKE2b-256 |
b67e5bca7babba7df56a20044c85839c50d032cf67f5a59cb8b5ccc62671a0ad
|
File details
Details for the file indusagi-0.1.0-py3-none-any.whl.
File metadata
- Download URL: indusagi-0.1.0-py3-none-any.whl
- Upload date:
- Size: 861.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.13.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
16d071b165acc5df16b43e3da69e3e5b5a003040f5a2e4756ed40bd4d079a5c9
|
|
| MD5 |
c2147c20f99b8824e2e787e6fe583025
|
|
| BLAKE2b-256 |
d8a33735dd066aabf227578f0b6a72ad50753648348fdb99b2d11b94daf3c521
|