Platform Adapters
SaveState ships with 6 built-in adapters. Each knows how to extract and restore state for a specific AI platform.
Overview
Adapters are checked in priority order during auto-detection. The first adapter whose detect() method returns true is used. You can override this with --adapter <id>.
| Adapter | Platform | Extract | Restore | Method |
|---|---|---|---|---|
clawdbot | Clawdbot / Moltbot | ✅ Full | ✅ Full | Direct file access |
claude-code | Claude Code | ✅ Full | ✅ Full | Direct file access |
openai-assistants | OpenAI Assistants API | ✅ Full | ✅ Full | API (v2) |
claude-web | Claude (claude.ai) | ✅ Full | ⚠️ Partial | Data export |
chatgpt | ChatGPT | ✅ Full | ⚠️ Partial | Data export |
gemini | Google Gemini | ✅ Full | ⚠️ Partial | Takeout + API |
Full restore means SaveState can programmatically recreate your AI state. Partial restore means a restore guide is generated for manual re-entry (the platforms don't provide import APIs).
Detection Order
When you run savestate snapshot without --adapter, adapters are tried in this order:
- Clawdbot — looks for
SOUL.md,memory.md,AGENTS.md, ormemory/directory - Claude Code — looks for
CLAUDE.mdor.claude/directory - Claude Web — checks
SAVESTATE_CLAUDE_EXPORTenv var, orclaude-export/, or.savestate/imports/claude/ - OpenAI Assistants — checks for
OPENAI_API_KEYenv var or.openai/directory - ChatGPT — checks
SAVESTATE_CHATGPT_EXPORTenv var, orchatgpt-export/, orconversations.json - Gemini — checks
SAVESTATE_GEMINI_EXPORTenv var,Gemini Apps/directory, orGOOGLE_API_KEY
🤖 Clawdbot Full Support
First-party adapter for Clawdbot / Moltbot workspaces. Captures the complete agent identity.
What it captures
- Identity:
SOUL.md,USER.md,AGENTS.md,TOOLS.md - Memory:
memory.md,MEMORY.md, all files inmemory/directory (.md, .json, .txt) - Skills: All
skills/*/directories — SKILL.md, config files, scripts - Scripts:
personal-scripts/including cron wrappers - Extensions: Config files from
extensions/*/(no node_modules) - Conversations: Session logs from
~/.clawdbot/agents/*/sessions/*.jsonl - Config:
.env,config.json,config.yaml
Detection
Looks for any of: SOUL.md, memory.md, AGENTS.md, memory/
Restore capabilities
Full restore: all identity files, memory, skills, scripts, extensions, and config are written back to the workspace. Existing files are backed up with .bak.
🖥️ Claude Code Full Support
Adapter for Anthropic's Claude Code coding agent. Captures project-level and global instructions.
What it captures
- Identity:
CLAUDE.mdat project root + subdirectories (up to 3 levels), global~/.claude/CLAUDE.md - Memory:
.claude/todos.md,.claude/memory/directory - Settings:
.claude/settings.json,.claude/settings.local.json,~/.claude/settings.json(global) - Project metadata:
package.json,pyproject.toml,Cargo.toml,go.mod, etc. - File manifest: Project file tree (paths + sizes, not content) up to 6 levels deep
Detection
Looks for CLAUDE.md or .claude/ directory in the current project.
Restore capabilities
Full restore: CLAUDE.md files, .claude/ settings, and memory files are written back. Global ~/.claude/ settings are also restored.
⚡ OpenAI Assistants Full Support
Full API adapter for OpenAI Assistants API v2. Extracts and restores assistants, files, vector stores, and threads.
Environment variables
OPENAI_API_KEY | Required. Your OpenAI API key (sk-...) |
SAVESTATE_OPENAI_ASSISTANT_ID | Optional. Target a specific assistant. Without it, SaveState lists all assistants and uses the first one. |
What it captures
- Identity: Assistant instructions, name, description, model, temperature, top_p, response_format
- Tools: Code interpreter, file search, custom functions (with schemas)
- Files: All files in code_interpreter and file_search tool_resources (downloaded as binary)
- Vector stores: Store configurations, file lists, metadata, expiration settings
- Threads: Messages from cached thread IDs (stored in
.savestate/openai-threads.json)
Detection
Checks for OPENAI_API_KEY env var, or .openai/ directory in home or project.
Restore capabilities
Full restore via API: creates a new assistant with the original configuration, uploads files, creates vector stores, and optionally recreates threads with messages. The new assistant ID is printed on completion.
.savestate/openai-threads.json with your thread IDs. Format: {"assistant_id": "asst_...", "thread_ids": ["thread_..."]}
🟣 Claude Web (claude.ai) Extract + Partial Restore
Export-based adapter for the Claude consumer web interface. Different from Claude Code.
Data sources (checked in order)
SAVESTATE_CLAUDE_EXPORTenv var → path to export directoryclaude-export/orclaude_export/in current directory.savestate/imports/claude/- Standalone
claude-memories.mdorclaude-memories.txtfile
What it captures
- Conversations: All conversations from the export (JSON format with messages, attachments)
- Memories: Claude memory entries (text/markdown or JSON format)
- Projects: Claude Project instructions and uploaded files
- Account info: User profile from
account_info.json
Restore capabilities
Partial — Claude.ai has no import API. SaveState generates:
claude-restore-guide.md— step-by-step manual restore instructionsmemories-to-import.md— individual memories formatted for manual re-entryprojects/project-instructions.md— project instructions for manual recreation
💬 ChatGPT Extract + Partial Restore
Export-based adapter for ChatGPT. Uses the data export from Settings → Data Controls → Export Data.
Data sources
SAVESTATE_CHATGPT_EXPORTenv var → path to extracted export directorychatgpt-export/in current directoryconversations.jsondirectly in current directory.savestate/imports/chatgpt/
What it captures
- Conversations: Full tree-structured conversation history (walks the mapping/branching structure)
- Memories: ChatGPT memories from
memories.json - Custom instructions: "About user" and "Response preferences" from
custom_instructions.json - User profile: Account metadata from
user.json
Restore capabilities
Partial — ChatGPT has no import API. Generates:
chatgpt-restore-guide.md— comprehensive restore instructionschatgpt-memories.md— memories formatted for manual re-entrychatgpt-custom-instructions.md— custom instructions for copy-paste
✨ Google Gemini Extract + Partial Restore
Captures Gemini conversations from Google Takeout exports and API data (tuned models, cached content).
Data sources
SAVESTATE_GEMINI_EXPORT | Path to Google Takeout "Gemini Apps" export directory |
GOOGLE_API_KEY or GEMINI_API_KEY | For API-based capture (tuned models, cached content) |
Also checks: Gemini Apps/, Takeout/Gemini Apps/, .savestate/imports/gemini/
What it captures
- Conversations: All conversations from Takeout export (JSON files)
- Gems: Custom agent configurations (name, instructions, model) from
gems.jsonorGems/directory - Tuned models: Model configs, hyperparameters, state (via API)
- Cached content: Cached content entries and metadata (via API)
Restore capabilities
Partial — generates:
gemini-restore-guide.md— complete restore instructions- Individual Gem JSON files for manual recreation at
gemini.google.com/gems - Conversation index for archival reference