Import Feishu chat history exports into OpenClaw episodic memory. Converts feishu JSON exports into daily episodic summaries that the Dreaming system can process and display in Imported Insights and Memory Palace views.
bash
# Dry run — preview what would be imported
python3 skills/feishu-chat-importer/scripts/batch.py --dir memory/Chat-history --dry-run
# Import all Feishu chats
python3 skills/feishu-chat-importer/scripts/batch.py --dir memory/Chat-history
# Import only chats since a date
python3 skills/feishu-chat-importer/scripts/batch.py --dir memory/Chat-history --since 2026-03-01
# Verbose — show every message
python3 skills/feishu-chat-importer/scripts/batch.py --dir memory/Chat-history --dry-run --verbose
feishu_chat_YYYYMMDD.json files from the source directorycreate_time / millisecond timestamp){role, content, timestamp}
sender.sender_type = "user" → role = usersender.sender_type = "app" → role = assistant (Feishu bot = AI)memory/episodic/YYYY-MM-DD.mdWrites to memory/episodic/YYYY-MM-DD.md:
markdown
## Feishu Chat: <chat_id> (2026-03-19)
- Messages: <count>
- Participants: user_id, app_id
### user (首长):
message content here...
### assistant (飞书机器人):
message content here...
user, App/bot messages → assistanttext and post msg_type automaticallyExpects Feishu export files named feishu_chat_YYYYMMDD.json with this structure:
json
[
{
"message_id": "om_xxx",
"chat_id": "oc_xxx",
"create_time": "1773899372102",
"msg_type": "text|post",
"sender": {
"id": "ou_xxx",
"sender_type": "user|app"
},
"body": {
"content": "{\"text\":\"message text\"}" // text type
// or
"content": "{\"title\":\"\",\"content\":[[{\"tag\":\"text\",\"text\":\"...\"}]]}" // post type
}
}
]