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.1.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.1-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: llm_engram-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 0b1ea69ddcc9450d4e67ace3498aa43a2bdd4ada85969a41fd9dd15abb4f7413
MD5 035b4087709fa50840541331ff5d2319
BLAKE2b-256 1aeb78fbe852c579cec0b89721295e8bbb77bc9fa14b55ffe31c7a8561101d3e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: llm_engram-0.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 637cb1473d7add91fe19cf8a29cf17533a06c83a6c9bcc8df6c52dc571f8b7b5
MD5 48feea06b6c240dd26a54773b849244b
BLAKE2b-256 e810f118f93618132e2c77098f31b50f828e90f2b1a0c39ee51bda75fdad0631

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