- ›
Your agent framework runs the loop— reasoning, planning, memory inside the harness. Naïve is the governed tool layer underneath: identity, money, comms, connections, and policy on every real-world action. - ›
You do not replace LangGraph, Vercel AI SDK, CrewAI, or your custom loop. You inject Naïve's tools so regulated calls hit the governance gateway— capped, approval-routed, audited, revocable. - ›Two integration paths: in-process `agentTools()` in TypeScript (lowest latency) or per-user MCP sessions (any language, untrusted runtimes).
- ›Provision once: Account Kit + tenant user. Runtime code only binds `forUser(id)` and hands tools to the framework.
- ›
Every guide in the docs integrations index follows the same pairing pattern— adapter code differs, governance does not. - ›Start BYO runtime; add hosted execution later if you want Naïve to operate the compute.
Naïve inside your agent framework means keeping the orchestrator you already chose and adding a governed tool layer underneath it. LangGraph runs the graph; Vercel AI SDK runs generateText; CrewAI runs the crew — Naïve is autonomous company infrastructure that handles what happens when the model tries to spend money, send email, connect an app, or read a vaulted secret.
This post is the map, not a per-framework tutorial. The docs integrations index holds the step-by-step guides; here is the mental model that makes every guide the same story with different adapter code.
What does each layer own?
| Layer | Owns | Does not own |
|---|---|---|
| Your framework | Model calls, agent state, planning loops, handoffs, streaming | Per-user identity, cards, OAuth token storage, spend enforcement |
| Naïve | Tenant users, Account Kits, governed tools, approvals, audit, revoke | Your prompt, your graph topology, your model provider choice |
The split matters because teams often try to bolt payment and OAuth onto the framework. That duplicates work and leaves policy in prompts. Naïve keeps orchestration in your stack and moves real-world authority to a governance gateway that checks every tool call server-side — the same model described in The Governed Agent Profile.
How does the pairing work?
Your framework (orchestration) Naïve (governed tools)
───────────────────────────── ───────────────────────
model picks a tool
│
▼
framework invokes tool ──────────▶ gateway checks Account Kit
│
execute · 202 pending_approval · forbidden
│
audit log · revocable session
Two wiring patterns cover every guide in the index:
1. In-process agentTools() (TypeScript)
Best when the agent runs in a backend you control:
import { Naive } from "@usenaive-sdk/server";
const naive = new Naive({ apiKey: process.env.NAIVE_API_KEY! });
const user = await naive.users.create({ email: "customer@acme.com" });
const kit = naive.forUser(user.id).agentTools();
// Adapt kit.tools into LangGraph / AI SDK / OpenAI Agents format;
// dispatch with kit.handle(name, input) — AccountKit-gated server-side.See LangGraph or Vercel AI SDK for the exact adapter.
2. Scoped MCP session (any language)
Best for Python stacks, edge runtimes, and untrusted hosts:
const client = naive.forUser(user.id);
const session = await client.session({ ttlMs: 15 * 60 * 1000 });
// session.mcp.url + session.mcp.headers → your framework's MCP clientPython guides (CrewAI, Pydantic AI, AutoGen, …) mint the session over REST and attach it to the framework's MCP transport. Details: delegated, revocable MCP sessions.
Which guide matches your stack?
Every row follows the same control-plane setup (Account Kit + user) and differs only in adapter code:
| Stack | Docs guide | Typical wiring |
|---|---|---|
| Vercel AI SDK | integrations/vercel-ai-sdk | In-process agentTools() |
| LangGraph / LangChain | integrations/langgraph | In-process agentTools() |
| OpenAI Agents SDK | integrations/openai-agents | In-process or MCP |
| CrewAI | integrations/crewai | MCP (MCPServerSSE) |
| Pydantic AI | integrations/pydantic-ai | MCP |
| Python / edge / voice | integrations/overview | MCP session + REST control plane |
The full table — Mastra, Cloudflare Agents, AutoGen, Google ADK, Semantic Kernel, LlamaIndex, Claude Agent SDK, Agno, DSPy, smolagents, Letta — lives on the integrations overview.
Where does the runtime run?
Framework choice and runtime hosting are separate decisions. Hosted vs bring-your-own runtime compares both paths; the default recommendation is BYO: inject governed tools into the loop you already ship. Naïve-hosted microVMs are optional when you want managed compute with credentials injected at boot.
What stays enforced?
No matter which framework or transport you pick:
- Identity — every action runs as a specific tenant user.
- Policy — the Account Kit bounds primitives and apps.
- Spend — cards and credits respect kit limits; the model cannot raise its own ceiling.
- Human-in-the-loop — sensitive actions freeze as approvals until a human decides.
- Revoke — suspend the agent profile or kill an MCP session in one call.
Where to start
- Read Building AI Agents Into Your SaaS if you have multiple customers —
forUser(id)is the isolation boundary every framework guide assumes. - Pick the integration guide that matches your orchestrator.
- Wire one gated action end to end — connect an app, issue a capped card, or send from a per-user inbox — before widening the kit.
For a full tutorial using MCP, see Build a bring-your-own-agent platform.
Does Naïve replace my agent framework?+
What are the two ways to integrate Naïve with a framework?+
When should I use agentTools() vs an MCP session?+
Do I configure a different Naïve setup per framework?+
Where are the step-by-step framework guides?+
What should I read before picking a framework guide?+
Building the agent-native backend.
Hosted vs bring-your-own runtime for AI agents: Naïve is runtime-agnostic — governance applies at the tool-call boundary either way. Compare both paths.
Per-user MCP sessions give AI agents delegated, revocable access — short-lived, kit-scoped credentials instead of your workspace key. Here's the pattern.
Build a bring-your-own-agent platform on Naïve: mint each customer a short-lived, revocable MCP session that's scoped and filtered by their Account Kit.
A governed agent profile is an AI agent with identity, spend limits, approvals, audit, and instant revoke — enforced on every action. Here's the full lifecycle.