atex (amni-tex): a lossless byte-page memory layer for MCP-capable AI coding assistants. Local, no embeddings, no cloud.
Project description
atex (amni-tex)
A lossless byte-page memory layer for MCP-capable AI coding assistants. Local. No embeddings. No cloud. MIT-licensed. Zero runtime dependencies beyond stdlib.
Install name on PyPI is
amnitex; the command-line tool itself isatex.
pipx install amnitex
cd /path/to/your/project
atex init
atex demo # auto-detects MCP clients (Claude Desktop, Claude Code, Cursor, Cline, Continue, Zed) and wires the config with [y/N] consent
That's it. Restart your AI client; atex_search, atex_recall, atex_remember, atex_list_keys, atex_stats are now available as tools.
What it does
Every AI coding assistant forgets your project the moment a new session starts. atex persists project knowledge to a local lossless byte-page key-value store and exposes it over the Model Context Protocol (MCP) so any compliant client can call it mid-conversation.
Numbers
| atex | naive substring scan | |
|---|---|---|
| recall@1 (20-query bench) | 95% | 90% |
| recall@3 | 100% | 95% |
| recall@5 | 100% | 95% |
| avg query latency | 0.5 ms | 0.05 ms |
| p99 query latency | 8.5 ms | 1.0 ms |
| cold-start latency | 2 ms | — |
Replay: atex bench. Full numbers in bench_results.md, source in atex/bench/.
Validated end-to-end with a 0.5B open-source model
$ ollama pull qwen2.5:0.5b-instruct
$ atex demo --model qwen2.5:0.5b-instruct
[atex-validate] model=qwen2.5:0.5b-instruct steps=4 pass=4 fail=0 wall=5.54s
✓ pre-clear: probe key cleared: True
✓ remember-then-recall: wrote 103 bytes; round-trip exact-match=True
✓ rag-search-finds-fact: top_keys=['manual::atex-validation-probe', ...]
✓ rag-answer-quotes-fact: answer='The validation cookie value is azure-marmot-7421.'
The 0.5B model retrieved the validation cookie out of the seeded atex knowledge base via RAG and quoted it back exactly. Works with any model your ollama server has pulled.
How it differs from other memory layers
| atex | Vector DB (Pinecone / Chroma) | mem0 / basic-memory | "Just paste it" | |
|---|---|---|---|---|
| Local | yes | no (or self-host) | yes / hybrid | yes |
| Cost | free | $$/mo | free / hybrid | free |
| Lossless exact recall | yes | no (embedding-lossy) | varies | yes |
| Multi-AI-client (MCP) | yes | typically one client | yes | every session |
| Persists across vendors | yes | per integration | yes | no |
| Embedding model required | no | yes | usually yes | no |
| Setup time | ~10 seconds | hours | minutes | none (but never ends) |
Tools exposed over MCP
| Tool | Use when |
|---|---|
atex_search(query, k) |
The assistant should look something up before asking you to re-explain it |
atex_recall(key) |
Exact path lookup, e.g. project::src/auth.ts |
atex_remember(key, text) |
You explicitly tell it "remember that X" |
atex_list_keys(prefix, max) |
Discover what is known about an area |
atex_stats() |
Inspect KB size / fill |
Server-side validation: atex_remember keys must match ^[a-zA-Z0-9_\-./:]{1,256}$, must not contain .., text payload capped at 1 MiB.
Storage format
Lossless byte-page key-value store. Pages are mem-mappable; the index is JSON. No proprietary formats, no embedding indices, no ML dependencies.
.atex/pages/page_<idx>.kb.page— raw byte stream, default 1 MiB per page (configurable viaATEX_PAGE_W/ATEX_PAGE_H).atex/index.json— entry index{key: {page_idx, offset, length, meta}}.atex/manual/— user-taught facts (kept in git for team sharing).atex/config.json— project config (kept in git)
Reproducibility
git clone https://github.com/Amnibro/amnitex
cd atex
pip install -e ".[dev]"
pytest # 31 tests pass in ~6 s
python -m atex.cli bench --out bench.json --md bench.md # bench numbers above
ollama pull qwen2.5:0.5b-instruct
atex demo --model qwen2.5:0.5b-instruct # live RAG validation
Paper
paper/atex.tex — arXiv preprint draft, cs.IR + cs.CL. The paper expands every number above and includes the full case study of using atex to track context while building atex (see DOGFOOD.md).
License
MIT — see LICENSE.
Citation
@misc{atex2026,
title = {atex: A Lossless Byte-Page Memory Layer for MCP-Capable AI Coding Assistants},
author = {Anthony Reffelt},
year = {2026},
note = {arXiv preprint forthcoming}
}
Contributing
Issues and PRs welcome at github.com/Amnibro/amnitex. See DOGFOOD.md for the case study of using atex while building atex (19/19 search hits, 18/18 recall hits across the build).
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file amnitex-0.1.1.tar.gz.
File metadata
- Download URL: amnitex-0.1.1.tar.gz
- Upload date:
- Size: 39.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
309d249e7134c598919f503d4cbe63219b590a0dfa15a0e330ad33fa631d0659
|
|
| MD5 |
97c9df43a3d4ad08e9f7ef76bc2d17df
|
|
| BLAKE2b-256 |
c8fab07a2a8ee5f2f8d9ad3d49be434422a17615037f6dda663a19aed27c21b2
|
File details
Details for the file amnitex-0.1.1-py3-none-any.whl.
File metadata
- Download URL: amnitex-0.1.1-py3-none-any.whl
- Upload date:
- Size: 41.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e4b473528cb5937f7c11e70bce13664ea486c48d04822b42baa9d93081c0f63a
|
|
| MD5 |
6556c406c814e4030a325e942e8f06c7
|
|
| BLAKE2b-256 |
1ba1cbe8c05855fa4318458a74c7107ca6cf079fd24ca92610b11deaec9af16d
|