agimemagimem
Documentation

Capsule Export Format

Exporting a capsule produces a single JSON file with a stable, versioned schema. It's designed to be inspected by hand, kept in source control, and re-imported into agimem in the future.

How to Export

Open any capsule from your dashboard and click the Export button in the top right. The file is named <capsule-name>-YYYY-MM-DD.json.

Full Schema (v1)

capsule-export.json

{
  "type": "agimem.capsule",
  "version": 1,

  "capsule": {
    "name": "my-capsule",
    "description": "Notes from Q2 planning"
  },

  "tags": ["planning", "q2", "stale"],

  "memories": [
    {
      "key": "project-goals",
      "value": "Ship export feature by EOQ…",
      "tags": ["planning", "q2"],
      "expiresAt": "2026-07-01T00:00:00.000Z",
      "createdAt": "2026-05-15T10:00:00.000Z",
      "updatedAt": "2026-05-20T14:30:00.000Z"
    }
  ]
}

Field Reference

FieldTypeNotes
typestringAlways "agimem.capsule".
versionnumberCurrently 1.
capsule.namestringCapsule name at export time.
capsule.descriptionstring | nullMay be null if no description was set.
tagsstring[]All capsule-scoped tags, sorted alphabetically. Includes unused tags.
memories[].keystringUnique within the capsule.
memories[].valuestringThe full stored value, not truncated.
memories[].tagsstring[]Names only; all appear in the top-level tags array.
memories[].expiresAtISO 8601 | nullnull means the memory never expires.
memories[].createdAtISO 8601Informational; importers should generate fresh timestamps.
memories[].updatedAtISO 8601Informational; importers should generate fresh timestamps.

What's Not Included

The following are deliberately excluded so an export is safe to share and portable between accounts:

  • API keys (any field)
  • Capsule and user IDs
  • Expired memories
  • Audit log entries

Ordering Guarantees

Output is deterministic across runs so exports diff cleanly in version control:

  • tags is sorted alphabetically.
  • memories is sorted by key.
  • Each memory's tags array is sorted alphabetically.

Versioning

Additive changes (new optional fields) keep the same version. Breaking changes bump it. Older versions continue to be supported when an import feature is added.