Skip to main content
Glama

alethech

PyPI version Python License: MIT CI GitHub Repo stars

Verifiable agent continuity protocol — local-first, zero-LLM, zero-blockchain. The art of un-concealing transmission integrity.

Copyright (c) 2026 AliceLabs LLC.

Listed in TeleAI-UAGI/Awesome-Agent-Memory (Emerging projects) after a maintainer audit of the claims against the code.

Now in the official MCP Registry: io.github.eddyflores100-lang/alethech — the read-only alethech-mcp bridge, discoverable by any registry-aware MCP client.

If alethech is useful to you, a ★ star is how other people — and their agents — find it.

From Greek ἀλήθεια (aletheia, "truth as un-concealment") + τέχνη (techne, "art, craft"). The art of revealing that a memory was not modified after being signed.

This is the reference implementation of the protocol specified in docs/implementacion-nucleo-minimo.md (rev 2 + rev 3 identity layer).

what this is

alethech provides cryptographically verifiable, portable memory continuity for AI agents. It signs memory commits with Ed25519, links them in a hash-linked DAG, rotates keys without losing identity, and can seal a verified history into one encrypted .aleth file for transfer between compatible runtimes and devices.

What this repo IS:

  • A cryptographic protocol implementation (Ed25519 + SHA-256 + JCS RFC 8785)

  • An encrypted portable memory container (.aleth, scrypt + AES-256-GCM)

  • A neutral verified adapter view for plugins and chat integrations

  • A read-only MCP stdio bridge (python -m alethech.mcp_memory, or alethech-mcp after pip install alethech) exposing verified memory context and verification tools — credentials and paths stay configuration, never tool arguments

  • 9 CLI commands (init, commit, evidence, verify, export, import, migrate, key rotate, key revoke)

  • A test suite with mutation-guard paths (each guarantee has a test that fails when the check is defeated)

  • MIT licensed, published on PyPI as alethech

What this repo is NOT:

  • The protocol core is not a hosted retrieval platform; the portable skill adds local encrypted memory workflows and bounded lexical recall

  • It is NOT the legacy memex project (Python/ChromaDB memory server)

  • It has no Docker, no auto-update, no LLM calls, no required cloud

  • It depends only on cryptography and click — no mem0ai, no chromadb, no ollama

The legacy memex codebase (167 commits, AliceLabs Proprietary License) is preserved in a separate repository: eddyflores100-lang/memex-legacy. It is not part of this repo and not installed by pip install alethech.

Related MCP server: SharedBrain

the property

This memory set forms part of a cryptographically verifiable history associated with a determined identity, whose commits can be independently verified with respect to their integrity, cryptographic authorship, and provenance relations.

When a reference checkpoint exists, it can additionally be verified that the presented history continues from that checkpoint.

The protocol does NOT prove that the agent's claims are true — only that they were signed by the identity that claims them. The truth being un-concealed is the truth about transmission integrity, not about content.

status

Released version 0.9.5 — portable encrypted memory (.aleth v2 with ALETH002 recovery across Python, TypeScript, and Rust) and chat capture into portable memory are live. CI runs the Python suite on 3.10–3.13 plus cross-language conformance and .aleth interoperability across Python, Rust, and TypeScript. No LLM, no required cloud, no blockchain, no consensus.

install the portable memory skill

npx skills add eddyflores100-lang/alethech --skill alethech --global

Ask your agent to save a checkpoint, resume a project, or carry memory to another AI/device. First save creates encrypted local memory automatically. No API key, account, LLM model download, server or MCP configuration is required. Python 3.10+ and a script-capable Agent Skills host are needed; missing protocol dependencies are installed once in a private environment. Later memory operations run offline. Optional cloud-folder backup copies ciphertext only and preserves changed remote revisions. Browser-only chats use the existing extension/offline viewer.

See portable skill setup and limits and the primary-source alternatives review.

install

pip install alethech

For development:

git clone https://github.com/eddyflores100-lang/alethech.git
cd alethech
pip install -e ".[dev]"

usage

alethech init                              # generate identity + genesis commit
alethech commit --content <json-file>      # create signed MemoryCommit
alethech evidence --tool <name>            # create signed EvidenceCommit
  --input <file> --output <file>
alethech verify                            # verify the whole store, offline
alethech export --output <dir>             # portable package
alethech import --input <dir>              # import external memory
alethech key rotate                        # rotate operational key
alethech key revoke --key-id <id>          # revoke a key
alethech migrate --to v0.2                  # migrate identity layer

capture a chat, carry the file

Use the Alethech toolbar icon to capture the loaded conversation, review it, and create an encrypted .aleth with a new local identity and recovery code. Carry that file to another device, chat or IDE. The extension imports it and inserts selected context into an empty chat editor only on request; it never sends. For any text-capable client, export context.txt. MCP clients can use the local read-only memory connector. A single offline alethech.html also opens/creates files without installing an extension or registering an account.

See the complete capture and transfer guide and IDE/MCP setup. Capture requires only activeTab and scripting, with no global host or storage permission. Rendered chat capture cannot retrieve a provider's hidden memories or unloaded conversation history.

portable encrypted memory (.aleth)

Alethech 0.9 development adds a single encrypted file designed for drag-and-drop transfer:

from alethech import Alethech

agent = Alethech.initialize("./working-store")
agent.commit({"fact": "portable memory"})
agent.seal("memory.aleth", "your-passphrase")

# Plugin-style path: dropped file -> unlock -> verify -> neutral context
context = Alethech.drop_context("memory.aleth", "your-passphrase")

The .aleth container uses scrypt + AES-256-GCM. Its authenticated payload can be opened byte-exactly by the Python, Rust, and TypeScript implementations in CI. The portable file may carry the encrypted operational signing key so history can continue on another device, but it excludes root.key and recovery.key.

See docs/ALETH_CONTAINER_SPEC.md and docs/ADAPTER_CONTRACT.md.

what it does NOT do

  • It does NOT prove that the agent's claims are true. Only that they were signed by the identity that claims them.

  • It does NOT detect rollback without an external checkpoint.

  • The local working store is NOT encrypted at rest; the portable .aleth container is encrypted.

  • It does NOT delegate permissions between agents.

  • It does NOT call any LLM.

what the name means

alethech comes from:

  • aletheia (ἀλήθεια) — Greek for "truth", more precisely "un-concealment" (Heidegger's reading: truth as the act of revealing what was hidden)

  • techne (τέχνη) — Greek for "art, craft, technique"

So alethech = "the art of un-concealing". The protocol un-conceals:

  • whether a memory was modified after being signed

  • who signed it

  • what signed timestamp was recorded (NOT physical signing time — only the timestamp recorded in the artifact)

  • what its provenance is

  • whether the chain of custody is intact

It does NOT un-conceal whether the content is true — that's the agent's responsibility, not the protocol's.

tests

python -m pytest tests/

The Python test suite covers:

  • crypto primitives (Ed25519, SHA-256, base64url, base32)

  • JCS canonicalization (RFC 8785) — 56 conformance vectors including:

    • integer/float serialization per ECMAScript Number.prototype.toString()

    • -0 serializes as "0" (per RFC 8785 erratum, NOT preserved)

    • scientific notation format (positive exponents keep '+', negative strip leading zeros)

    • decimal vs scientific threshold (1e21 / 1e-6)

    • UTF-16 key ordering with surrogate pairs

    • string escaping (control chars, non-ASCII preservation)

    • NaN/Infinity rejection

  • agent_id derivation (cryptographic binding to public_key)

  • MemoryCommit signing, tamper detection, wrong-key rejection

  • EvidenceCommit signing (supports both legacy and V2 identity)

  • all 9 CLI commands (init, commit, evidence, verify, export, import, migrate, key rotate, key revoke)

  • checkpoint emission + rollback detection + causal continuity (ancestry check)

  • identity_mismatch detection

  • export/import roundtrip preservation

  • tampered manifest rejection

  • key rotation with cutoff_head reachability guarantee

  • ancestry_check mutation guard (3 code-level defeats)

  • recall-seam defeats (2 data-level mutations: active-keys tampering, cutoff_head mutation)

  • root_id binding (RootAuthority ↔ IdentityRecord ↔ ControlEvent)

  • checkpoint continuity (checkpoint HEAD must be ancestor of current HEAD)

  • IdentityRecordV2 signature verification (against root public key)

  • import causal continuity (ancestry check before writing)

  • import hardening (symlinks, path traversal, archive bombs, artifact hash verification)

repository structure

alethech/                    # this repo — cryptographic protocol only
├── alethech/                # source: crypto, objects, store, verify, cli, canonical
│   └── integrations/        # langchain + memex hooks
├── alethech-rs/             # Rust SDK (31 tests, cross-validation)
├── alethech-ts/             # TypeScript SDK (15 tests, Web Crypto API)
├── tests/                   # Python behavioral, adversarial, mutation and conformance tests
├── conformance/             # 15 adversarial conformance vectors
├── docs/                    # protocol specification
├── examples/                # basic_usage.py + memory_writeback.sh (ops pattern)
├── INTEGRATION.md           # how to integrate with memex via MemexAlethechHook
├── INTEGRATION-VIGIL.md     # fail-closed memory verification for watchdogs
├── CHANGELOG.md             # version history
├── SECURITY.md              # threat model + vulnerability policy
├── CONTRIBUTING.md          # dev setup + PR process
├── CODE_OF_CONDUCT.md      # Contributor Covenant
├── CITATION.cff             # academic citation
├── LICENSE                  # MIT
├── README.md                # this file
└── pyproject.toml           # package metadata and dependencies: cryptography + click

cross-language validation

The protocol is implemented in three independent languages:

Language

Tests

Dependencies

Python

CI suite

cryptography + click

Rust

31

ed25519-dalek, sha2, serde

TypeScript

15

0 (Web Crypto API only)

All three use the same NIST SHA-256 test vectors, RFC 4648 base32 vectors, and RFC 8785 JCS conformance vectors. The cross-language claim is backed by an executable harness:

python conformance/cross_language_check.py

This runs all three implementations against the same shared fixtures in conformance/ and asserts byte-exact agreement on canonical bytes for accepted fixtures. The default run is fail-closed: exit 0 = all three ran and agree, 1 = disagreement, 2 = an implementation/runtime is unavailable. CI builds the Rust helper and executes the three-runtime harness. See conformance/CROSS_LANGUAGE.md for the contract and how to add a 4th implementation.

license

MIT.

  • eddyflores100-lang/memex-legacy — Legacy Memex codebase (167 commits, AliceLabs Proprietary License). Python/ChromaDB memory system with MCP integration. Preserved for historical reference. NOT installed by pip install alethech.


Copyright (c) 2026 AliceLabs LLC. MIT License.

Available Tools

6 tools
memex_correctA

Correct a memory that is wrong or outdated, in one call: stores text as a new record superseding id. The old record is kept, marked superseded, and stays visible in memex_get's history -- nothing is deleted. id must come from a prior memex_recall or memex_get result; an unknown id is rejected. If id is already superseded, this reports the current replacement instead of writing, unless force=true. Do not use this for a brand-new, unrelated fact -- use memex_store instead.

Inputs: id (required), text (required), force, source, +3 more.

memex_getA
Read-onlyIdempotent

Fetch exactly one memory by id, verbatim, with its correction chain in both directions: what it replaced (oldest last) and what replaced it (newest last). Use this to resolve a "SUPERSEDED by " marker from memex_recall, or to confirm an id before passing it to memex_correct. An unknown id is an error. Do not use this to find a memory by topic -- use memex_recall instead.

Inputs: id (required).

memex_healthA
Read-onlyIdempotent

Check whether the memory backend is up, and see store-wide stats (current/superseded/expired counts, oldest/newest record, queue and dead-letter depth) in one call. Call this after any other memex_* tool returns isError, before retrying. Do not call this to search memory -- use memex_recall for that.

Inputs: no named parameters.

memex_recallA
Read-onlyIdempotent

Search stored memories for query. Call before answering questions about prior work, decisions, or past conversations. Default mode="fast" (vector search, ~0.1s); use mode="thorough" only when a fast result looks wrong or stakes are high (~3s, hybrid search). Current facts list first, superseded/expired after, marked. Every hit shows its id, status, and recorded date. Fix a stale hit with memex_correct; see its history with memex_get. Do not use this to store a new fact -- use memex_store instead.

Inputs: query (required), mode, as_of, limit, +1 more.

memex_recentA
Read-onlyIdempotent

List memories by recency, no search query needed -- good for "what changed recently" or catching up after time away. since (ISO-8601) is a lower bound: only records at or after it. kind="corrections" shows only memories that corrected an older one, with the id(s) they replaced. Do not use this to find a memory about a topic -- use memex_recall instead.

Inputs: kind, limit, since.

memex_storeA

Remember or store one new, self-contained memory verbatim -- exact text, not a summary. Optional valid_from/valid_to/event_at/source, and supersedes (ids this replaces; unknown or another user's ids are rejected). The reply echoes recorded_at and any declared window so you can confirm without a recall. Do not use this to correct something already in memory -- use memex_correct with the old id instead of storing a near-duplicate.

Inputs: text (required), source, event_at, metadata, +3 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.7/5.0

    Scored across 6 tools

    Disambiguation5/5

    Each tool has a clearly distinct role: recall searches, store adds, correct supersedes, get fetches by id, recent lists by time, and health checks backend status. There is no overlap, and the descriptions actively redirect misuse to the correct tool.

    Naming Consistency5/5

    All tools share the memex_ prefix followed by a single lowercase word, forming a predictable memex_<operation> pattern. While recent and health are not verbs, the naming is uniform and immediately readable.

    Tool Count5/5

    Six tools is a well-scoped size for a memory system: search, store, correct, retrieve, list, and health cover the core operations without redundancy. Each tool earns its place and the count feels neither thin nor heavy.

    Completeness5/5

    The surface covers the full memory lifecycle: storing, searching, retrieving by id, correcting with supersession, recency listing, and backend health. Deletion is intentionally omitted with supersession used instead, so there are no dead ends in the intended workflow.

    Maintenance

    ActivityActive
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      B
      maintenance
      Provides infinite long-term memory for AI agents with persistent, searchable storage of project details, preferences, and snippets. Reduces token costs by retrieving only relevant memories while keeping all data stored locally.
      160
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Local-first, multi-user shared memory for AI agents with semantic search, offline support, and team synchronization.
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Provides fully local long-term memory for AI agents by enabling semantic search over notes and session logs using Ollama embeddings, with no external APIs or databases.
      MIT
    • A
      license
      Not graded
      quality
      A
      maintenance
      Enables AI agents to capture, structure, remember, and retrieve source-backed memory as local Markdown files, with reviewable writes and no cloud dependency.
      221
      MIT