# Migrate to Pleach (/docs/migrate)



Pleach composes underneath what you have today. The four
migration guides below cover the most common starting points;
each is structured the same way:

1. **When to migrate, when not to** — concrete signals.
2. **What maps cleanly** — the parts that translate 1:1.
3. **What doesn't** — the parts that change shape.
4. **The minimum-viable migration** — smallest diff that gets
   you to a working `SessionRuntime`.
5. **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 [#from-an-llm-sdk-or-framework]

<Cards>
  <Card title="Migrating from the Vercel AI SDK" href="/docs/migrating-from-ai-sdk" description="Move from `streamText` + `useChat` to a `SessionRuntime`. Keep the AI SDK as your provider via `AiSdkProvider` — what changes is what wraps it." />

  <Card title="Migrating from LangChain / LangGraph" href="/docs/migrating-from-langchain" description="Map `Runnable` chains and `StateGraph` checkpointers to Pleach's channel-and-graph substrate. Or bridge both worlds with `@pleach/langchain` instead of migrating." />
</Cards>

## From an enterprise vendor contract [#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.

<Cards>
  <Card title="Migrating from Anthropic Enterprise" href="/docs/migrating-from-anthropic-enterprise" description="Keep SSO, ZDR, Workspaces, the Admin API. The three downstream walls the contract doesn't cover, and how the AuditableCall row closes each one." />

  <Card title="Migrating from OpenAI Enterprise" href="/docs/migrating-from-openai-enterprise" description="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." />
</Cards>

## Compose, don't migrate [#compose-dont-migrate]

Sometimes the right call is to bridge, not migrate. The pages
below cover the major composition patterns:

<Cards>
  <Card title="With the Anthropic SDK" href="/docs/with-anthropic-sdk" description="`AnthropicSdkProvider` wraps `@anthropic-ai/sdk` directly — native prompt caching, extended thinking, beta flags pass through." />

  <Card title="With the OpenAI SDK" href="/docs/with-openai-sdk" description="Wire OpenAI's SDK through `AiSdkProvider` (`@ai-sdk/openai`) or implement `AgentProvider` directly." />

  <Card title="With Mastra" href="/docs/with-mastra" description="Pleach as the audit + replay layer under Mastra's workflow-shaped agents." />

  <Card title="With Inngest" href="/docs/with-inngest" description="Durable workflow orchestration under Pleach — `Inngest.send()` from inside a tool, audit-row-keyed by `turnId`." />

  <Card title="@pleach/langchain" href="/docs/langchain" description="Bidirectional adapter — Pleach tools as `Runnable`s, LangChain tools as `UnifiedToolDefinition`s. Stay in both worlds." />

  <Card title="MCP integration" href="/docs/mcp-integration" description="Expose `@pleach/core` sessions over Model Context Protocol via `@pleach/mcp` — Claude Desktop, Continue, Zed clients." />
</Cards>

## Version migrations (`0.x` → future `1.0`) [#version-migrations-0x--future-10]

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](/docs/versioning)
for the current policy.

## Not seeing your starting point? [#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](/docs/comparison) maps the capability
overlaps row by row, and the [getting-started](/docs/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](https://github.com/pleachhq/core) —
migration content is operator-prioritized, not speculatively
written.
