MoonshotAI / MoonshotAI/kimi-code
功能请求:自动长期记忆(对话中自动识别并保存重要信息)/ Feature Request: Automatic long-term memory across sessions
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 7.5k
- Forks
- 1.2k
- Avg merge
- 11h 53m
- Merged PRs (30d)
- 350
Description
需求描述 / Summary
中文
希望 Kimi Code CLI 增加自动长期记忆功能:在日常对话中自动识别重要信息(用户偏好、项目约定、环境事实、已确认的决策等),将其持久化保存,并在后续新会话中自动加载/召回,无需用户手动维护 AGENTS.md。
English
Please add an automatic long-term memory feature: during normal conversations, the CLI should automatically identify important information (user preferences, project conventions, environment facts, confirmed decisions), persist it, and automatically recall it in later sessions — without requiring users to hand-maintain AGENTS.md.
现状 / Current behavior
- 会话仅在单个会话内持久化(
~/.kimi-code/sessions/),新会话不记得之前的讨论。/ Sessions persist only within themselves; a new session remembers nothing from previous ones. AGENTS.md会被自动加载,但需要手动编写维护,CLI 不会自动写入。/ AGENTS.md is auto-loaded but must be hand-written; the CLI never writes to it.- 官方文档与 changelog(截至 0.26.0)中均无自动记忆功能。/ No auto-memory feature exists in the docs or changelog up to 0.26.0.
期望行为 / Desired behavior
- 对话中自动识别值得记住的事实,并给出保存提示(或按设置静默保存)。/ Automatically surface "worth remembering" facts in conversation and save them (with a prompt, or silently per setting).
- 记忆按作用域分层:用户级(全局)/ 项目级(仓库内)。/ Scoped memory: user-level (global) and project-level (per repo).
- 新会话启动时自动召回相关记忆并注入上下文。/ Relevant memories are automatically recalled and injected into context when a new session starts.
- 提供管理命令(如
/memory:查看、编辑、删除、清空),并可在config.toml中总开关。/ Management commands (e.g./memoryto list/edit/delete/clear) plus aconfig.tomlmaster switch.
使用场景 / Use cases
- 用户说"这个项目一律用 pnpm 而不是 npm",之后所有会话自动遵守。/ Say "always use pnpm in this project" once, and every future session obeys it.
- 部署约束、端口、测试命令等环境事实只需交代一次。/ Environment facts (ports, test commands, deploy constraints) stated once, remembered across sessions.
- 跨会话记住代码风格与沟通偏好。/ Code style and communication preferences persist across sessions.
参考 / References
- 类似实现:Claude Code 的自动记忆(auto memory)。/ Comparable feature: Claude Code's auto-memory.
- Docs: https://www.kimi.com/code/docs/en/kimi-code-cli/guides/sessions.html
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue does not identify implementation files, entry points, or tests. Start by locating session persistence, AGENTS.md loading, startup context construction, configuration handling, and slash-command registration. Define the storage scopes, recall behavior, consent settings, and management commands before implementation; done means covered behavior and tests for saving, recalling, scoping, disabling, and deletion.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- ai, cli
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100