Chat History Importer
/install chat-history-importer
Chat History Importer
Import years of AI conversations into searchable episodic memory. Parse ChatGPT and Claude exports and create dated daily memory files your agent can search and reference. Perfect for onboarding new agents with rich historical context or preserving important conversations for future recall. Pairs well with the chat-learnings-extractor skill for a complete conversation analysis workflow.
Quick Start
- Export from OpenAI: Settings → Data Controls → Export data →
conversations.json - Export from Anthropic: Settings → Privacy → Export data →
conversations.jsonin zip - Dry run first:
python3 scripts/batch.py --dir ~/Downloads/chat_exports --dry-run - Import:
python3 scripts/batch.py --dir ~/Downloads/chat_exports
Key Concepts
- Auto-detection: Identifies OpenAI vs Anthropic format automatically — no flags needed
- Episodic memory: Writes daily summaries to
memory/episodic/YYYY-MM-DD.md - Deduplication: Chat IDs tracked — re-running the same export never creates duplicates
- OPENCLAW_WORKSPACE: Set this env var to point imports to the right agent workspace
- Human speaker names: Memories are written as
Kael:/Deonte:instead ofassistant:/user:— auto-read fromIDENTITY.mdandUSER.mdin the workspace, making imported history feel like recalled conversations rather than raw log files
Common Usage
# Dry run — preview what would be imported without writing anything
python3 scripts/batch.py --dir ~/Downloads/chat_exports --dry-run
# Import all conversations
python3 scripts/batch.py --dir ~/Downloads/chat_exports
# Import only conversations since a date
python3 scripts/batch.py --dir ~/Downloads/chat_exports --since 2025-01-01
# Force a specific format (auto-detects by default)
python3 scripts/batch.py --dir ~/Downloads/chat_exports --format anthropic
# Override speaker names if IDENTITY.md / USER.md aren’t set up yet
python3 scripts/batch.py --dir ~/Downloads/chat_exports --agent-name "Ayo" --user-name "Deonte"
# Verbose — show message count + first user message per chat
python3 scripts/batch.py --dir ~/Downloads/chat_exports --dry-run --verbose
Tip: Use --dry-run --verbose first to see message counts and previews — great for identifying meaty conversations worth deeper analysis.
References
references/export-formats.md— Detailed OpenAI and Anthropic export formats, normalization rules
Original implementation by @djc00p
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install chat-history-importer - After installation, invoke the skill by name or use
/chat-history-importer - Provide required inputs per the skill's parameter spec and get structured output
What is Chat History Importer?
Import AI conversation exports (OpenAI ChatGPT and Anthropic Claude) into your agent's episodic memory. Parses export files, writes daily memory summaries, a... It is an AI Agent Skill for Claude Code / OpenClaw, with 220 downloads so far.
How do I install Chat History Importer?
Run "/install chat-history-importer" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is Chat History Importer free?
Yes, Chat History Importer is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does Chat History Importer support?
Chat History Importer is cross-platform and runs anywhere OpenClaw / Claude Code is available (linux, darwin, win32).
Who created Chat History Importer?
It is built and maintained by Deonte Cooper (@djc00p); the current version is v1.1.1.