Skip to content

Commit e7018c1

Browse files
authored
Merge pull request #208 from flashcatcloud/docs/ai-sre-memory
docs(ai-sre): document agent memory
2 parents 2e08c46 + f94dde4 commit e7018c1

3 files changed

Lines changed: 220 additions & 2 deletions

File tree

‎docs.json‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -627,7 +627,8 @@
627627
"group": "知识",
628628
"icon": "book",
629629
"pages": [
630-
"zh/ai-sre/knowledge"
630+
"zh/ai-sre/knowledge",
631+
"zh/ai-sre/memory"
631632
]
632633
},
633634
{
@@ -1863,7 +1864,8 @@
18631864
"group": "Knowledge",
18641865
"icon": "book",
18651866
"pages": [
1866-
"en/ai-sre/knowledge"
1867+
"en/ai-sre/knowledge",
1868+
"en/ai-sre/memory"
18671869
]
18681870
},
18691871
{

‎en/ai-sre/memory.mdx‎

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
---
2+
title: Memory
3+
description: AI SRE automatically distills your systems and preferences from past conversations and recalls them across sessions, so you don't have to repeat the same background every time.
4+
keywords: ["AI SRE", "Memory", "preference", "scope", "retention", "personalization"]
5+
sidebarTitle: Memory
6+
---
7+
8+
<Info>
9+
**Public beta**: AI SRE is in public beta, rolling out gradually to accounts on On-call Pro or higher, at no additional charge during the beta. To get access, submit the [AI SRE beta application form](https://c9xudyniiq.feishu.cn/share/base/form/shrcn0ngCfdoygiaHnAT80BfZiH). Features and the UI may continue to change.
10+
</Info>
11+
12+
## Overview
13+
14+
---
15+
16+
Every new AI SRE session starts a fresh troubleshooting process. If you had to re-explain your timezone, your preferred report format, who owns a given service, or why a previous approach didn't work, that would defeat the point of a persistent agent. Memory lets the agent distill this information out of your conversations and store it as structured entries, so it can reuse them in later sessions.
17+
18+
Memory is different from [Knowledge Packs](/en/ai-sre/knowledge). A Knowledge Pack is content you actively maintain: a `DUTY.md` plus runbooks, service catalogs, and similar files, edited by you or by the agent during a session. Memory doesn't require maintenance. It's a collection of individual facts, preferences, procedures, or lessons the agent distills automatically from past conversations, at a much finer grain than a Knowledge Pack, and it is not a summary of an entire conversation.
19+
20+
## Memory Types
21+
22+
---
23+
24+
Memory has four types, each with a recommended scope and a default retention period:
25+
26+
| Type | Description | Recommended scope | Default retention |
27+
| --- | --- | --- | --- |
28+
| preference | Your personal habits, such as timezone, report format, or communication style | personal | 180 days |
29+
| procedure | Handling steps for a class of incidents, or a team's agreed operating sequence | team | 90 days |
30+
| fact | Objective information such as system topology, service ownership, or config details | team | 120 days |
31+
| lesson | A lesson learned during troubleshooting, such as why a given approach didn't work | team | 120 days |
32+
33+
The scope column is a recommendation, not a binding rule. Where a memory actually lands depends on the session that writes it: a session bound to a team writes to that team's scope, and a session with no team binding writes to your personal scope.
34+
35+
## How Memory Is Created
36+
37+
---
38+
39+
Memory is created through two paths:
40+
41+
- **Explicit**: when you ask the agent to remember something during a conversation, it calls the memory tool to write a memory entry directly.
42+
- **Automatic**: after each turn, the session enters an extraction queue, and the system distills memory asynchronously in the background during idle time, with no action needed from you. Automatic extraction currently produces mostly `procedure` memories. The other three types come more often from an explicit request.
43+
44+
Both paths are processed by the same dedicated structured extraction model. Internally, memory is stored in two layers: a raw extraction archive that is write-only and kept for traceability, and the actual memory entries served to the agent, which are curated from that archive and include a name, summary, body, and source references. Memory extraction currently applies only to the AI SRE and Support apps.
45+
46+
## How the Agent Uses Memory
47+
48+
---
49+
50+
Memory isn't queried in real time on every turn. It works off a snapshot instead:
51+
52+
<Steps>
53+
<Step title="Session start: retrieve and freeze a snapshot">
54+
At session initialization, and again whenever context compaction occurs, the system retrieves relevant memory once and freezes the result into a snapshot stored in session state.
55+
</Step>
56+
<Step title="Inject memory cards each turn">
57+
Every subsequent turn injects only the memory cards from that snapshot. Cards carry a name and a summary, not the body.
58+
</Step>
59+
<Step title="Read the body on demand">
60+
When the agent needs the full content of a memory entry, it calls the memory tool again to read or search for it.
61+
</Step>
62+
</Steps>
63+
64+
## Scope & Isolation
65+
66+
---
67+
68+
Memory has only two scopes, personal and team. There is no account-level memory, and cross-account reads are rejected outright.
69+
70+
| Dimension | personal | team |
71+
| --- | --- | --- |
72+
| Ownership | The person the memory belongs to | The team the memory belongs to |
73+
| Read condition | The person the memory belongs to | The current session is bound to that team, or the caller is a genuine member of that team |
74+
| Exemption | Not applicable | Owners and admins get no exemption |
75+
| Cross-team reads | Not applicable | No such path exists |
76+
77+
This isolation follows the same permission model as other AI SRE resources: team scope does not open up just because you're the account owner or an admin. You must be an actual member of that team.
78+
79+
## Retention & Expiry
80+
81+
---
82+
83+
Each memory entry has a `renewed_at` (last renewal time) and a `ttl_days` (retention period), with `expires_at = renewed_at + ttl_days`. Expired entries are soft-deleted first, then hard-cleaned up later. Referencing a memory entry updates its usage count and last-used time. There is no cap on the number of memory entries.
84+
85+
## Current Limitations
86+
87+
---
88+
89+
<Warning>
90+
There is currently no console page for managing memory. You can't see your list of memory entries, and you can't edit or delete an entry from the UI. The only way to interact with memory is through conversation: ask the agent to remember, update, or forget something, for example "remember that I use UTC+8" or "forget that preference you just saved."
91+
</Warning>
92+
93+
<Note>
94+
Reliability improvements to memory extraction only merged on July 20, 2026, so they haven't been live long. If you notice the agent skipping something it should have remembered, without explaining why, we'd welcome your feedback.
95+
</Note>
96+
97+
## Related Pages
98+
99+
---
100+
101+
<CardGroup cols={2}>
102+
<Card title="Manage Knowledge" icon="book" href="/en/ai-sre/knowledge">
103+
Understand the difference between Knowledge Packs and memory: you maintain the former, the agent distills the latter from conversation.
104+
</Card>
105+
<Card title="Console" icon="comments" href="/en/ai-sre/sessions">
106+
Learn how sessions bind to teams, and how team-scoped memory follows that binding.
107+
</Card>
108+
</CardGroup>

‎zh/ai-sre/memory.mdx‎

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
---
2+
title: 记忆
3+
description: AI SRE 从历次对话里自动提炼您的系统信息与偏好,跨会话记住,减少重复背景介绍。
4+
keywords: ["AI SRE", "记忆", "Memory", "偏好", "作用域", "留存", "个性化"]
5+
sidebarTitle: 记忆
6+
---
7+
8+
<Info>
9+
**公测功能**:AI SRE 正在公测,面向 On-call 专业版及以上账户灰度开放,公测期间不单独收费;如需开通,请填写 [AI SRE 公测申请表](https://c9xudyniiq.feishu.cn/share/base/form/shrcn0ngCfdoygiaHnAT80BfZiH)。功能与界面可能继续调整。
10+
</Info>
11+
12+
## 概述
13+
14+
---
15+
16+
AI SRE 每次新会话都是一次新的排障过程。如果每次都要重新告诉 Agent 您的时区、偏好的报告格式、某个服务归谁负责、上次为什么放弃了某个方案,排障效率无从谈起。记忆(Memory)让 Agent 把这些信息从对话里自动提炼出来,存成结构化的记忆条目,在后续会话中重新用上。
17+
18+
记忆和[知识库](/zh/ai-sre/knowledge)是两回事。知识库是您主动维护的长期资料:一份 `DUTY.md` 加运行手册、服务清单等文件,内容由您或 Agent 在对话中编辑写入,结构由您掌控。记忆不需要您维护,它是 Agent 从历次对话中自动沉淀出的一条条独立事实、偏好、步骤或教训,粒度比知识库细得多,不是整段对话的摘要。
19+
20+
## 记忆类型
21+
22+
---
23+
24+
记忆分四种类型,各自有推荐作用域和默认留存期:
25+
26+
| 类型 | 说明 | 推荐作用域 | 默认留存期 |
27+
| --- | --- | --- | --- |
28+
| preference(偏好) | 您的个人习惯,比如时区、报告格式、沟通风格 | personal | 180 天 |
29+
| procedure(步骤) | 某类故障的处置步骤,或团队约定的操作顺序 | team | 90 天 |
30+
| fact(事实) | 系统拓扑、服务归属、配置细节等客观信息 | team | 120 天 |
31+
| lesson(教训) | 一次排障中总结出的经验,比如某个方案为什么行不通 | team | 120 天 |
32+
33+
表格里的作用域是推荐值,不是强制绑定。一条记忆最终落在 personal 还是 team,取决于写入时所处的会话:绑定了团队的会话写入 team 作用域,未绑定团队的会话写入您的 personal 作用域。
34+
35+
## 记忆如何产生
36+
37+
---
38+
39+
记忆有两条产生路径:
40+
41+
- **显式**:您在对话中明确要求 Agent 记住某件事时,它会调用记忆工具直接写入一条记忆。
42+
- **自动**:每个回合结束后,会话进入抽取队列,系统在空闲时于后台异步提炼记忆,不需要您额外操作。目前自动抽取主要产生 procedure 类型的记忆,其余三种类型更多来自您的显式要求。
43+
44+
两条路径最终都经过同一个专用的结构化抽取模型处理。系统内部把记忆分成两层:原始抽取存档只写不改,用于留痕;真正提供给 Agent 使用的是从存档整理出的记忆条目,包含名称、摘要、正文、引用来源等字段。记忆抽取目前只对 AI SRE 与 Support 两个应用生效。
45+
46+
## Agent 如何使用记忆
47+
48+
---
49+
50+
记忆不是每一轮对话都实时查询,而是按快照使用:
51+
52+
<Steps>
53+
<Step title="会话开始:检索并冻结快照">
54+
会话初始化时,以及之后发生上下文压缩时,系统各检索一次相关记忆,把结果冻结成一份快照存进会话状态。
55+
</Step>
56+
<Step title="每轮注入记忆卡片">
57+
此后的每一轮对话,只把快照里的记忆卡片注入进来。卡片只有名称和摘要,不含正文。
58+
</Step>
59+
<Step title="按需读取正文">
60+
Agent 需要某条记忆的完整内容时,会自己再调用记忆工具去读取或搜索对应条目。
61+
</Step>
62+
</Steps>
63+
64+
## 作用域与隔离
65+
66+
---
67+
68+
记忆只有 personal(个人)与 team(团队)两种作用域,没有账户级记忆,跨账号读取会被直接拒绝。
69+
70+
| 维度 | personal(个人) | team(团队) |
71+
| --- | --- | --- |
72+
| 归属 | 记忆所属的那个人 | 记忆所属的那个团队 |
73+
| 读取条件 | 记忆所属的本人 | 当前会话绑定该团队,或调用者本人是该团队的真实成员 |
74+
| 豁免 | 不适用 | owner、admin 都没有豁免 |
75+
| 跨团队读取 | 不适用 | 不存在这样的路径 |
76+
77+
这套隔离规则与 AI SRE 其它资源的权限模型一致:team 作用域不因为您是账户 owner 或 admin 而自动放开,必须是该团队的真实成员。
78+
79+
## 留存与过期
80+
81+
---
82+
83+
每条记忆有 `renewed_at`(最近续期时间)与 `ttl_days`(留存天数),过期时间 `expires_at = renewed_at + ttl_days`。到期后先软删除,随后进入硬清理。记忆被引用时会更新使用次数与最近使用时间。系统不对记忆条数设上限。
84+
85+
## 当前限制
86+
87+
---
88+
89+
<Warning>
90+
控制台目前没有管理记忆的入口。您看不到自己的记忆列表,也无法在页面上编辑或删除某条记忆。唯一的交互方式是在对话里直接让 Agent 记住、修改或忘记某件事,比如说「记住我习惯用 UTC+8 时区」或「忘掉刚才那条偏好」。
91+
</Warning>
92+
93+
<Note>
94+
记忆抽取的可靠性改进在 2026 年 7 月 20 日才合并上线,运行时间还不长。如果您发现 Agent 该记住的事情跳过了保存、又没有说明原因,欢迎反馈给我们。
95+
</Note>
96+
97+
## 相关页面
98+
99+
---
100+
101+
<CardGroup cols={2}>
102+
<Card title="管理知识" icon="book" href="/zh/ai-sre/knowledge">
103+
了解知识库和记忆的区别:知识库由您主动维护,记忆从对话中自动沉淀。
104+
</Card>
105+
<Card title="控制台" icon="comments" href="/zh/ai-sre/sessions">
106+
了解会话如何绑定团队,以及团队作用域的记忆如何跟随会话。
107+
</Card>
108+
</CardGroup>

0 commit comments

Comments
 (0)