Skip to content

feat(examples): add persistent memory with Loom - #2076

Open
zlareb1 wants to merge 1 commit into
anthropics:mainfrom
zlareb1:examples/loom-persistent-memory
Open

zlareb1 wants to merge 1 commit into
anthropics:mainfrom
zlareb1:examples/loom-persistent-memory

Conversation

@zlareb1

@zlareb1 zlareb1 commented Nov 20, 2026 •

Copy link
Copy Markdown

Summary

Add a persistent-memory example that passes AsyncLoomMemoryTool directly to the native asynchronous tool runner. Two invocations have separate conversation histories and share a configured Loom document store.

The standalone script uses PEP 723 and pins Anthropic 2.11.0 and the Loom SDK at 8157a0415d8e8d1d072d87ddef9b8cde652fa6c7. It requires Python 3.11 or newer; running it directly on Python 3.10 exits before importing Loom or constructing clients. The companion guide covers namespace authorization, retained documents, provider processing and API charges.

The contribution does not change project dependencies, lockfiles, generated workflows, default Python or existing checks.

Validation

  • Installed the pinned SDK with Anthropic 2.11.0 in an isolated Python 3.11 environment. Strict Pyright passes for the complete supported branch using the repository's strict settings. A temporary wrong-type assignment in that branch failed as expected; restoring the file passed.
  • The same script loads real imports and prints usage when invoked with --help on Python 3.11. A native Python 3.10 invocation exits with the exact version message. Ruff format/check passed for the script.
  • A standalone uv run --python 3.11 --script examples/memory/loom_memory.py --help invocation installed the inline dependencies and printed usage.
  • Four offline checks passed with the pinned SDKs and mock HTTP responses. They covered creating and reading a document from an in-memory test store across two separate conversations, a refused write, invalid path handling, and cleanup after a model HTTP 500 response. No live model or Loom server was called. These checks do not verify live persistence or recall.
  • Hosted CI remains required. No hosted result is available for this head. The default Python 3.10 checker does not validate the Python 3.11+ branch.

Disclosure

I work on Loom. This example was prepared with AI assistance. It does not imply Anthropic endorsement of Loom.

Signed-off-by: zlareb1 <lareb.zafar@clickhouse.com>
@zlareb1
zlareb1 requested a review from a team as a code owner November 20, 2026 00:51

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant