Skip to main content

Agent Memory Service

The Agent Memory Service provides a persistent, tenant-isolated store backed by SAP HANA Cloud. It exposes two APIs: the Messages API for short-term conversation history per session, and the Memories API for long-term semantic storage with similarity search across sessions.

Version requirement

Agent Memory Service requires sap-cloud-sdk >= 0.36.0.

Basic Setup

Use create_client() to get a client with automatic credential detection:

from sap_cloud_sdk.agent_memory import create_client

client = create_client()

memories = client.list_memories(agent_id="my-agent", invoker_id="user-123")
print(f"Found {len(memories)} memories")
)

For the complete API reference and more examples, see the Agent Memory user guide in the cloud-sdk-python repository.