Skip to main content

indusagi

A terminal-first AI coding-agent framework for Python. A zero-SDK LLM gateway, a pure-FSM agent runtime, a built-in tool suite, MCP interop, a multi-agent crew layer, and a Textual terminal UI — all in one importable package with a py.typed marker and no heavy dependencies in the core.

pip install indusagi

For the interactive terminal UI and MCP server mounting, install the extras:

pip install "indusagi[mcp,tui]"

The core (gateway, runtime, tools, print/wire CLI modes) needs only httpx, pydantic, wcwidth, python-ulid, and regex. The tui extra adds Textual, Pygments, and markdown-it-py; the mcp extra adds the official mcp SDK.

Requires Python 3.11+.

Use it as a library

import asyncio
from indusagi.agent import Agent

async def main():
    agent = Agent(model="claude-sonnet-4-5")   # reads ANTHROPIC_API_KEY from env
    reply = await agent.prompt("say hello in five words")
    print(reply)

asyncio.run(main())

Or talk to the model gateway directly (zero provider SDKs, just httpx wire connectors):

from indusagi.llmgateway import complete, get_card

reply = await complete("claude-sonnet-4-5", conversation, options)
card = get_card("claude-sonnet-4-5")          # context window, pricing, etc.

Every subsystem is importable on its own:

import indusagi.runtime        # the agent FSM, sessions, compaction
import indusagi.capabilities   # the built-in tool suite
import indusagi.interop        # MCP client/server bridge
import indusagi.swarm          # file-backed multi-agent crews
import indusagi.smithy         # the agent-builder

Use it as a CLI

The package installs the pindusagi console script:

pindusagi --help                      # usage
pindusagi --version                   # indusagi 0.1.2
pindusagi -p "explain this repo"      # one-shot: print the answer and exit
pindusagi --json                      # NDJSON wire protocol over stdio (for hosts)
pindusagi                             # interactive Textual TUI (needs the [tui] extra)
pindusagi auth login                  # OAuth + PKCE login
pindusagi auth status                 # show stored credentials

Flags include --model/-m, --interactive/-i, --cwd, --system, --no-tools, and repeatable --mcp <server>. With a prompt and no TTY it answers once and exits; attended with no prompt it opens the interactive loop. API keys come from the usual provider env vars (ANTHROPIC_API_KEY, OPENAI_API_KEY, …); state lives under ~/.pindusagi/ (override with INDUSAGI_HOME).

The TUI provides streaming markdown, structured diffs and tool cards, twelve dialogs (model / session / theme / login / …), a footer with token/cost/context stats, Esc to abort a run, and Ctrl-C to exit.

What's inside

indusagi/
├── llmgateway/     # zero-SDK LLM provider gateway (httpx wire connectors)
├── 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
├── tracing/        # observability: segments, sinks, redaction, sampling
├── shell_app/      # CLI: print / NDJSON wire / REPL runners, OAuth login
├── tui/            # terminal primitives: keys, width, fuzzy, keybindings
├── react_ink/      # Textual widgets (markdown stream, diff view, dialogs)
├── ui_bridge/      # runtime ↔ TUI projection + interactive Textual app
└── ai/ agent/ mcp/ memory   # high-level facades over the core

849 models across 24 providers ship in the catalog (indusagi.llmgateway): Anthropic, OpenAI, Google, Bedrock, NVIDIA, Kimi, Ollama, OpenRouter, and more.

Supported providers

API keys are read from the standard env vars. Anthropic, OpenAI, Google (Generative AI + Vertex), Azure OpenAI, NVIDIA, Kimi, and Ollama have first-party wire connectors; hundreds more models route through the OpenAI-compatible connector. OAuth login is supported for Anthropic and OpenAI.

Development

python3.11 -m venv .venv
.venv/bin/pip install -e ".[dev,mcp,tui]"
.venv/bin/pytest            # 1,349 tests; network-free (mock connector, respx, Textual Pilot)

The package ships py.typed, the model-catalog data, and the agent-builder knowledge pack inside the wheel.

License

AGPL-3.0-only. See LICENSE, NOTICE and CREDITS.md.

Metadata

Release files for indusagi 0.1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for indusagi 0.1.5
File Size Uploaded Provenance Actions
indusagi-0.1.5.tar.gz 862.4 kB Without provenance Details for indusagi-0.1.5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for indusagi 0.1.5
File Interpreter ABI Platform Actions
indusagi-0.1.5-py3-none-any.whl Python 3 none any Details for indusagi-0.1.5-py3-none-any.whl

Total release size: 1.7 MB

Release files / indusagi-0.1.5.tar.gz

Download URL indusagi-0.1.5.tar.gz
Size 862.4 kB
Tags Source
SHA-256 checksum
How to use checksums
5a000e809fc515178c1c8defb2afae03a221dba7d5dba5df7776ebe94ed32788
BLAKE2b-256 checksum
How to use checksums
38d680a73413c931db6405b0214cd63bebbb25a46741992b00710c50bc51fe05
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.13

Release files / indusagi-0.1.5-py3-none-any.whl

Download URL indusagi-0.1.5-py3-none-any.whl
Size 862.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
62481b9a9f8eb429833fe643b042bed8c5838eb76a5ec4f76e32ee29655bcf17
BLAKE2b-256 checksum
How to use checksums
c504b510eed22e6be5b97c9055f2618cea484638c2a2658b49a1641b782b6d92
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.13

Security for indusagi 0.1.5

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A 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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page