Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/just-cameron/letta-archival-export. A simple web service to export a Letta agent's archival memory.
Something went wrong. Try again.
Python 68%
HTML 32%
README.md
Letta Memory Exporter #
Export archival memories from Letta agents as JSON or ZIP.
Python CLI (Recommended) #
Uses the official letta-client SDK with cursor pagination.
Install #
pip install letta-client
Usage #
# Set your API key
export LETTA_API_KEY=sk-...
# Export as JSON (default)
python export.py agent-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
# Export as ZIP
python export.py agent-xxx -f zip
# Custom output path
python export.py agent-xxx -o my-export.json
# Self-hosted server
python export.py agent-xxx --base-url http://localhost:8283
Options #
positional arguments:
agent_id Agent ID (agent-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)
options:
--base-url URL Letta server URL (default: https://api.letta.com)
--api-key KEY API key (default: LETTA_API_KEY env var)
--output, -o FILE Output file path
--format, -f FORMAT json or zip (default: json)
--page-size N Passages per request (default: 100)
Web Interface #
A client-side HTML page that exports directly from your browser.
Online #
Visit: https://cpfiffer.github.io/letta-archival-export
Local #
- Open
index.htmlin your browser - Enter your Letta API key and agent ID
- Click "Export Memories"
Output Format #
Both tools export a JSON array of passage objects with embedding and embedding_config fields removed:
[
{
"text": "The actual memory content...",
"id": "passage-<uuid>",
"archive_id": "archive-<uuid>",
"created_at": "2025-11-05T23:04:24.901468Z",
"updated_at": "2025-11-05T23:04:24.941596Z",
"is_deleted": false,
"metadata": {},
"tags": ["production", "bug", "feature"],
"created_by_id": "user-<uuid>",
"last_updated_by_id": "user-<uuid>",
"source_id": null,
"file_id": null,
"file_name": null,
"organization_id": "org-<uuid>"
}
]
Field Descriptions #
id: Unique passage identifiertext: The actual memory contenttags: Array of tags for categorizationcreated_at/updated_at: Timestampsarchive_id: Parent archive identifiersource_id/file_id: Optional source referencesmetadata: Custom metadata objectorganization_id: Organization identifieris_deleted: Soft delete flag
Privacy & Security #
- Python CLI: API key stays local
- Web interface: API calls go directly from browser to Letta API, key never sent to third parties
License #
MIT License - see LICENSE file for details