> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sovseal.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Migrate from Self-Hosted sovseal to Managed Platform

> Switch your replication target between self-hosted and the managed Platform by changing one constructor argument.

<style>
  {`
      main, article, .prose {
        margin-left: 2.5cm !important;
        margin-right: 2.5cm !important;
      }
      `}
</style>

Migrating between deployment targets requires only two things: a valid API key for the destination, and an updated `endpoint` in your SDK configuration. Because replication is write-behind and endpoint-agnostic, the same encrypted snapshot payloads that target your self-hosted instance can be redirected to the managed Platform (or back) with no schema changes.

***

## Self-Hosted → Managed Platform

<Steps>
  <Step title="Register at app.sovseal.com">
    Go to [app.sovseal.com](https://app.sovseal.com) and create an account. If your team already has one, ask an admin to invite you.
  </Step>

  <Step title="Generate a Platform API key">
    From the **Devices** page, create a new key. It will have the prefix `sov_live_`. Copy it immediately — it is shown once.
  </Step>

  <Step title="Update your SDK configuration">
    Replace the self-hosted `endpoint` with the managed one:

    <CodeGroup>
      ```typescript Before — self-hosted theme={null}
      import { AgentStateClient } from "@sovseal/sdk";

      const client = new AgentStateClient({
        endpoint: "https://your-project-ref.supabase.co/functions/v1/v2-agent-state",
        apiKey: "sov_live_self-hosted-key",
      });
      ```

      ```typescript After — managed Platform theme={null}
      import { AgentStateClient } from "@sovseal/sdk";

      const client = new AgentStateClient({
        endpoint: "https://ksrlmubaxzwufziwarps.supabase.co/functions/v1/v2-agent-state",
        apiKey: "sov_live_platform-key-from-dashboard",
      });
      ```
    </CodeGroup>
  </Step>

  <Step title="Replicate existing records">
    There is no automatic migration of previously-replicated data between endpoints — each endpoint only ever holds what was written to it. Your **local** LanceDB store is unaffected either way; going forward, new writes replicate to whichever endpoint the client points at.

    To carry forward history that only exists on the old endpoint, walk it with `restore()` / `lineage()` against the old client and re-`snapshot()` it against the new one — the same primitives documented in [Verified Semantic Recall](/platform/core-concepts/verified-semantic-recall).
  </Step>
</Steps>

***

## Managed Platform → Self-Hosted

<Steps>
  <Step title="Deploy your self-hosted instance">
    Follow [Deploy Self-Hosted](/self-hosted/deploy). Confirm the instance is reachable with the verification call shown there before proceeding.
  </Step>

  <Step title="Update the endpoint">
    <CodeGroup>
      ```typescript Before — Platform theme={null}
      import { AgentStateClient } from "@sovseal/sdk";

      const client = new AgentStateClient({
        endpoint: "https://ksrlmubaxzwufziwarps.supabase.co/functions/v1/v2-agent-state",
        apiKey: "sov_live_platform-key",
      });
      ```

      ```typescript After — self-hosted theme={null}
      import { AgentStateClient } from "@sovseal/sdk";

      const client = new AgentStateClient({
        endpoint: "https://your-project-ref.supabase.co/functions/v1/v2-agent-state",
        apiKey: "sov_live_self-hosted-key",
      });
      ```
    </CodeGroup>
  </Step>

  <Step title="Records already on the Platform stay there">
    Switching endpoints does not delete or move anything. Records replicated to the Platform remain in the Platform's database. If you need them removed, that is a request to `security@sovseal.com` — there is no self-service bulk-delete today.
  </Step>
</Steps>

***

## Why this is safe either way

Your **local** LanceDB database is always the source of truth for reads. Recall latency and accuracy never depend on which replication endpoint is configured — a wrong or unreachable endpoint degrades sync durability, not agent behavior. Switching back is the same one-line change in reverse.
