Skip to main content

Steward

Autonomous superagent engine with tool use, multi-provider LLM failover, and deterministic cognitive architecture.

pip install steward-agent[providers]

Quick Start

# Set at least one provider key
export GOOGLE_API_KEY=...        # free tier
export MISTRAL_API_KEY=...       # free tier
export GROQ_API_KEY=...          # free tier
export OPENROUTER_API_KEY=...    # paid (DeepSeek)
export ANTHROPIC_API_KEY=...     # paid (Claude)

# Single task
steward "Fix the bug in main.py"

# Interactive REPL
steward

# Resume previous session
steward --resume "Follow up on the refactor"

# JSON output (machine-readable)
steward --output json "List all TODO comments"

# Telegram bot
pip install steward-agent[providers,telegram]
export TELEGRAM_BOT_TOKEN=...
export TELEGRAM_OWNER_ID=...
steward --telegram

Architecture

Steward follows the Sankhya-25 cognitive model — 24 deterministic infrastructure elements + 1 LLM (the Jiva). The LLM is not the driver; Buddhi (deterministic intellect) controls execution.

User Input
  → Manas (perceive intent, zero LLM)
  → Buddhi (discriminate: tool selection, stuck detection, phase tracking)
  → AgentLoop (LLM call → tool execution → evaluate outcomes)
  → Samskara (context compaction at 50%, LLM summarization at 70%)
  → Response

Key Components

Module Role
steward.agent StewardAgent — identity, config, GAD-000 compliance
steward.loop.engine AgentLoop — LLM + parallel tool execution
steward.buddhi Deterministic intellect — stuck loops, error patterns, phase tracking
steward.provider ProviderChamber — 5-cell multi-LLM failover with CircuitBreaker
steward.context SamskaraContext — deterministic context compaction
steward.tools Bash, ReadFile, WriteFile, EditFile, Glob, Grep, SubAgent

Provider Failover

ProviderChamber manages 5 LLM cells with automatic failover:

  1. Google gemini-2.5-flash (free)
  2. Mistral mistral-small-latest (free, tool-calling)
  3. Groq llama-3.3-70b (free, tool-calling)
  4. DeepSeek v3.2 via OpenRouter (paid, $0.27/MTok)
  5. Anthropic Claude (paid, highest capability)

Each cell has:

  • CircuitBreaker — skip failing providers for 30s after 5 failures
  • Cell integrity — membrane degrades on failure, regenerates daily
  • FeedbackProtocol — outcome tracking adjusts provider sorting

Safety

  • Narasimha killswitch — blocks dangerous shell commands (rm -rf, etc.)
  • Iron Dome — blocks blind file writes without prior read
  • Buddhi abort — stops stuck loops (3x identical calls, 5x consecutive errors)

Configuration

Optional .steward/config.yaml in your project root:

max_output_tokens: 4096
auto_summarize: true

Environment Variables

Variable Required Description
GOOGLE_API_KEY At least one Google Gemini API key
MISTRAL_API_KEY provider key Mistral API key
GROQ_API_KEY needed Groq API key
OPENROUTER_API_KEY OpenRouter API key (DeepSeek)
ANTHROPIC_API_KEY Anthropic API key (Claude)
TELEGRAM_BOT_TOKEN For Telegram Bot token from @BotFather
TELEGRAM_OWNER_ID For Telegram Your Telegram user ID
STEWARD_CWD Working directory override

Programmatic Usage

import asyncio
from steward import StewardAgent
from steward.provider import build_chamber

chamber = build_chamber()
agent = StewardAgent(provider=chamber)

async def main():
    async for event in agent.run_stream("List all Python files"):
        if event.type == "text_delta":
            print(event.content, end="")

asyncio.run(main())

Part of the Steward Federation

Package PyPI Role
steward-protocol pip install steward-protocol Substrate — types, protocols, primitives
steward-agent pip install steward-agent Superagent engine (this package)

License

MIT

Metadata

Release files for steward-agent 0.17.0

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

Source distribution (sdist)

Source distribution for steward-agent 0.17.0
File Size Uploaded Provenance Actions
steward_agent-0.17.0.tar.gz 153.0 kB With provenance Details for steward_agent-0.17.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for steward-agent 0.17.0
File Interpreter ABI Platform Actions
steward_agent-0.17.0-py3-none-any.whl Python 3 none any Details for steward_agent-0.17.0-py3-none-any.whl

Total release size: 255.5 kB

Release files / steward_agent-0.17.0.tar.gz

Download URL steward_agent-0.17.0.tar.gz
Size 153.0 kB
Tags Source
SHA-256 checksum
How to use checksums
1a2b9df14520c15558acb3221554b56eb8c6f9b18c840da93c4927e6d0e0cfa9
BLAKE2b-256 checksum
How to use checksums
8ba8686f07a7c10dc3335f23c35bc96026d1f15aa1ad0eece909def167be5e5e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 8, 2026.

Transparency log

Release files / steward_agent-0.17.0-py3-none-any.whl

Download URL steward_agent-0.17.0-py3-none-any.whl
Size 102.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5b852b048070ce37675f0b58ad75ca9c1cdf97acc60f0f6d497e9c56a00bd459
BLAKE2b-256 checksum
How to use checksums
cb38a3d578def354e457596573600f79c2540fa0d992ac10b42ab63246ed74b5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 8, 2026.

Transparency log

Security for steward-agent 0.17.0

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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for steward_agent-0.17.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 8, 2026.

Transparency log

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