@purmemo.ai/schema
v0.3.0
Published
AMP v0.1 schema — TypeScript types and Zod validators for the AI Memory Protocol
Maintainers
Readme
@purmemo.ai/schema
TypeScript types and Zod validators for the AMP (AI Memory Protocol) format.
Install
npm install @purmemo.ai/schemaUsage
import { AMPExport, AMPConversation, AMPMessage, parseAMPExport } from '@purmemo.ai/schema'
// Validate an AMP export
const result = parseAMPExport(data)
if (result.success) {
console.log(result.data.conversations.length)
} else {
console.error(result.error.format())
}AMP Format
AMP (AI Memory Protocol) is an open format for AI conversation portability. A valid AMP export looks like:
{
"amp_version": "0.1",
"exported_at": "2026-03-07T00:00:00.000Z",
"platform": "chatgpt",
"conversation_count": 1,
"conversations": [
{
"id": "abc123",
"title": "My conversation",
"platform": "chatgpt",
"source_format": "chatgpt-export-v1",
"amp_version": "0.1",
"messages": [
{
"id": "msg1",
"role": "user",
"content": "Hello",
"platform": "chatgpt"
}
]
}
]
}Supported Platforms
chatgpt | claude | gemini | cursor | perplexity | grok | mistral | github-copilot
Conformance Levels
| Level | Fields |
|-------|--------|
| L1 | id, role, content, platform |
| L2 | + timestamp, model, parent_id, metadata |
Community
- Discord — get help, share feedback, discuss the spec
- GitHub Issues — bug reports and feature requests
Links
Apache 2.0 — by pūrmemo
