Skip to main content

Leaxp

Leaxp

CI codecov PyPI Python License

Learn -> experience — a bridge sharing experience between agentic sessions. Package and distribute agent skills, knowledge, and experience as portable .xp files.

Leaxp gives every project a searchable knowledge database (.xp/ — Markdown records indexed by a small local embedding model) and exposes it to coding agents through three MCP tools: recall, expand, remember. Knowledge is learned by your own agent CLI (claude / codex) — no external LLM API, no keys. Smaller context, cheaper inference, model-agnostic.

Status: MVP — file-based installs work end-to-end; GitHub and registry sources are coming.

Install

pip install leaxp

That's it — search runs on a small local ONNX embedding model (fastembed); no torch, no services, no API keys.

Quickstart

exp use --with claude       # wire MCP + hooks, create .xp/, leaxp.toml, leaxp.lock
exp learn --goal "onboard new contributors"   # drive claude/codex to distill the codebase
exp share -o my-project.xp  # pack .xp/local/ into a shareable archive

# on another machine / project
exp install -f my-project.xp          # unpack into .xp/share/<name>/ + index
exp install -f my-project.xp --self   # ...or into .xp/local/ for editing
exp sync                              # reindex .xp/ after editing records by hand
exp exec "create stripe subscription" # print the raw recall output for a query
exp mcp                               # (run by your agent) serve recall/expand/remember

Once wired, agents get an initial memory recall on their first prompt and can:

  • recall(query, subquery?, limit?) — search records; returns scored titles + expected outcomes grouped into <package> blocks, low-relevance hits filtered out. Conventional records come fully expanded as <rule> entries in a separate <conventions> block.
  • expand(id | [ids]) — fetch full Markdown bodies, one record or several at once
  • remember(title, description, content, id?, convention?) — write or update knowledge; pass convention=true to record a one-paragraph rule that renders in full on every matching recall

Concepts

  • Record — one Markdown file with YAML frontmatter under .xp/local/ (git-tracked, yours) or .xp/share/<pkg>/ (installed, git-ignored). Record titles follow [action] [package|entity] [subject?] — e.g. create stripe subscription — so searches and titles speak the same language.
  • Convention — a record flagged convention: true: a one-paragraph rule (naming, structure, which tool/skill to use) that recall renders in full, no expand needed. Searched separately from regular records.
  • Indexindex.npy + index.json; exactly one vector per Markdown-heading breadcrumb (Stripe API > Webhooks > Error Handling), searched by cosine similarity with a relevance floor so agents never wade through noise. Recall groups results by package, labeling each with its description (from leaxp.toml for local, from the install manifest for shared packages).
  • .xp file — zip of record Markdown + a sha256-signed manifest. Embeddings are recomputed locally on install, so the same pack works with any embedding model.

Project structure

See CLAUDE.md for the package architecture overview and AGENTS.md for coding-agent ground rules. Release notes live in CHANGELOG.md; the release process in RELEASING.md.

Development

uv sync                                  # create venv, install deps
uv run pre-commit install                # enable hooks
uv run ruff check . && uv run pyright    # lint + typecheck
uv run pytest --cov                      # tests with coverage
uv run exp --help

License

Apache-2.0 — see LICENSE.txt.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

leaxp-0.2.0.tar.gz (57.7 kB view details)

Uploaded Source

Built Distribution

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

leaxp-0.2.0-py3-none-any.whl (62.1 kB view details)

Uploaded Python 3

File details

Details for the file leaxp-0.2.0.tar.gz.

File metadata

  • Download URL: leaxp-0.2.0.tar.gz
  • Upload date:
  • Size: 57.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for leaxp-0.2.0.tar.gz
Algorithm Hash digest
SHA256 5552a0c4958b3097dfb0767d11c16abb9682d7861e3860aef21ff89b2a182513
MD5 f8d14108ea072cc968aa216c2b673dd5
BLAKE2b-256 8dd49580efc6a3a46689e1a933de37fa0eaca26ffe502b4e48ef5016fd7f81df

See more details on using hashes here.

Provenance

The following attestation bundles were made for leaxp-0.2.0.tar.gz:

Publisher: release.yml on vunone/leaxp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file leaxp-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: leaxp-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 62.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for leaxp-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ee2a622731b1f17f10ffd86a15997404a59641bd97d937e10dbfa3737cab0fd8
MD5 01a1589b744aaf4d52d00ea66f283484
BLAKE2b-256 962ae12d56cf49e7cf48daa251f47193541426f5b4c703c1b13f9e1d5610293d

See more details on using hashes here.

Provenance

The following attestation bundles were made for leaxp-0.2.0-py3-none-any.whl:

Publisher: release.yml on vunone/leaxp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.5.1

2 files

0.5.0

2 files

0.4.0

2 files

0.3.0

2 files

0.2.1

2 files

This release

0.2.0 This release

2 files

0.1.0

2 files

0.0.4

2 files

0.0.3

2 files

0.0.2

2 files

0.0.1

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page