← 返回
未分类 中文

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...
将OpenAI ChatGPT和Anthropic Claude的对话导出文件导入到智能体的情景记忆中,解析文件并生成每日记忆摘要。
djc00p djc00p 来源
未分类 clawhub v1.1.2 2 版本 100000 Key: 无需
★ 1
Stars
📥 604
下载
💾 1
安装
2
版本
#latest

概述

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

  1. Export from OpenAI: Settings → Data Controls → Export data → conversations.json
  2. Export from Anthropic: Settings → Privacy → Export data → conversations.json in zip
  3. Dry run first: python3 scripts/batch.py --dir ~/Downloads/chat_exports --dry-run
  4. 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 of assistant: / user: — auto-read from IDENTITY.md and USER.md in 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

版本历史

共 2 个版本

  • v1.1.2 当前
    2026-06-01 12:24
  • v1.1.1
    2026-05-03 05:13 安全 安全

安全检测

腾讯云安全 (Keen)

队列中

腾讯云安全 (Sanbu)

队列中

🔗 相关推荐

ai-agent

Agent Browser

rez0
用于 AI 代理的浏览器自动化 CLI。当用户需要与网站交互(包括浏览页面、填写表单、点击按钮、截图等)时使用。
★ 861 📥 340,959
dev-programming

Rails CI Fixer

djc00p
使用分层升级循环修复Rails PR的CI失败。当Rails拉取请求出现CI失败时使用此技能——包括RSpec测试失败、RuboCop违规等。
★ 0 📥 926
ai-agent

self-improving agent

pskoett
记录自身发现以实现自我改进的技能
★ 4,155 📥 927,930