CDS pluginCDS plugintypeInstalls into a CAP project and extends the runtime. CAP loads it through cds.requires or the plugin hook.See every one →What this type is →independently maintainedindependently maintainedoriginPublished by one person or a small company outside SAP. Says nothing about quality; the readings say that.See every one →

@mi8y/cap-agents-memory

A LangGraph Store written against CDS: the facts and preferences an agent keeps between sessions are entities in the CAP database, read and written inside a request handler under its tenant.

LangGraph splits an agent's state in two, a checkpointer for one thread and a Store for what has to outlive it. CdsMemoryStore implements the Store API, so a user's preferences and the facts an agent has learnt are rows in plugin.langgraph.memory.StoreItems, which cds add agent-memory writes into db/, and a call made inside a CAP request handler inherits the active database and tenant; the CDS queries behind it run on CAP's SQLite, SAP HANA and PostgreSQL adapters. Its operations are put, get, delete, search, listNamespaces and batch; without embeddings a search matches stored field values, and passing a LangChain Embeddings implementation embeds fields on write and the query on read, against a generated Vector(1536) field that has to be resized to the chosen model. Thread-scoped state is not its job: the author offers it as an add-on to @cap-js/agents, which keeps the model, the generated tools, the A2A endpoint and the checkpointer, so this package contributes the cross-session Store and the tools that read it. @mi8y/cds-langgraph-persistence held the thread-scoped half before that checkpointer arrived.

Facts

Latestv0.2.0ReleasedLast pushLicenceMIT

Where it sits

Lives in
Provides
Agent toolingCAPAgent toolingcapabilityBuilding an agent into your own application — the tools it may call, the state it keeps between turns, and the framework it runs in. Distinct from MCP servers, which expose an application to somebody else's agent, and from agent guidance, which is knowledge handed to a coding agent.
Flavors
Node.jsfrom its runtime
Requires
@sap/cds≥ 10@sap/cdsartifactThe peer range, as published.

Who is behind it

Merbin J AnselmMerbin J AnselmPersonMaintains this
In the atlas: maintains 6, contributes to 6
@anselm94
Mi8Y TechnologiesMi8Y TechnologiesOrganisationMaintains this
In the atlas: maintains 6
@mi8y
maintainers

Before choosing this

Conditions

LicenceSAP Developer License Agreement 3.2 CAP§ 1, 2, 3A cds-plugin is used with SAP CAP materials, or an artifact is explicitly identified as a CAP plugin or application.
  • § 1 License. Productive customer applications are limited to SAP BTP or another SAP-licensed platform, and mass extraction to a non-SAP product is restricted except where solely required for SAP interoperability.
  • § 2 Intellectual Property. The agreement retains SAP's rights in the covered materials and limits making APIs, tools or software available to third parties, while preserving ownership of customer applications subject to SAP's underlying rights.
  • § 3 Artificial Intelligence Training. The agreement prohibits use of the covered materials and customer applications for training artificial-intelligence models or systems.
SAP Developer License Agreement 3.2 CAP →
PolicySAP API Policy 4.2026a§ 2.2.2from Agent toolingAn agent built into an application reaches SAP Application APIs, whether directly or through tools generated from a service that proxies them.
  • § 2.2.2 AI call sequences and data extraction. Outside SAP-endorsed architectures, data services or expressly identified pathways, the policy prohibits specified agentic API use and systematic or large-scale extraction.

capire's own guide states that CAP-level agents are intended only for exposing custom CAP application services, and names section 2.2.2 for the agentic-access provisions. Check which endpoints the agent's tools end up calling, and consult SAP's reference architectures for the endorsed routes.

SAP API Policy 4.2026a →

What it declares

Every artifact

Type
CDS plugin
Origin
Independently maintained
Runtime
Node.js

As a CDS plugin

Declared for
>=10
Type declarations
declared
Distributed through
does not say

For agent tooling

What it brings
State between turns
Agent framework
LangGraph
Where state is kept
In the application database

Tasks this contributes to1Beta

Recall a user's preference in a later conversationSomething the agent was told or worked out in one conversation is available in the next one, so a returning user does not state their preferences again.Covers, under conditionscross-thread store
What it does

CdsMemoryStore implements LangGraph's Store API against CDS, so the facts and preferences the agent keeps are rows in the application's own database and are shared across threads. Called inside a CAP request handler it inherits the active database and the tenant, and the CDS queries behind it run on CAP's SQLite, SAP HANA and PostgreSQL adapters. Its author describes it as an add-on to the core plugin, which keeps the model, the generated tools, the A2A endpoint and the checkpointing while this contributes the cross-session store and the tools that read it.

Conditions

The agent runs on LangGraph, whose Store interface this implements.; @sap/cds 10 or higher and @langchain/core 1 or higher, which its README states as requirements.; The store is called inside a CAP request handler, which is how it inherits the active database and tenant context.; Finding a memory by meaning rather than by stored value needs a LangChain Embeddings implementation passed in, and the generated Vector(1536) field resized to the chosen model.

Remaining work

Decide what is worth remembering and under which namespace, and write the prompt or the tool call that reads it back; the package supplies the store and its operations, not a policy for what an agent should keep.

All options on the Agent tooling page →

Connections1

Install

npm add @mi8y/cap-agents-memory

Derived from the package name. No recipe recorded; the README has the configuration.

README

quoted from mi8y/cap-agents-addons under MIT, read
mi8y/cap-agents-addons/packages/cap-agents-memory/README.mdOn GitHub

@mi8y/cap-agents-memory

npm version

CDS-backed long-term memory for LangGraph. CdsMemoryStore implements LangGraph's Store API, so facts and preferences can be shared across threads while remaining within CAP's database and tenant context.

Installation

npm install @mi8y/cap-agents-memory
cds add agent-memory

The add command creates db/agent-memory.cds with StoreItems and StoreItemFields in the plugin.langgraph.memory namespace. It never overwrites an existing generated file.

Requires @sap/cds >= 10 and @langchain/core >= 1.

Usage

import { CdsMemoryStore } from "@mi8y/cap-agents-memory";

const store = new CdsMemoryStore({ name: "support-memory" });
const graph = builder.compile({ store });

await store.put(["users", "alice"], "profile", {
  preferredTone: "concise",
  lastTopic: "travel",
});

const profile = await store.get(["users", "alice"], "profile");

name is required and becomes graphName in CDS, isolating multiple stores that share a database. Unlike checkpointers, a Store is long-lived and can be read from any graph thread.

Custom entities

The generated entities are defaults. Define your own entities by implementing the exported aspects, then pass their fully qualified names to the Store.

using { StoreItem, StoreItemField } from '@mi8y/cap-agents-memory';

namespace my.app.memory;

entity Items : StoreItem {
    fields : Composition of many Fields on fields.item = $self;
}

entity Fields : StoreItemField {
    item : Association to Items
        on item.graphName = $self.graphName
        and item.namespace = $self.namespace
        and item.id = $self.id;
    embedding : Vector(3072);
}
const store = new CdsMemoryStore({
  name: "support-memory",
  fqnStoreItemsEntity: "my.app.memory.Items",
  fqnStoreItemFieldsEntity: "my.app.memory.Fields",
});

API

new CdsMemoryStore(config);
OptionTypeDescription
namestringRequired store name used for isolation.
embeddingsEmbeddingsOptional LangChain embeddings implementation.
fqnStoreItemsEntitystringDefaults to plugin.langgraph.memory.StoreItems.
fqnStoreItemFieldsEntitystringDefaults to plugin.langgraph.memory.StoreItemFields.

Supported Store operations are put, get, delete, search, listNamespaces, and batch.

Namespaces are non-empty arrays of non-empty strings. A label cannot contain . and the root langgraph namespace is reserved.

Search and filtering

search(namespacePrefix, options) supports query, filter, limit, and offset. Without embeddings, query matches stored field values. Metadata filters support direct equality and $eq, $ne, $in, and $notIn operators.

Provide embeddings to embed stored fields on put and query text on search for vector-assisted search. The generated Vector(1536) field must be changed to match the selected embedding model's dimensions.

CAP notes

  • Use the Store inside CAP request handlers to inherit the active database and tenant context.
  • CAP-supported SQLite, SAP HANA, and PostgreSQL adapters are supported by the CDS query implementation.
  • Use a checkpointer for short-term, thread-scoped graph state; use this package for cross-thread long-term memory.

License

MIT License

MIT, read

History

Latest

v0.2.0

Features 1

Notes
Minor Changes
  • 3c2c79e: Add CdsMemoryStore, a CDS-backed implementation of LangGraph long-term memory, with reusable CDS aspects and cds add agent-memory.
10downloads per week, npm
Weekly downloads for @mi8y/cap-agents-memory26 complete calendar weeks from 2026-04-20 to 2026-10-18; the latest total is 10.20 Apr – 26 Apr: 027 Apr – 3 May: 04 May – 10 May: 011 May – 17 May: 018 May – 24 May: 025 May – 31 May: 01 Jun – 7 Jun: 08 Jun – 14 Jun: 015 Jun – 21 Jun: 022 Jun – 28 Jun: 029 Jun – 5 Jul: 06 Jul – 12 Jul: 013 Jul – 19 Jul: 020 Jul – 26 Jul: 027 Jul – 2 Aug: 03 Aug – 9 Aug: 010 Aug – 16 Aug: 017 Aug – 23 Aug: 024 Aug – 30 Aug: 031 Aug – 6 Sept: 07 Sept – 13 Sept: 014 Sept – 20 Sept: 9621 Sept – 27 Sept: 1628 Sept – 4 Oct: 105 Oct – 11 Oct: 412 Oct – 18 Oct: 10
Agent tooling
  1. a2a-pluginExposes an annotated CDS service as an Agent-to-Agent agentfrom CAP
  2. com.sap.cds:cds-adapter-agentA2A adapter turning a CAP Java service into an LLM-backed agentfrom CAP
  3. @cap-js/agentsCDS plugin for building agents inside a CAP servicefrom CAP
  4. cap-agent-ui5-webuiUI5 web interface for an agent built in a CAP servicefrom CAP
  5. @mi8y/cap-agents-sdm-backendDeep Agents filesystem over an SAP Document Management repositoryfrom CAP
  6. @mi8y/cds-langgraph-persistenceLangGraph checkpointer backed by CDS for CAP agentsfrom CAP
  7. cds-agentsToolkit turning a CAP service into tools for agent frameworksfrom CAP
  8. Joule Studio, classic editionLow-code SAP Build capability for custom Joule skills and agentsfrom BTP/BAIP
  9. @sap/joule-studio-cliCLI for Joule digital assistants and Joule Studio solutionsfrom BTP/BAIP
  10. Joule StudioSAP's managed environment for building custom agents and workflowsfrom Across stacks
  11. @sap/joule-work-dev-cli-early-adoptersPro-code CLI for building and deploying Joule Studio solutionsfrom BTP/BAIP
  12. SAP JouleSAP's AI engagement layer across SAP applicationsfrom BTP/BAIP
  13. @saptarishi/cds-plugin-llmCAP service kind putting eleven model providers behind one APIfrom CAP

Details

Sources4
Added by handdiscovered herechecked
npm registry, @mi8y/cap-agents-memoryversion, releases, installschecked
github.com/git+https://github.com/mi8y/cap-agents-plugins.gittree, pushes, contributors, CIchecked
packages/cap-agents-memory/README.mdquoted, and what the entry declareschecked

Sources are graph entities: the same page may back several entries, and an unreachable source flags every row that rests on it.

Compatibility and provenance
runtimesnode
declared for>=10
latestv0.2.0
first release
releases and cadence1
discovered viaAdded by hand
first seen in the atlas
ecosystem and domaincap, ai-and-agents
History in the atlas3
  1. brings: State between turns, harness: LangGraph, state_store: In the application database
  2. LangGraph splits an agent's state in two, a checkpointer for one thread and a Store for what has to outlive it. `CdsMemoryStore` implements the Store API, so a user's preferences and the facts an agent has learnt are rows in `plugin.langgraph.memory.StoreItems`, which `cds add agent-memory` writes into `db/`, and a call made inside a CAP request handler inherits the active database and tenant; the CDS queries behind it run on CAP's SQLite, SAP HANA and PostgreSQL adapters. Its operations are `put`, `get`, `delete`, `search`, `listNamespaces` and `batch`; without embeddings a search matches stored field values, and passing a LangChain `Embeddings` implementation embeds fields on write and the query on read, against a generated `Vector(1536)` field that has to be resized to the chosen model. Thread-scoped state is not its job: the author offers it as an add-on to [@cap-js/agents](artifact:cap-js-agents), which keeps the model, the generated tools, the A2A endpoint and the checkpointer, so this package contributes the cross-session Store and the tools that read it. [@mi8y/cds-langgraph-persistence](artifact:mi8y-cds-langgraph-persistence) held the thread-scoped half before that checkpointer arrived.
  3. First seen.
For your agent
Ref
artifact:mi8y-cap-agents-memory
JSON
/artifacts/mi8y-cap-agents-memory.json
MCP
Connecting an agent