Quickstart
Get Maev running in your agent in under 2 minutes.
Using an AI assistant?
Copy this prompt and paste it into Claude Code, Cursor, Copilot, or any coding assistant. It detects your framework and handles the full setup automatically.
Or follow the steps below manually.
Step 1: Install
pip install maev-sdkStep 2: Get your API key
Open Settings (opens in a new tab) and copy your API key. Keys start with vl_.
Set it as an environment variable:
export MAEV_API_KEY="vl_your_key_here"Step 3: Wrap your agent
import maev
result = maev.run(my_agent, gateway=True)That is the full integration. maev.run() wraps your agent with absolute local execution control while simultaneously routing LLM traffic to our Gateway for advanced prompt optimizations. There is no separate init step.
Full example
import maev
from openai import OpenAI
client = OpenAI()
def support_agent():
response = client.chat.completions.create(
model="gpt-4o",
messages=[
{"role": "system", "content": "You are a helpful support agent."},
{"role": "user", "content": "How do I reset my password?"},
],
)
return response.choices[0].message.content
result = maev.run(support_agent, agent_name="Support Agent", gateway=True)
print(result)Maev intercepts every LLM call, routes it through the protective Gateway proxy, retries failed calls automatically, and securely tracks the full session. The session appears in your dashboard within seconds.
What activates automatically
Once you call maev.run(agent), Autopilot is live:
| What | What it does |
|---|---|
| Observability | Every LLM call, token count, cost, and latency captured |
| Auto-retry | Failed or empty responses retried up to 3x with backoff |
| Circuit breakers | Run stops if cost, call count, or duration limits are exceeded |
| Loop detection | Detects and breaks infinite prompt loops |
| Fallback models | Routes to fallback models if the primary fails repeatedly |
| Learning | After 20+ runs, learned strategies applied automatically |
What happens next
- Your agent appears in the Agents tab within seconds of the first run
- Each run creates a Session with a full event timeline
- Failures are classified automatically into 10 categories
- You receive an alert via Slack or email if configured
- Autopilot stats appear in the Autopilot tab
Maev works with OpenAI, Anthropic, LangChain, CrewAI, LangGraph, LiteLLM, Gemini, and more. See Running Agents for framework-specific examples.