Open Source + Enterprise Platform

Sagewai The LLM-Agnostic Agent Framework

Build production-grade AI agents that work with any model. Multi-tenant, observable, durable, and enterprise-ready. Three lines to your first agent.

quickstart.py
from sagewai.engines.universal import UniversalAgent
from sagewai.models.tool import tool

@tool
async def get_weather(city: str) -> str:
    """Get current weather for a city."""
    return f"Sunny, 22°C in {city}"

agent = UniversalAgent(
    name="weather-bot",
    model="gpt-4o",
    tools=[get_weather],
)

response = await agent.chat("What's the weather in Berlin?")
print(response)  # "It's sunny and 22°C in Berlin!"

The 5 Pillars

Everything you need to build, govern, and operate AI agents at scale.

SDK

Build agents in Python with multi-model support, custom tools, persistent memory, guardrails, and durable workflows. Three lines to your first agent, 100+ models via LiteLLM.

Registry

Store, version, discover, and govern AI agents across your organization. Agent lifecycle management with approval workflows and audit trails.

Harness

Proxy, route, and budget-control all LLM access. Point Claude Code, Cursor, or Codex at the harness for automatic cost optimization and policy enforcement.

Observatory

Source of truth for all AI expenditure. Cost tracking per model, OpenTelemetry tracing, Prometheus metrics, audit logs, and compliance-ready reporting.

Training

Fine-tune domain-specific LLMs with Unsloth, serve locally, route through the Harness at $0 per token. Build legal, medical, or finance models with your own data.

Built for Real Workloads

From simple single-agent tasks to complex multi-agent pipelines with safety guardrails and cost controls.

Multi-Agent Workflows

Compose agents into sequential, parallel, or loop patterns. Each agent can use a different model.

workflow.py
from sagewai.engines.universal import UniversalAgent
from sagewai.core.workflows import SequentialAgent, ParallelAgent

researcher = UniversalAgent(name="researcher", model="gpt-4o")
writer = UniversalAgent(name="writer", model="claude-3-5-sonnet-20241022")
reviewer = UniversalAgent(name="reviewer", model="gpt-4o-mini")

# Pipeline: research -> write -> review
pipeline = SequentialAgent(
    name="article-pipeline",
    agents=[researcher, writer, reviewer],
)

result = await pipeline.chat("Write about quantum computing")

Safety Guardrails

Protect inputs and outputs with PII detection, hallucination guards, content filters, and token budgets.

guardrails.py
from sagewai.engines.universal import UniversalAgent
from sagewai.safety.pii import PIIGuard, PIIEntityType
from sagewai.safety.hallucination import HallucinationGuard

agent = UniversalAgent(
    name="safe-agent",
    model="gpt-4o",
    guardrails=[
        PIIGuard(action="redact", entity_types=[
            PIIEntityType.EMAIL,
            PIIEntityType.PHONE,
            PIIEntityType.SSN,
        ]),
        HallucinationGuard(threshold=0.3, action="warn"),
    ],
)

# PII is automatically redacted before reaching the LLM
# Hallucinations are flagged based on RAG context grounding

100+ Supported Models

Powered by LiteLLM. Write your agent once, then swap models with a single parameter. No code changes required.

GPT-4oOpenAI
GPT-4o-miniOpenAI
Claude 3.5 SonnetAnthropic
Claude Opus 4Anthropic
Gemini 2.0 FlashGoogle
Gemini 2.5 ProGoogle
Mistral LargeMistral
Command R+Cohere
DeepSeek V3DeepSeek
Llama 3.1 405BMeta

Plus Azure OpenAI, AWS Bedrock, Vertex AI, Together AI, Groq, Fireworks, and many more via LiteLLM.

Modular Architecture

Use what you need. Every module is independently importable and composable.

SDK

  • BaseAgent
  • Strategies
  • Workflows
  • Memory & RAG
  • Guardrails

Registry

  • Agent Store
  • MCP Protocol
  • 40 Connectors
  • A2A Protocol

Harness

  • LLM Proxy
  • Model Routing
  • Policy Engine
  • Budget Enforcement

Observatory

  • Cost Tracking
  • Audit Logs
  • Prometheus Metrics
  • OpenTelemetry

Training

  • Unsloth Integration
  • Local LLM Discovery
  • Fine-Tuning Pipeline
  • Domain Models

Ready to build?

Install the SDK and create your first agent in under a minute.

pip install sagewai