Introduction
Optimize your AI agents — better prompts, better models, lower cost.
What is Overmind?
Section titled “What is Overmind?”Overmind is a platform that automatically optimizes your AI agents. It sits between your application and LLM providers, collects execution traces, evaluates them, and recommends better prompts and models to reduce cost, improve quality, and lower latency.
You install the SDK, call overmind_sdk.init() once, and keep building. Overmind handles the rest:
- Collects traces from every LLM call your application makes
- Evaluates quality using LLM judges against configurable criteria
- Experiments with alternatives — different prompts, different models
- Surfaces recommendations — “switch to model X to save 40% with no quality loss”
- Learns from your feedback — you accept or reject suggestions, and the system improves
How It Works
Section titled “How It Works”Your app (with Overmind SDK) │ ▼ Send traces ──────────▶ Overmind collects & stores │ ▼ LLM Judge evaluates on cost, latency, quality │ ┌────────┴────────┐ ▼ ▼ Try new prompts Try new models │ │ └────────┬─────────┘ ▼ Recommendations appear in dashboard │ ▼ You provide feedback (accept / reject / tweak) │ ▼ System learns, repeatsWhy Overmind?
Section titled “Why Overmind?”- Zero friction: Add
overmind_sdk.init()once. No code rewrites, no proxy configuration, no infrastructure changes. - Automatic optimization: You don’t need to manually A/B test prompts or benchmark models. Overmind does it for you.
- Cost reduction: Find cheaper models that maintain quality for your specific use case.
- Quality improvement: Discover prompt variations that produce better outputs, scored by LLM judges.
- Full observability: See every LLM call, its inputs, outputs, latency, cost, and evaluation scores in the dashboard.
Quick Start
Section titled “Quick Start”-
Sign up with Google at console.overmindlab.ai — we create your project and API key automatically. Or spin up our fully local open-source version!
-
Install the SDK:
pip install overmind-sdkbun add @overmind-lab/trace-sdk openai# ornpm install @overmind-lab/trace-sdk openai- Instrument your LLM calls:
Add overmind_sdk.init() once at startup — your existing LLM code stays unchanged. Optionally, wrap your system prompt in a PromptString so Overmind can more easily identify the right Agent:
import osimport overmind_sdkfrom openai import OpenAIfrom opentelemetry.overmind.prompt import PromptString
os.environ["OVERMIND_API_KEY"] = 'ovr_'os.environ["OPENAI_API_KEY"] = 'sk-proj-'
overmind_sdk.init(service_name="my-service", environment="production")
system_prompt = PromptString( id="hello_agent_v1", template="You are a friendly assistant that greets users.", kwargs={},)
client = OpenAI()response = client.chat.completions.create( model="gpt-5-mini", messages=[ {"role": "system", "content": system_prompt}, {"role": "user", "content": "Say hi!"} ],)Anthropic and Google Gemini are also supported — pass the providers you use:
overmind_sdk.init(service_name="my-service", providers=["anthropic"])overmind_sdk.init(service_name="my-service", providers=["google"])Init tracing before your first LLM call, passing the imported provider class:
import { OpenAI } from "openai";import { OvermindClient } from "@overmind-lab/trace-sdk";
const overmindClient = new OvermindClient({ apiKey: process.env.OVERMIND_API_KEY!, appName: "my app",});
overmindClient.initTracing({ enableBatching: false, enabledProviders: { openai: OpenAI },});
// Use OpenAI as normal — all calls are automatically tracedconst openai = new OpenAI({ apiKey: process.env.OPENAI_API_KEY });
const response = await openai.chat.completions.create({ model: "gpt-5-mini", messages: [{ role: "user", content: "Hello!" }],});- Send 30+ traces — the optimization engine activates
That’s it. See the Getting Started guide for full details.