Conversation History Reading
Category: perception | Level: intermediate | Stability: stable | Version: v2
Description
Load and structure multi-turn conversation histories from various formats (JSON, plain text, CSV exports) for context injection or analysis.
Inputs
source: file path or list of message dictsformat:openai|anthropic|plain|auto
Outputs
- Normalized message list:
[{role, content, timestamp}]
Example
import json
with open("chat_export.json") as f:
raw = json.load(f)
messages = [{"role": m["role"], "content": m["content"], "ts": m.get("created_at")} for m in raw["messages"]]
Frameworks
| Framework | Method |
|---|---|
| LangChain | ChatMessageHistory, FileChatMessageHistory |
| LlamaIndex | ChatMemoryBuffer |
| mem0 | memory.get_all() |
Failure Modes
- Role names differ across providers (
humanvsuser) - Token limit exceeded when injecting full history
Related
text-reading.md·../03-memory/memory-injection.md
Changelog
- v1 (2026-04): Initial entry
- v2 (2026-10): Frontmatter metadata aligned (level/version); Related links made explicit
Evidence
The skill's implementation guidance is grounded in the following primary references:
- OpenAI conversation/message concepts: https://platform.openai.com/docs/guides/text
- Anthropic Messages API concepts: https://docs.anthropic.com/en/api/messages
- Agent Skills progressive-disclosure guidance: https://agentskills.io/specification
Evidence status: implementation guidance verified against the cited documentation; no benchmark claim is made unless a reproducible benchmark is included in this file.