Migrate to Pleach
Migration guides for the four most common starting points — AI SDK, LangChain, Anthropic Enterprise, OpenAI Enterprise.
Pleach composes underneath what you have today. The four migration guides below cover the most common starting points; each is structured the same way:
- When to migrate, when not to — concrete signals.
- What maps cleanly — the parts that translate 1:1.
- What doesn't — the parts that change shape.
- The minimum-viable migration — smallest diff that gets
you to a working
SessionRuntime. - What you keep — provider, enterprise contract, custom tools, existing UI.
You can stop at any step. The runtime works with a single provider, no plugins, no audit adapter, no checkpointer. Add capabilities as you need them.
From an LLM SDK or framework
Migrating from the Vercel AI SDK
Move from `streamText` + `useChat` to a `SessionRuntime`. Keep the AI SDK as your provider via `AiSdkProvider` — what changes is what wraps it.
Migrating from LangChain / LangGraph
Map `Runnable` chains and `StateGraph` checkpointers to Pleach's channel-and-graph substrate. Or bridge both worlds with `@pleach/langchain` instead of migrating.
From an enterprise vendor contract
You don't replace the contract — Pleach runs underneath it. SSO,
ZDR, Workspaces / Projects, dedicated capacity, prompt caching,
and snapshot pinning stay where they are. What Pleach adds: a
hash-chained AuditableCall row in your own Postgres,
per-axis cost rollup inside one Workspace, and replay
determinism across snapshots.
Migrating from Anthropic Enterprise
Keep SSO, ZDR, Workspaces, the Admin API. The three downstream walls the contract doesn't cover, and how the AuditableCall row closes each one.
Migrating from OpenAI Enterprise
Keep SSO/SCIM, ZDR, Projects, the Usage API. The three downstream walls the contract doesn't cover, and how the AuditableCall row closes each one.
Compose, don't migrate
Sometimes the right call is to bridge, not migrate. The pages below cover the major composition patterns:
With the Anthropic SDK
`AnthropicSdkProvider` wraps `@anthropic-ai/sdk` directly — native prompt caching, extended thinking, beta flags pass through.
With the OpenAI SDK
Wire OpenAI's SDK through `AiSdkProvider` (`@ai-sdk/openai`) or implement `AgentProvider` directly.
With Mastra
Pleach as the audit + replay layer under Mastra's workflow-shaped agents.
With Inngest
Durable workflow orchestration under Pleach — `Inngest.send()` from inside a tool, audit-row-keyed by `turnId`.
@pleach/langchain
Bidirectional adapter — Pleach tools as `Runnable`s, LangChain tools as `UnifiedToolDefinition`s. Stay in both worlds.
MCP integration
Expose `@pleach/core` sessions over Model Context Protocol via `@pleach/mcp` — Claude Desktop, Continue, Zed clients.
Version migrations (0.x → future 1.0)
Every shipping @pleach/* package is at 0.1.0 today under
FSL-1.1-Apache-2.0. The 0.1.x → 1.0.0 jump is non-caretable —
pin exactly. When the 1.0 cut lands, this page will host the
codemod + per-SKU upgrade guide. See versioning
for the current policy.
Not seeing your starting point?
The migration guides above are the most-asked patterns. If you're coming from a less common shape — CrewAI, AutoGen, LlamaIndex Workflows, OpenHands, Goose — the comparison page maps the capability overlaps row by row, and the getting-started path takes ~5 minutes regardless of starting point.
If a missing migration guide would actually move the needle for
your project, open an issue on the
@pleach/core repo —
migration content is operator-prioritized, not speculatively
written.
Attestation
Ed25519-signed envelopes over audit-ledger slices — a pluggable key-store substrate that sits on top of the canonical row hash and turns it into portable, third-party-verifiable evidence.
Migrating from the Vercel AI SDK
Move from `streamText` + `useChat` to a `SessionRuntime` — what maps cleanly, what doesn't, and how to keep the AI SDK as your provider.