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
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install chat-history-importer - 安装完成后,直接呼叫该 Skill 的名称或使用
/chat-history-importer触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
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... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 220 次。
如何安装 Chat History Importer?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install chat-history-importer」即可一键安装,无需额外配置。
Chat History Importer 是免费的吗?
是的,Chat History Importer 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Chat History Importer 支持哪些平台?
Chat History Importer 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(linux, darwin, win32)。
谁开发了 Chat History Importer?
由 Deonte Cooper(@djc00p)开发并维护,当前版本 v1.1.1。