Service overview
Lindorm Long-term Memory Service is a memory service of Lindorm, a cloud-native multi-model database, that provides memory extraction, storage, management, and retrieval for large language model (LLM) applications. The service continuously extracts user profiles, episodic memories, event logs, and Agent experience from conversations. Keyword retrieval, vector retrieval, and hybrid retrieval return the memories and context relevant to the current question.
Long-term Memory Service is suitable for AI scenarios such as personalized assistants, intelligent customer service, continuous conversations, and Agent experience reuse. It helps applications retain user preferences and historical information across multi-turn and cross-session interactions. This topic describes the core capabilities and prerequisites of Long-term Memory Service.
Core capabilities
Long-term Memory Service provides the following capabilities:
Automatic extraction and continuous accumulation — Write conversation messages by session. The service automatically segments the messages and extracts memories asynchronously, converts conversation content into retrievable structured memories, and continuously updates the user profile.
Hybrid retrieval and source tracing — Query relevant memories by user scope, memory type, and filter conditions through keyword retrieval, vector retrieval, or hybrid retrieval. You can also retrieve source messages and evidence segments to support answer generation.
Unified user context — Retrieve the user profile and the relevant memories in one call to build an Agent system prompt and provide context for personalized responses and continuous interactions.
Flexible management and easy integration — Use REST APIs to import, query, update, and delete memory records manually. The service also provides management capabilities for projects, access keys, extraction tasks, and quotas.
Terms
The following table describes the terms used in Long-term Memory Service.
| Term | Description |
| Session | A collection of conversation messages. The application specifies the session ID. |
| Source segment (MemCell) | A continuous segment divided from conversation messages. Source segments are used to extract memories and trace the original conversation, and correspond to the mem_cell type and related API fields. |
| Extraction task | A task that extracts memories from conversation messages. You can query the task status by task ID. |
Event logs (event_log) | Specific facts or events extracted from a conversation. |
Episodic memory (episodic_memory) | A summary of a conversation scenario. |
Agent case (agent_case) | An experience case formed when an Agent completes a task. |
Agent skill (agent_skill) | Reusable Agent experience or skills. |
| User profile | The aggregate result of user characteristics. You can read and maintain the user profile through the profile API. |
Prerequisites
Before you use Long-term Memory Service, complete the following steps:
Enable LindormTable, the search engine, the vector engine, and the AI engine. You must enable the commercial model capabilities.
Contact the developers for assistance with the initial enablement configuration of Long-term Memory Service.
After enablement, you can create projects and access keys, and then call Long-term Memory Service APIs through the service endpoint. The service endpoint includes a protocol, hostname, and port.
Integration methods
Long-term Memory Service provides two categories of APIs:
Native API — Used for operations on sessions, extraction tasks, memories, profiles, and user context. Native API paths begin with
/lmemo/v1/.Project and key management API — Used to create projects and manage Secret Keys (SK). Paths begin with
/lmemo/project/and use a Lindorm instance account for authentication.
An SK is used for project-level authentication. The user_id parameter specifies the user scope within a project and is set by the application based on the logged-in user.
Start with the project and key management API to create a project and an SK. Then use the native API for runtime operations on sessions, extraction tasks, memories, profiles, and user context.
API conventions
Response format
Native API paths begin with /lmemo/v1/. When you process a response, check the HTTP status code first, and then read the business result.
| HTTP status code | Description |
| 200 | The request succeeded. The response contains the request identifier request_id and the business data in data. |
| 400 | A business request parameter is invalid. |
| 401 | Authentication or project access failed. |
Success response for an empty list
{
"request_id": "req-example",
"data": {
"items": [],
"pagination": {
"page": 1,
"page_size": 20,
"total": 0,
"has_more": false
}
}
}The pagination object contains pagination information and is returned only by the list APIs that support pagination. Pagination capabilities vary by API. For details, see the documentation of the relevant API.
Error response for an invalid business request parameter
{
"error_code": "bad_request",
"message": "user_id is required"
}Error response for failed authentication
{
"error": {
"code": "UNAUTHORIZED",
"message": "Authentication failed"
}
}For the response format of the project and key management API, see the corresponding API reference.
Time fields
For a request parameter that is marked as a millisecond timestamp, pass an integer. Time fields returned by the native API, such as created_at, updated_at, and mentioned_at, are usually strings in ISO 8601 format. Fields that end with _ms are millisecond timestamps. The event_time field is event time text in memory records and an ISO 8601 time string in original evidence segments. Process event_time according to the field description of the relevant API.