AI Agent
Agent 长期记忆
把"你是谁、习惯、约束"写进 `.kition/agent.md` — 每次对话自动加载。
为什么需要这个
Agent 默认不知道你是谁、不知道你的项目背景、不知道你的语气偏好。每次对话都从零开始很烦人 — 你不该每次都打 "我是 B2B SaaS 文案,写作要直接简短"。
.kition/agent.md 就是这个记忆。每次开 session,Kition 自动把它注入到 system prompt。你改一次,全局生效。
一份扎实的示例
# Agent context
## Who I am
- Freelance writer focused on B2B SaaS topics.
- Primary audience: technical buyers in North America.
- I dislike marketing jargon ("synergy", "leverage", "unlock").
## Voice
- Direct, short sentences. Active voice.
- No emoji unless I ask.
- Avoid Oxford comma in body copy; keep in lists.
## Workflow
- Drafts live under `drafts/`. Finals under `published/`.
- Always run `scripts/check-claims.sh <file>` after writing claims-heavy content.
- Cite sources inline with footnote style: `[^1]`.
## Tools
- Prefer `web_fetch` over `web_search` when I name a domain.
- Never `Bash rm` without confirming — ask first.
## Things to never do
- Suggest emoji.
- Use the word "leverage" as a verb.它做什么
每次对话开始时,Agent 把这份文件作为 system context — 等同于你每次重复"我是…,请…"。它影响所有 turn,包括 plan 模式输出的计划风格。
团队 Vault 里这个文件被 git 跟踪 — 等于团队的"AI 协作守则"。新人 clone 仓库就继承同一份约定。
分层记忆
~/.kition/agent.md— 全局,适合"我是谁、我的语气"<vault>/.kition/agent.md— Vault 级,适合"这个项目的规范"- 某个子目录下
agent.md— 进入该目录工作时叠加 - 加载顺序:全局 → vault → 子目录,后者覆盖前者冲突项
不要塞什么
别把"完整的项目知识库"塞进去 — 每次对话都会算 token,几 KB 还行,几十 KB 会拖慢首响应、烧钱。具体知识用 @ 引用按需加载、或挂 MCP server。
别放敏感凭据 — 这份文件按设计是给模型看的,会发到 provider 那边。token / 密码用 Keychain。