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

# Migrate from ChatGPT memory

> Move your ChatGPT memory to 4StaX.

This guide shows a practical way to migrate durable information from ChatGPT into kontxt.

ChatGPT memory is locked to one provider. kontxt is local first and works across MCP compatible hosts.

<Note>
  This guide migrates durable facts and preferences. It does not migrate hidden provider specific embeddings or internal ranking state. The goal is portability and clarity.
</Note>

## What to migrate

Focus on durable items:

1. Preferences, such as language and formatting.
2. Identity facts, such as your role and projects.
3. Stable project context, such as stack and constraints.
4. Decisions, such as architecture choices and why.

Avoid migrating:

1. Secrets.
2. Large transcripts.
3. Anything you would not want stored in a local SQLite file.

## Step 1: Export what you can from ChatGPT

ChatGPT provides an export feature that produces files containing your data. The exact export format may change.

Your goal is to extract a plain text list of durable statements.

## Step 2: Convert to a simple text file

Create a file called `chatgpt-migration.txt` and write one item per line. Keep each line short.

Example:

```
I prefer TypeScript over JavaScript.
I prefer concise answers with copy paste code snippets.
I am building 4StaX and kontxt.
Decision: store memory locally in SQLite for inspectability.
```

## Step 3: Initialize kontxt

```bash theme={null}
npx -y @4stax/kontxt init
```

## Step 4: Import using capture

```bash theme={null}
npx -y @4stax/kontxt capture --file chatgpt-migration.txt
```

If you want these memories scoped to a project:

```bash theme={null}
npx -y @4stax/kontxt capture --file chatgpt-migration.txt -p personal
```

## Step 5: Review and clean up

List and search to confirm the migration:

```bash theme={null}
npx -y @4stax/kontxt list
npx -y @4stax/kontxt search "TypeScript"
```

If an entry is wrong or redundant, delete or edit it:

```bash theme={null}
npx -y @4stax/kontxt delete <id>
npx -y @4stax/kontxt edit <id> "Updated content"
```

## Suggested migration checklist

1. Migrate preferences first.
2. Migrate one project at a time.
3. Keep decisions as single sentence statements with a reason.
4. After migration, ask your MCP host a few questions that should trigger retrieval.
