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.

Try this tonight:

Train your own model in a weekend.

Capture your agent runs, fine-tune a small model on them, deploy it locally via Ollama.

Iron Man HUD landing view — live agent graph, 24 workers across acme-prod, globex-prod, initech-prod tenants with capability labels and dispatch state

Live agent HUD — 24 workers across 3 tenants, every mission and dispatch in real time.

Production-ready, not production-promised.

The dashboards Sagewai ships with — driven by Example 43 against the real admin backend, on one docker compose up.

Iron Man HUD landing view — live agent graph, 24 workers across acme-prod, globex-prod, initech-prod tenants with capability labels and dispatch state
Live agent HUD — 24 workers, 3 tenants, every dispatch in real time.
Grafana full board — system health, HTTP performance, OTel pipeline health, and structured logs panels populated by Example 43
Grafana board — system health, HTTP, OTel pipeline, structured logs.
Iron Man HUD agent inspector — single-agent view showing mission state, current step, scoped credentials envelope, live cost-per-run telemetry
Single-agent inspector — mission state, scoped credentials, live cost-per-run.

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.

SDK — the harness that works with any LLM.

Tool calling, MCP, memory, workflows, directives. Swap Anthropic for OpenAI for Ollama without changing app code. The directive library translates one prompt into every model's format. Build once, run anywhere — including the local 7B you'll fine-tune in Q3.

from sagewai import Agent

agent = Agent(model="claude-sonnet-4-6")
reply = agent.run("triage this email", tools=[escalate, draft])
# swap to "ollama/llama3.2" — no other change needed
→ Example 42 — customer-support triage agent

Autopilot — describe the goal, we design the agents.

Mission, blueprint, hosted service. Declare the outcome; Autopilot decomposes into agents, picks tools, captures the trace. Curator harvests every successful run as JSONL — the seed corpus for next quarter's fine-tune. Goals in, agents out, training data accumulating.

from sagewai.autopilot import Mission

mission = Mission("triage and respond to support emails")
result = mission.run()  # Curator captures the trace automatically
→ Example 36 — Autopilot training loop

Fleet — workers, dispatch, scoped routing.

Many agents, many workers, many tenants. Tenant-scoped routing, capability matching, hard isolation. Example 40 dispatches 100 tasks across 24 workers in 3 tenants with zero cross-tenant leakage; exits non-zero if the invariant breaks — wire into CI as a regression gate.

from sagewai.fleet import FleetDispatcher

fleet = FleetDispatcher(store=PostgresStore(DSN))
fleet.register_worker(project_id="acme", capabilities={"pool": "fast"})
fleet.enqueue(task, project_id="acme", labels={"region": "eu-west-1"})
→ Example 33 — multi-tenant Fleet + Sealed integration

Observatory — show your CFO where the AI money goes.

Cost dashboard, Iron Man HUD, Grafana, audit trail. Per-run, per-project, per-model, per-token spend. Real OTel through VictoriaMetrics + VictoriaLogs, populated by mixed-tenant load. One docker compose brings the stack up. Point your CFO at a live Grafana board — not a screenshot — and they sign off.

from sagewai.observability import CostTracker

with CostTracker(project="acme-prod") as cost:
    agent.run(task)
print(cost.breakdown_by_model())  # paste straight into the slide
→ Example 43 — Observatory live

Training Loop — from juggernauts to your own model.

Start with Opus or GPT-5. Capture their answers as training data via the Curator. Fine-tune your own SLM on free Colab CUDA, on a low-cost RunPod GPU, on serverless Modal, or on whatever GPU you can rent. Deploy locally via Ollama. Cost-down isn't an optimisation — it's an exit clause.

# Capture (Ex 36) → fine-tune (Ex 38) → deploy (Ex 38a / Ex 47)
sagewai curator export --project acme --since 30d > train.jsonl
sagewai finetune --base llama3.2:3b --data train.jsonl --runpod
ollama serve  # your model, $0/call from here
→ Example 38 — Unsloth fine-tune (the anchor of the inference spectrum)

Sealed — every customer secret, scoped and scrubbed.

Per-CLI workload identity, vault-backed secrets, redaction at the host RPC seam, audit on every read. Customer keys live in the sandbox only — encrypted at rest, JIT-resolved, scrubbed on release. The credential model your security review will sign.

from sagewai.sealed import Profile

acme = Profile("acme-prod").set_secret("OPENAI_API_KEY", "sk-...")
agent = Agent(profile=acme)
agent.run(task)  # key only in the sandbox; auto-redacted, auto-audited
→ Example 39 — sandbox + scoped credentials