Skip to main content

Durable, explainable long-term memory for the llm CLI, powered by Engram (Lumetra)

Project description

llm-engram

Durable, explainable long-term memory for Simon Willison's llm CLI, powered by Engram (Lumetra).

llm-engram registers six tools that let any model running under llm store and recall facts across sessions, with semantic + knowledge-graph retrieval handled server-side.

Install

llm install llm-engram

(or, from a checkout: llm install -e .)

Configure

Get an API key at https://lumetra.io, then export it:

export LLM_ENGRAM_API_KEY=eng_live_...
# Optional: pin a default bucket so you don't have to repeat it
export LLM_ENGRAM_DEFAULT_BUCKET=my-project
# Optional: self-hosted Engram
export LLM_ENGRAM_API_BASE=https://engram.internal.example.com

ENGRAM_API_KEY is also accepted for parity with other Engram clients; LLM_ENGRAM_API_KEY wins if both are set.

Tools

Tool What it does
engram_store_memory Save an atomic fact/preference/decision. Args: content, optional bucket.
engram_query_memory Ask a natural-language question against memory. Args: question, optional bucket.
engram_list_memories List raw memories in a bucket. Args: optional bucket, limit, offset.
engram_list_buckets List buckets visible to this API key. Args: optional limit, offset.
engram_delete_memory Delete one memory by memory_id. Args: memory_id, optional bucket.
engram_clear_memories Wipe a bucket. Destructive. Args: optional bucket.

Usage

List the tools:

llm tools

One-shot:

llm -T engram_store_memory "Remember: I prefer pytest over unittest."
llm -T engram_query_memory "What testing framework do I prefer?"

Chat with memory wired in:

llm chat -T engram_store_memory -T engram_query_memory \
         -T engram_list_memories -T engram_list_buckets

Per-call bucket override:

llm -T engram_store_memory \
    "Q2 OKR: ship v2 of the ingest pipeline" \
    --tools-arg engram_store_memory bucket=work

Self-hosting

Point LLM_ENGRAM_API_BASE at any Engram-compatible REST endpoint. The plugin uses only the documented /v1/... routes.

Privacy

See PRIVACY.md.

License

MIT — see LICENSE.

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

llm_engram-0.1.0.tar.gz (5.5 kB view details)

Uploaded Source

Built Distribution

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

llm_engram-0.1.0-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: llm_engram-0.1.0.tar.gz
  • Upload date:
  • Size: 5.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.2

File hashes

Hashes for llm_engram-0.1.0.tar.gz
Algorithm Hash digest
SHA256 230a17f36f5e6337ead2692b8d0ce56e56162f74b42bb06a0f48d0eceba4d459
MD5 71405b03e4d362e9a5310ca9d3b6d890
BLAKE2b-256 49d211b655024bbc0186287a813a94937669821b7c28d7950c404e3fb947c20e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: llm_engram-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.2

File hashes

Hashes for llm_engram-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3c058a477ebd848e0240d8bc5cdb9cee5f193083e9a7e3b377015593932089ed
MD5 422bfde842b33428ddd234921b54312c
BLAKE2b-256 eec3a329820ddab5e10255b9f559d567159c5f3e876e6145e8e80ff62bea7d6e

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