Experimental Letta archival-memory adapter for Stigmem.
Project description
stigmem-plugin-letta-adapter
Bridges Stigmem with Letta, the open-source memory and persistence layer for LLM agents.
This package is experimental and opt-in. Installing it makes the
letta-adapter plugin discoverable through the stigmem.plugins entry-point
group; host applications still choose when to call the adapter.
Federation model
| Layer | Scope | Memory style |
|---|---|---|
| Stigmem | Multi-agent, cross-session | Shared coordination facts (typed, auditable) |
| Letta | Per-agent, in-context | Persistent blocks (core, archival, recall) |
The adapter writes Stigmem facts into a Letta agent's archival memory as
[stigmem]-tagged passages and reads them back as Stigmem-compatible records.
Native Letta passages can be returned as letta:archival_memory fallback
records or filtered with stigmem_only=True.
Design
- Facts are serialized as structured text with a
[stigmem]prefix. pull_from_letta()parses the prefix back to fact fields.batch_push_to_letta()pushes multiple facts to the same target agent.lettais a lazy optional import; discovery and tests do not require it.
Files
| File | Purpose |
|---|---|
src/stigmem_plugin_letta/adapter.py |
Bridge adapter - serialization, Letta archival memory push/pull |
src/stigmem_plugin_letta/manifest.py |
Stigmem plugin discovery manifest |
tests/conftest.py |
pytest path setup |
tests/test_letta_adapter.py |
Unit tests (Letta client mocked; no live deps required) |
Installation
python -m pip install 'stigmem-plugin-letta-adapter>=0.1.0,<2.0.0'
Install Letta only in deployments that run the live bridge:
python -m pip install 'stigmem-plugin-letta-adapter[letta]>=0.1.0,<2.0.0'
Requirements
- Python >= 3.11
stigmem-py:pip install stigmem-py(or from workspace)letta: optional runtime extra for live Letta calls; unit tests and plugin discovery do not require it.- A running Letta server for live use:
letta server(default:http://localhost:8283)
Environment variables
LETTA_URL=http://localhost:8283 # default
LETTA_TOKEN=your-token # optional for local server
Usage
Push a fact into a Letta agent's memory
from stigmem_plugin_letta import StigmemLettaAdapter
bridge = StigmemLettaAdapter.from_env()
fact = {
"entity": "project:loom",
"relation": "roadmap:phase",
"value": {"type": "string", "v": "phase-6"},
"source": "agent:distsyseng",
"scope": "company",
"confidence": 1.0,
}
bridge.push_to_letta(fact, agent_id="your-letta-agent-uuid")
Seed an agent at startup
from stigmem import StigmemClient
client = StigmemClient(url="http://localhost:8765")
page = client.query(entity="project:loom", scope="company")
bridge.batch_push_to_letta(
[f.model_dump() for f in page.facts],
agent_id="your-letta-agent-uuid",
)
Pull agent memory as Stigmem records
records = bridge.pull_from_letta(
agent_id="your-letta-agent-uuid",
scope="company",
)
stigmem_records = bridge.pull_from_letta(
agent_id="your-letta-agent-uuid",
scope="company",
stigmem_only=True,
)
Enable
The adapter has no node-global behavior gate at v0.1.0. Enable it in the host
application by installing the package and importing
stigmem_plugin_letta.StigmemLettaAdapter.
python -m pip install 'stigmem-plugin-letta-adapter>=0.1.0,<2.0.0'
python -m pip install 'stigmem-plugin-letta-adapter[letta]>=0.1.0,<2.0.0' # live Letta bridge
stigmem plugins list
Disable
Remove the adapter from the host application path and restart the process that loads plugins. If it was installed only for this integration, uninstall it:
python -m pip uninstall stigmem-plugin-letta-adapter
Test
cd experimental/letta-adapter
python -m pytest tests/ -v
No live Stigmem node or Letta server required; the letta module is mocked in
the test suite.
Uninstall
python -m pip uninstall stigmem-plugin-letta-adapter
Invariants
- The adapter only appends to archival memory; it never modifies core memory blocks or deletes passages.
- Letta is a secondary enrichment layer. Failures in
push_to_lettaorpull_from_lettado not affect Stigmem availability. - Callers own retry, circuit-breaker, and prompt/write policy.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file stigmem_plugin_letta_adapter-0.1.0.tar.gz.
File metadata
- Download URL: stigmem_plugin_letta_adapter-0.1.0.tar.gz
- Upload date:
- Size: 11.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
154d32ce45c7a629ee590a456ed45e4d41d9898b2b4b54e6e798b7b5c2d07546
|
|
| MD5 |
0a9505d830fcaf318767abbfd7b8e970
|
|
| BLAKE2b-256 |
c8a13f00b7cd18a64f407c63ee17bcb9b1d218e52230d2ca93ec0a5a818ffbed
|
Provenance
The following attestation bundles were made for stigmem_plugin_letta_adapter-0.1.0.tar.gz:
Publisher:
publish.yml on eidetic-labs/stigmem
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
stigmem_plugin_letta_adapter-0.1.0.tar.gz -
Subject digest:
154d32ce45c7a629ee590a456ed45e4d41d9898b2b4b54e6e798b7b5c2d07546 - Sigstore transparency entry: 1707450355
- Sigstore integration time:
-
Permalink:
eidetic-labs/stigmem@5fcb5ce3da27ead0e99d41d34fea319601190158 -
Branch / Tag:
refs/tags/v0.9.0a10 - Owner: https://github.com/eidetic-labs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@5fcb5ce3da27ead0e99d41d34fea319601190158 -
Trigger Event:
push
-
Statement type:
File details
Details for the file stigmem_plugin_letta_adapter-0.1.0-py3-none-any.whl.
File metadata
- Download URL: stigmem_plugin_letta_adapter-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
840614513700cdd3c1dd02c9b02e0b0860ff5c369498ba3d8e8960cd7e832323
|
|
| MD5 |
c0396cd21934adf11f6754831d7f69cb
|
|
| BLAKE2b-256 |
7b9efbdcb66b59b720361d8f724c4228370f575c625963a11c26969b5ff5097e
|