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 indusagi console script:

indusagi --help                      # usage
indusagi --version                   # indusagi 0.1.1
indusagi -p "explain this repo"      # one-shot: print the answer and exit
indusagi --json                      # NDJSON wire protocol over stdio (for hosts)
indusagi                             # interactive Textual TUI (needs the [tui] extra)
indusagi auth login                  # OAuth + PKCE login
indusagi 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

MIT. See NOTICE and CREDITS.md.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

indusagi-0.1.1.tar.gz (806.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

indusagi-0.1.1-py3-none-any.whl (861.3 kB view details)

Uploaded Python 3

File details

Details for the file indusagi-0.1.1.tar.gz.

File metadata

  • Download URL: indusagi-0.1.1.tar.gz
  • Upload date:
  • Size: 806.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for indusagi-0.1.1.tar.gz
Algorithm Hash digest
SHA256 323bfff0a8693dff2e010e3fd86cf7c256a5f4c23ba63157864e4f27dd5fe4ff
MD5 7767a9f088eb55fd9bc34ef7280cec6f
BLAKE2b-256 331be056c641801101f2154b659bc7ab1fa0206fe2e58e1bd7e75eb2efe5ddf6

See more details on using hashes here.

File details

Details for the file indusagi-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: indusagi-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 861.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for indusagi-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d9900605f1cf4ea6c2979c0d118bce3578b88734c1f0b55f2d9b532521e2721a
MD5 fda7fd71936b05e36c2d6d885906f460
BLAKE2b-256 a548c7e12305d8e84791c59cd39160f8bb24b957d2245bf6c6037f56b4408f66

See more details on using hashes here.

Release history Release notifications | RSS feed

0.1.5

2 files

0.1.3

2 files

0.1.2

2 files

This release

0.1.1 This release

2 files

0.1.0

2 files

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