Skip to content

Conversation

@chentschel
Copy link
Contributor

Introducing @langchain/zkstash

This PR introduces the @langchain/zkstash provider, a managed Long-Term Memory (LTM) for autonomous agents.

Key Components

ZkStashMemoryMiddleware: A comprehensive Agent Middleware that automates the LTM lifecycle:

  • Performs sliding-window semantic search and injects relevant context before the LLM call.
  • Automatically extracts new structured knowledge from Human-AI interaction pairs and saves it to the agent's brain.
  • Uses a configurable search context window to provide semantic depth for follow-up user queries (e.g., "Why?").
  • History Hygiene: Implements ID-based message replacement (RemoveMessage) to prevent conversation history bloat.

ZkStashRetriever: A standard BaseRetriever implementation for manual or agentic semantic search across zkStash memories.

ZkStashStore: A BaseStore implementation. By mapping keys to zkStash schemas, agents can use to manage their complex, persistent knowledge base.

@changeset-bot
Copy link

changeset-bot bot commented Dec 19, 2025

⚠️ No Changeset found

Latest commit: 6849e1e

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

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