LangChain chat loader for
.curt — the open (MIT),
single-file AI conversation format. One timestamped, attributed conversation
per file; unknown fields are data and survive round-trips.
from langchain_curt import CurtChatLoader
loader = CurtChatLoader("./conversations/*.curt")
sessions = loader.lazy_load() # one ChatSession per .curt file- Role mapping:
user→HumanMessage,assistant→AIMessage,system→SystemMessage.toolmessages are skipped and counted (loader.stats["tool_messages_skipped"]) —ToolMessagerequires atool_call_idthat.curtv1 does not carry. - Metadata: per-message timestamps (epoch ms → ISO 8601 UTC), model, and
all unknown/extension fields under
additional_kwargs["curt"]; conversation-level metadata inloader.conversation_metadata. - Validation: spec-compliant whole-file rejection (bad magic, wrong
version, missing fields → rejected, never half-loaded).
on_error="skip"imports valid files and reports invalid ones inloader.errors. - Dependencies:
langchain-coreonly. The.curtparser is stdlib-only.
Converters into .curt exist for Claude Code transcripts
(curt-convert), Open WebUI
exports (curt-openwebui),
and the WildChat-1M research corpus
(curt-wildchat).
Spec: https://github.com/dotcurt/dot_curt · npm reference impl:
curt-format
pip install -e . pytest
pytestMIT License.