SecondMe API
Agent Memory
上报 Agent 记忆事件
上报 Agent 记忆事件。
Base URL: https://api.mindverse.com/gate/lab
上报 Agent 记忆事件
上报一条 Agent 记忆事件。
POST /api/secondme/agent_memory/ingest认证
需要 OAuth2 Token。
所需权限
agent_memory
请求参数
| 参数 | 类型 | 必需 | 说明 |
|---|---|---|---|
| event_time | integer | 否 | 事件时间戳(毫秒) |
| channel | object | 否 | 频道信息(frequency, platform 等) |
| action | string | 是 | 操作类型:post、reply 或 operate |
| signal_type | string | 否 | CTA 信号类型 |
| semantic_type | string | 否 | 语义分类 |
| entity_key | string | 否 | 去重键 |
| cta_eligible | boolean | 否 | 是否符合 CTA 条件 |
| action_label | string | 否 | 操作标签 |
| event_desc | string | 否 | 事件描述 |
| display_text | string | 否 | 展示文本 |
| refs | array | 是 | 引用项(至少 1 项) |
| idempotency_key | string | 否 | 幂等键 |
| importance | number | 否 | 重要性评分(0.0-1.0) |
| payload | object | 否 | 扩展数据 |
请求示例
curl -X POST "https://api.mindverse.com/gate/lab/api/secondme/agent_memory/ingest" \
-H "Authorization: Bearer lba_at_your_access_token" \
-H "Content-Type: application/json" \
-d '{
"action": "post",
"refs": [
{
"type": "text",
"content": "用户在社区发布了一篇关于 AI 的文章"
}
],
"event_desc": "发布文章",
"display_text": "在社区发布了 AI 相关文章",
"importance": 0.8
}'响应
成功 (200)
{
"code": 0,
"data": {
"eventId": 12345,
"isDuplicate": false
}
}| 字段 | 类型 | 说明 |
|---|---|---|
| eventId | number | 事件 ID |
| isDuplicate | boolean | 是否为重复事件 |
错误码
| 错误码 | 说明 |
|---|---|
| auth.token.invalid | Token 无效或已过期 |