Skip to main content
Memory Stores

列出 Memory Store

列出当前账户可见的 Forward Memory Store。

获取当前账户可见的 Memory Store 列表,按 ID 倒序、支持游标翻页。 响应包含系统在 Session 创建时自动配的 identity 默认库system_managed=true),这是与通用 GET /api/v1/forward/resources?type=memory_store 的区别 —— 通用列表只返回用户显式创建的库。

路径

GET /api/v1/forward/memory_stores

请求头

头部必选说明
AuthorizationBearer <PAT 或 admin SAT>

查询参数

参数类型必选说明
limitinteger每页返回数量上限,1..100,默认 20。
before_idstring向前翻页游标,与 after_id 互斥。
after_idstring向后翻页游标,与 before_id 互斥。
system_managedboolean三态过滤:true 只返回系统默认库;false 只返回用户创建的库;不传不过滤。

示例请求

# 基本列表
curl -X GET "https://api.qoder.com/api/v1/forward/memory_stores" \
  -H "Authorization: Bearer $QODER_ACCESS_TOKEN"

# 分页
curl -X GET "https://api.qoder.com/api/v1/forward/memory_stores?limit=10&after_id=memstore_xxx" \
  -H "Authorization: Bearer $QODER_ACCESS_TOKEN"

# 只看用户创建的库
curl -X GET "https://api.qoder.com/api/v1/forward/memory_stores?system_managed=false" \
  -H "Authorization: Bearer $QODER_ACCESS_TOKEN"

示例响应

HTTP 200 OK
{
  "data": [
    {
      "id": "memstore_00mc7mukn7lkxr454tjd",
      "type": "memory_store",
      "name": "project-alpha-memory",
      "description": "Alpha 项目的 Agent 知识库",
      "status": "active",
      "entry_count": 12,
      "total_size": 4096,
      "metadata": {"created_by": "forward", "team": "backend"},
      "system_managed": false,
      "identity_id": null,
      "created_at": "2026-08-14T10:00:00Z",
      "updated_at": "2026-08-14T10:00:00Z",
      "archived_at": null,
      "binding_info": {"identity_template_count": 1}
    }
  ],
  "first_id": "memstore_00mc7mukn7lkxr454tjd",
  "last_id": "memstore_00mc7mukn7lkxr454tjd",
  "has_more": false
}

空列表响应

{
  "data": [],
  "first_id": null,
  "last_id": null,
  "has_more": false
}

响应字段解释

字段类型说明
dataarrayMemory Store 对象数组。
first_idstring/null当前页第一条记录 ID。
last_idstring/null当前页最后一条记录 ID。
has_moreboolean是否还有更多记录。

错误码

HTTPtype触发条件
400invalid_request_errorlimit 越界,或 after_id/before_id 同时传入。
401authentication_error缺少或无效的认证令牌。
403permission_error当前调用方无权访问该资源。
500/502/503api_errorForward 或依赖服务失败。
列出 Memory Store - Qoder