Introducing Sagewai

Sagewai is an open-source platform for building, running, and governing AI agents on your own infrastructure. It gives you a Python SDK for building agents, a control plane for managing them, cost-aware routing across LLM providers, and full observability — all under AGPL-3.0, with no feature gates.

This post is the April 2026 launch announcement. If you're new to Sagewai, the Quickstart is the fastest way in.

The problem

If your team uses AI coding tools — Claude Code, Cursor, Codex — or builds agents into your product, three problems show up fast:

  • No visibility into spend. Token bills arrive at the end of the month with no breakdown by team, project, or task.
  • No control over routing. Every request hits whatever model the tool defaults to, even when a cheaper model would do the job.
  • No governance. Agents get built ad-hoc, scattered across notebooks and scripts, with no shared registry, audit trail, or approval flow.

Sagewai is a single platform that addresses all three.

What you get

A Python SDK for building agents

Build agents in a few lines, with support for 100+ models, custom tools, persistent memory, guardrails, and durable workflows.

import asyncio
from sagewai import UniversalAgent

agent = UniversalAgent(name="assistant", model="gpt-4o")
print(asyncio.run(agent.chat("Analyze our Q1 results")))

See the SDK quickstart for the full hello-world flow.

A control plane for governing agents

Store, version, and discover agents across your organization. Add approval workflows, audit trails, and lifecycle management. Multi-tenant from day one — every resource is project-scoped.

Cost-aware LLM routing

Point Claude Code, Cursor, or Codex at the Sagewai proxy. Each request is classified by complexity and routed to the cheapest model that can handle it:

  • Simple edits (typos, imports) go to a small model like Haiku
  • Medium tasks (refactoring) go to a mid-tier model like Sonnet
  • Complex work (architecture, multi-file changes) goes to Opus

Developers don't change their workflow. The org saves money on every request.

Observability built in

Cost per model, per user, per team. OpenTelemetry traces, Prometheus metrics, and an audit log for every agent run. Plug it into Grafana or your existing observability stack.

Local fine-tuning

Use your agents to collect training data, fine-tune a domain-specific model with Unsloth, then serve it locally through the same proxy. Pay $0 per token for the workloads you've made cheap enough to bring in-house.

How Sagewai handles credentials

Agents need API keys — for LLM providers, for the tools they call, sometimes for downstream customer systems. Sagewai keeps these out of agent process memory:

  • Customer credentials live in encrypted profiles. They're decrypted only when a sandbox starts, injected as environment variables for that run, and scrubbed when the sandbox is released.
  • Operator credentials (the keys you pay with) stay on the worker host. They're never visible to agent code or to customer-tier sandboxes.

You're responsible for the master encryption key (back it up, rotate it on a schedule that fits your compliance posture) and for choosing which credentials belong in which tier. The Security guide walks through the setup.

Open source, no feature gates

Everything in this post is free under AGPL-3.0 — the SDK, the control plane, the proxy, the observability stack, all 40+ tool connectors, the full admin dashboard. No "open core" carve-outs.

Paid tiers exist for organizations that want managed hosting, additional compliance features, or a commercial license alternative to AGPL. The OSS build is the same code, with no artificial limits.

Get started

pip install sagewai

Three good entry points, depending on what you want first:

  • Quickstart (15 min) — install the SDK, create an encrypted credential profile, and run an agent inside an isolated sandbox.
  • Minimal setup — a hello-world agent with no sandbox, no profile, no admin server.
  • Examples — runnable demos covering memory, fleet workers, fine-tuning, and the routing proxy.

What's next

  • PyPI release (v0.1.0)
  • VS Code extension on the Marketplace
  • Official client wrappers for TypeScript, Go, Rust, and 14 other languages
  • Community Discord

We built Sagewai because agent infrastructure should be owned, not rented. Try it and tell us what breaks.

— The Sagewai team