Skip to main content

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 is atex.

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 via ATEX_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/atex
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/atex. 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

amnitex-0.1.0.tar.gz (39.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

amnitex-0.1.0-py3-none-any.whl (41.8 kB view details)

Uploaded Python 3

File details

Details for the file amnitex-0.1.0.tar.gz.

File metadata

  • Download URL: amnitex-0.1.0.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

Hashes for amnitex-0.1.0.tar.gz
Algorithm Hash digest
SHA256 0d7b4569fd17cb33c53216219424b49d9d8e14402dceb5b36780955c9a536187
MD5 e0abd7f1e87b40d843f488a72915c10c
BLAKE2b-256 f175e3cc6f357ecb4d33b541db9d408ed12343eaee77ecfa75ec79c1bb91e689

See more details on using hashes here.

File details

Details for the file amnitex-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: amnitex-0.1.0-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

Hashes for amnitex-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1c1451a6d09a4cd7c82005b7911e6d6149a98f5839c7431c55f349e58de0e42d
MD5 49e6697c7d89c42872972b8d0ed7fc38
BLAKE2b-256 214082adc7bcf802c4087c9872df11ea4d00e140a18b96d17a7fe06ad9559c1c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page