arkiv
Universal personal data format. JSONL in, SQL out, MCP to LLMs.
The Format
Every record is a JSON object. All fields optional.
{"mimetype": "text/plain", "content": "I think the key insight is...", "uri": "https://chatgpt.com/c/abc", "timestamp": "2023-05-14T10:30:00Z", "metadata": {"role": "user", "conversation_id": "abc"}}
{"mimetype": "audio/wav", "uri": "file://media/podcast.wav", "timestamp": "2024-01-15", "metadata": {"transcript": "Welcome to...", "duration": 45.2}}
{"mimetype": "image/jpeg", "uri": "file://media/photo.jpg", "metadata": {"caption": "My talk at MIT"}}
The Stack
JSONL directory (human-readable, portable, durable)
⇅ arkiv convert
SQLite database (queryable, efficient, standard SQL)
↓ arkiv mcp
MCP server (tools → any LLM)
The two forms (directory and database) are isomorphic peers. arkiv convert
goes either direction, auto-detected from input type.
Quick Start
pip install arkiv
# Point at a directory and query. arkiv.db is auto-created on demand.
arkiv query ./my-archive/ "SELECT content FROM records WHERE metadata->>'role' = 'user' LIMIT 5"
# Serve to any LLM via MCP
arkiv mcp ./my-archive/
# Explicit conversion (either direction)
arkiv convert conversations.jsonl archive.db # JSONL → database
arkiv convert archive.db ./exported/ # database → directory
arkiv convert archive.db 2024/ --since 2024-01-01 # temporal slice
arkiv convert archive.db archive.zip # pack for transport
Library: reading and writing bundles
Tools that produce or consume arkiv archives (the *-memex exporters and
importers, for example) can use the bundle layer directly instead of
reimplementing zip/tar handling:
from arkiv import write_bundle, records_to_jsonl, iter_jsonl, peek_jsonl
# Directory, .zip, or .tar.gz, chosen by extension. Byte-reproducible:
# identical records always produce identical bundle bytes.
write_bundle("export.zip", {
"records.jsonl": records_to_jsonl(records),
"schema.yaml": schema_bytes,
"README.md": readme_bytes,
})
# Stream records from a directory, .zip, .tar.gz, or bare .jsonl / .jsonl.gz
# (members are read in place, never extracted). Non-object lines are skipped.
for record in iter_jsonl("export.zip", member="records.jsonl"):
...
first = peek_jsonl(path) # None if absent or unreadable: for format detection
pack_bundle / unpack_bundle convert a whole directory tree (including
media/) to and from a bundle; unpacking rejects path escapes and
decompression bombs.
MCP Tools
Read-only by default. Start with arkiv mcp --writable db to enable the write tool.
| Tool | Description | Mode |
|---|---|---|
get_manifest() |
What collections exist, their descriptions and schemas | read-only |
get_schema(collection?) |
What metadata keys can be queried | read-only |
sql_query(query) |
Run read-only SQL | read-only |
write_record(...) |
Append a single record to a collection | writable |
Why
- Your data lives in silos (ChatGPT, email, bookmarks, photos, voice memos)
- Source toolkits (memex, mtk, btk, ptk, ebk) export it as JSONL
- arkiv gives you one format, one database, one query interface
- Any LLM can query it via MCP
- JSONL is human-readable and durable. SQLite is the most deployed database in history.
Spec and philosophy
- SPEC.md: full technical specification
- docs/PHILOSOPHY.md: why arkiv exists and how it composes with longecho
Metadata
Release files for arkiv 0.4.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| arkiv-0.4.1.tar.gz | 185.6 kB | Without provenance | Details for arkiv-0.4.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| arkiv-0.4.1-py3-none-any.whl | Python 3 | none | any | Details for arkiv-0.4.1-py3-none-any.whl |
Total release size: 234.3 kB
Release files / arkiv-0.4.1.tar.gz
| Download URL | arkiv-0.4.1.tar.gz |
|---|---|
| Size | 185.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a9e35c0895014585f6efa0fb7f79a204acfc4c3c09a260a14c3e45a99f07239c
|
|
BLAKE2b-256 checksum How to use checksums |
7119ef06cebfe368f97cdaead0263ce4e176864d284095aac6dc3dbc3098ed90
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Release files / arkiv-0.4.1-py3-none-any.whl
| Download URL | arkiv-0.4.1-py3-none-any.whl |
|---|---|
| Size | 48.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9c537fc14d84d749fca1822c6c1aac40f3599ec9c189594331711d1ca8fd0463
|
|
BLAKE2b-256 checksum How to use checksums |
2b894359d9c66438743610753283f70287919aa8660799021127c8d1efe9dc96
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Security for arkiv 0.4.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.