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 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, low-relevance hits filtered out
  • expand(id | [ids]) — fetch full Markdown bodies, one record or several at once
  • remember(title, description, content, id?) — write or update knowledge

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.
  • 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.
  • .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.

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.1.0.tar.gz (52.1 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.1.0-py3-none-any.whl (56.8 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for leaxp-0.1.0.tar.gz
Algorithm Hash digest
SHA256 fa9a8f0b1d4dddbfa6f2572203b300d530c0b0f06fa1e51e7c038f35391cb176
MD5 438df5f4c48e73bed763f3252d1dbdba
BLAKE2b-256 8659cff4e42d65ef4ea5668720ff781aa2fdb56851901a25e3081b2863ad88b4

See more details on using hashes here.

Provenance

The following attestation bundles were made for leaxp-0.1.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.1.0-py3-none-any.whl.

File metadata

  • Download URL: leaxp-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 56.8 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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 629e027fd6c3ec9d32d4a7041915203503d58ac3b83aa44ae48b7f87476dc6ad
MD5 85209fe79cf11bca0875671bcb29f2f3
BLAKE2b-256 b77ddaee09fe6dc86daf64b67c0bf6f324c9f1b89efae66d9ee879506412ab70

See more details on using hashes here.

Provenance

The following attestation bundles were made for leaxp-0.1.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

0.2.0

2 files

This release

0.1.0 This release

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