Skip to main content

Sagewai is the autonomous agent platform: describe the goal, we design the agents, run them in production, and fine-tune local models so every run gets cheaper.

Project description

Sagewai

PyPI License Python

The factory that runs itself.

Sagewai is the autonomous agent platform: describe the goal, we design the agents, run them in production, and fine-tune local models so every run gets cheaper.

Build your agent with the SDK. Hand it goals with Autopilot. Run them across teams with Fleet. Keep every secret scoped with Sealed. Watch every dollar with Observatory. Then own the model with the Training Loop.

Sagewai is early software. The sections below are explicit about what ships today, what is experimental, and what is on the v1.1 roadmap — so you know what to rely on.

Quick start

Install into an isolated environment. uv is fastest; with plain pip, create a virtualenv first — a system-wide pip install is blocked on macOS/Homebrew and many Linux distros with error: externally-managed-environment:

uv venv && uv pip install sagewai
# or:  python3 -m venv .venv && source .venv/bin/activate && pip install sagewai
sagewai --version
import asyncio
from sagewai.engines.universal import UniversalAgent

# Set an API key for your provider (OPENAI_API_KEY / ANTHROPIC_API_KEY), or use model="ollama/llama3.2".
agent = UniversalAgent(name="hello", model="gpt-4o-mini")
print(asyncio.run(agent.chat("What is Sagewai?")))

One interface reaches 100+ models — OpenAI, Anthropic, Google, Mistral, and local Ollama via LiteLLM — so you are not locked to a provider.

A pip install sagewai includes the CLI and the admin API (sagewai admin servehttp://localhost:8000, interactive docs at /docs). The web admin UI is a separate container image — run the full stack with docker compose up (see the repository).

Install extras

The base install already includes the CLI, the admin API server (FastAPI + uvicorn), and the connection protocols — sagewai admin serve works with no extras. Add extras for optional capabilities:

Extra What it adds
sagewai[memory] Milvus, NebulaGraph, Docling, tiktoken
sagewai[intelligence] Embeddings, entity extraction, language detection
sagewai[postgres] asyncpg, SQLAlchemy async, Alembic
sagewai[prometheus] Prometheus metrics exporter
sagewai[storage] S3 (boto3) and GCS archival backends
sagewai[all] Everything above

Released vs. pre-release versions

  • Stable: pip install sagewai installs the latest release from PyPI. pip never selects a pre-release/dev build unless you ask for it explicitly.
  • Release candidates are published to TestPyPI:
    pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple "sagewai==X.Y.ZrcN"
    # with uv, add: --index-strategy unsafe-best-match
    
    The --extra-index-url pulls dependencies from real PyPI while the package itself comes from TestPyPI.

Install from source

git clone https://github.com/sagewai/platform && cd platform
just bootstrap                 # uv + pnpm + workspace sync
# or just the SDK, editable, inside an activated venv:
uv pip install -e packages/sdk

What you can build with it

Sagewai is one platform with several products. Here is the honest shape of each today:

  • SDK — write an agent in a few lines of Python: multi-model providers, tools over MCP, typed memory, and guardrails in one import. Ships today.
  • Autopilot — describe a goal in plain English and it designs and runs the agent graph for you. Linear plans run end-to-end today; branched/conditional plans and automatic healing (recommendations only, not yet acted on) are in progress.
  • Fleet — run agents across your own machines with capability-based dispatch and project isolation, in Docker (default) or Kubernetes sandboxes. Ships today; durable persistence is on the roadmap.
  • Sealed — keep secrets out of your agents with per-workload identity, an external secret backend (HashiCorp Vault), and admin profile/secret controls. The identity model, the Vault backend, and the admin controls ship today; runtime enforcement — live injection, redaction, per-key ACL, mid-run revocation — is experimental and maturing.
  • Observatory — see what a run costs with OpenTelemetry traces, metrics, and a per-model / per-team spend breakdown. Ships today.
  • Training Loop — capture good production runs and fine-tune a local model from them. v1.0 ships run capture (the Curator); the closed capture → fine-tune → deploy-via-Ollama loop is on the v1.1 roadmap.

Examples

Every example is a complete, runnable file in sagewai/examples/, grouped by product.

SDK

Autopilot

Fleet

Observatory

Training Loop

Persistence

Sagewai persists all state across restarts with no setup required. On first start it creates ~/.sagewai/ (override with SAGEWAI_HOME):

Path What lives there
~/.sagewai/config/ admin-state.json, connections.json — human-readable, durable
~/.sagewai/db/sagewai.db SQLite: sessions, runs, workflow checkpoints, analytics, vector learnings
~/.sagewai/secrets/ master.key, profiles.json — mode 0700

For production scale or multi-process deployments, set SAGEWAI_DATABASE_URL=postgresql+asyncpg://… and install sagewai[postgres]. See the Persistence guide for details.

CLI

sagewai init my-project              # scaffold a new project
sagewai doctor                       # check environment health
sagewai agent run my_agent.yaml      # run an agent from config
sagewai admin serve --port 8000      # start the admin API (web UI ships separately via Docker)

Documentation

Contributing

See CONTRIBUTING.md for development setup, code style, and PR process.

License

AGPL-3.0-or-later — see LICENSE. Commercial licenses available for organisations that need an alternative to AGPL. See COMMERCIAL-LICENSE.md for details.

Built in Berlin.

Project details


Download files

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

Source Distribution

sagewai-1.0.1.tar.gz (2.5 MB view details)

Uploaded Source

Built Distribution

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

sagewai-1.0.1-py3-none-any.whl (2.0 MB view details)

Uploaded Python 3

File details

Details for the file sagewai-1.0.1.tar.gz.

File metadata

  • Download URL: sagewai-1.0.1.tar.gz
  • Upload date:
  • Size: 2.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.8 {"installer":{"name":"uv","version":"0.10.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for sagewai-1.0.1.tar.gz
Algorithm Hash digest
SHA256 7cc67657451b566a47a1f97c72c5f54c66cb991a56e5ae042108042583a20f35
MD5 9b65034a459338141487b3f6e90857b2
BLAKE2b-256 8eeed816ed0d9125fb7be8a122dba8e1276869222aa056bedb7d456dff8ba106

See more details on using hashes here.

File details

Details for the file sagewai-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: sagewai-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 2.0 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.8 {"installer":{"name":"uv","version":"0.10.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for sagewai-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0c2287bedf6243ac0bc3a2a78ae78e080cddbdca73d1ff040e0749ab84fffa39
MD5 dca496e27ba8d038e2bb360eacc8710e
BLAKE2b-256 8abde23a48c4f27a81d9fc8682ce8626734ea73788595a6dd4e330174636d2eb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page