Use the Agent Memory Service

Updated at:
Copy as MD

This document describes how to access the Agent Memory Service (AMS) in the console and how to create and manage agent identities, memory spaces, and endpoints.

Navigate to Agent Memory Service

  1. Log on to the Alibaba Cloud Vector Engine with Milvus console.

  2. In the left-side navigation pane, choose AI Center > Agent Memory Service.

  3. On the Agent Memory Service page, switch between the following tabs as needed:

Tab

Purpose

Agent Identity Management

Create and manage agent identities to obtain an Agent ID, a default memory space, and an API key.

Memory Space

View the persistent memory spaces used by agents. You can search for memory spaces by status or name.

Access Point List

Create and manage AMS endpoints to obtain access addresses for your applications.

Create an agent identity

  1. On the Agent Identity Management tab, click Add Agent Identity.

  2. In the panel that appears, enter the agent information.

    Parameter

    Required

    Description

    Agent name

    Yes

    The display name of the agent. We recommend using a name that helps distinguish its business, environment, or purpose, such as Coding Agent or Review Agent.

    Memory extraction language

    No

    Specifies the default language for memory extraction for the agent. Currently, Chinese and English are supported, with Chinese as the default.

    Description

    No

    A description of the agent's purpose, for example, "Responsible for code writing and technical decisions."

  3. Click Confirm to create the agent identity.

  4. After the agent identity is created, view and record the following information in the agent identity list:

    Field

    Description

    Agent ID

    The unique identifier for the agent, used to identify the agent identity in the console. You typically do not need to explicitly pass this ID when accessing the service through Mem0-compatible protocols.

    Default memory space

    The ID of the default memory space that is automatically provisioned when you create an agent identity. You can use this ID as the app_id in Mem0-compatible API calls.

    Associated memory spaces

    The number of memory spaces currently associated with the agent.

    API key

    The access credential for the agent. The value is masked by default in the list. You can click the copy icon to copy the full value.

    Memory extraction language

    The default memory extraction language used by the agent.

Manage agent identities

On the Agent Identity Management tab, you can perform the following operations:

  • In the search box, enter an agent name or Agent ID to quickly find the target agent.

  • Click the refresh icon to reload the list of agent identities.

  • Click the copy icon next to an Agent ID, default memory space, or API key to copy its value.

  • In the Actions column, click Delete and follow the console prompts to delete an unused agent identity.

Before you delete an agent identity, ensure the caller has stopped using the corresponding API key and assess the impact on the default memory space and historical memory data. The console's confirmation prompt specifies the actual scope of deletion.

View memory spaces

  1. On the Agent Memory Service page, switch to the Memory Space tab.

  2. Use the status filter to filter memory spaces by Enabled or Disabled.

  3. In the search box, enter a memory space name or ID to find the target memory space.

  4. View the memory space information in the list.

Field

Description

Memory space ID

The unique identifier of the memory space. You can use this ID as the project_id or app_id in Mem0-compatible API calls.

Name

The name of the memory space. A default memory space is typically named Default workspace for <Agent>.

Type

The type of the memory space, for example, private.

Status

The status of the memory space, for example, Enabled.

Creation time

The time when the memory space was created.

Description

A description of the memory space's purpose.

To delete a memory space, click Delete in the Actions column and follow the prompts in the console to confirm the deletion. Before deleting, ensure no agent or application depends on the memory space.

Create an endpoint

  1. On the Agent Memory Service page, switch to the Access Point List tab.

  2. Click Create Access Point.

  3. In the panel that appears, enter the endpoint information.

    Parameter

    Required

    Description

    Access point name

    Yes

    The name of the endpoint, for example, prod-ap-01. We recommend using a name that reflects the environment, network, or business purpose.

    Network source

    Yes

    Select Public Network or Internal Network. The public network is suitable for calls from the internet, while the internal network is suitable for calls from a VPC in the same region or an internal network.

  4. Click Confirm to create the endpoint.

  5. After the endpoint is created, wait for its status to change to Running.

  6. In the endpoint list, copy the Access Point Alias to use as the access address for your application.

Manage endpoints

On the Access Point List tab, you can perform the following operations:

  • In the search box, enter an endpoint name or ID to quickly find the endpoint.

  • Click the refresh icon to reload the endpoint list.

  • Click the copy icon next to an Access Point Alias to copy the access address.

  • Click Details to view basic information such as the endpoint name and network source.

  • Click Delete Access Point and follow the console prompts to delete an unused endpoint.

Deleting an endpoint affects applications that use this address to access AMS. Before deleting, ensure all callers have either switched to a new endpoint or stopped making calls.

Application integration

When an application integrates with AMS, the following configurations are typically required:

Configuration

Source

baseUrl

Append :1995/mem0 to the endpoint alias from the endpoint list. The endpoint is typically configured as http://<endpoint alias>:1995/mem0.

apiKey

The API key from the Agent Identity Management list. The API key is already bound to an agent identity, so you do not need to pass the Agent ID when using Mem0-compatible protocols.

user_id

A custom ID for the memory subject defined by the caller, typically a business user ID.

app_id

The ID of the default memory space or a target memory space. If not explicitly passed, AMS uses the default memory space bound to the API key.

run_id

A custom session ID defined by the caller, used to distinguish between different sessions.

The agent identity is identified by the API key. The Agent ID in the console is used for management and troubleshooting. When an application makes calls using the Mem0 protocol, you typically only need to pass the business-side user_id and run_id. If you need to specify a memory space, you can pass the app_id. If you do not pass it, the service uses the default memory space bound to the API key.

The authentication header supports the following two formats:

Authorization: Token <api_key>
Authorization: Bearer <api_key>

Recommendations

  • Use a dedicated agent identity and API key for each production agent, environment, or business system.

  • Store API keys in a key management system. Do not commit them to code repositories, include them in documentation screenshots, or write them to logs.

  • When you need to isolate memory data, use different memory spaces and explicitly pass the app_id in your requests.

  • For conversational applications, we recommend maintaining a stable run_id to distinguish between different session contexts.

  • Confirm your network access policies before using a public network address. For internal systems, prioritize using an internal network endpoint.

  • Before deleting an agent identity, memory space, or endpoint, assess the impact on dependent applications and data.