AI Agent 该活多久?24 小时生命周期设计
How Long Should an AI Agent Live?
给 AI 产品开发者一套可直接落地的 Agent 生命周期设计:24 小时重置 + 临时子代理 + 离线总结,附系统提示词模板,今天就能抄。
Mary, Mary, quite contrary, how long do your agents live?
玛丽,玛丽,真倔强,你的智能体寿命有多长?
New products like Grok Bot & other meta-harnesses ask us to create agents. How long should they live?
像Grok Bot和其他元框架这样的新产品要求我们创建智能体。它们应该活多久?
When you design a calendar agent, how long should its session run? Should it stay alive for your entire five-year tenure at a company, or reset every day?
当你设计一个日历智能体时,它的会话应该运行多久?它应该在你公司五年的任期内一直保持活跃,还是每天重置?
Ever more powerful models tempt us to build perpetual sessions that never close. But long-running sessions rot from the inside out.
越来越强大的模型诱使我们构建永不关闭的永久会话。但长时间运行的会话会从内部开始腐烂。
As conversational turns pile up, attention degrades. Modern models easily spot a single fact in a long document. But research shows even across frontier models, agent memory is like human memory : it degrades as it grows.1
随着对话轮次的累积,注意力会下降。现代模型能轻松地在长文档中找出单个事实。但研究表明,即使是前沿模型,智能体的记忆也像人类记忆一样:随着增长而退化。1
Temporary commands turn into permanent ghosts. Tell your bot in March, “I have a cold this week, cancel morning meetings,” & by November it is still avoiding morning slots.
临时命令会变成永久的幽灵。三月份告诉你的机器人:“我这周感冒了,取消早上的会议”,到十一月它还在避开早上的时段。
Long sessions also break security. An agent holding multi-year read & write access to your inbox & calendar is an open door. One malicious email or calendar invite can poison the conversation, quietly hijacking your schedule months down the road.2
长会话还会破坏安全性。一个对你的收件箱和日历拥有多年读写权限的智能体是一扇敞开的大门。一封恶意邮件或日历邀请就能毒化对话,悄悄劫持你未来几个月的日程。2
The winning pattern is simple : give your daily assistant a 24-hour life, & delegate individual tasks to narrow specialists.
成功的模式很简单:给你的日常助手24小时的生命周期,并将单个任务委派给专门的窄领域专家。
A daily reset matches how humans actually work. During the day, your assistant remembers immediate context : “I’m running fifteen minutes late,” or “keep two to three free for prep.” At midnight, the active conversation wipes clean so tomorrow starts fresh.
每日重置符合人类实际的工作方式。白天,你的助手记住即时上下文:“我迟到了十五分钟”,或“留出两到三个空闲时段用于准备”。午夜时分,活跃的对话被清除,让明天重新开始。
When work needs doing, the daily coordinator hands the job to a single-purpose helper : a calendar agent to schedule, an email agent to draft a reply, or a news agent to search the web. Each helper lives for thirty seconds with only the specific tools it needs, does the job, & disappears.3
当需要工作时,日常协调者将任务交给单一用途的助手:日历智能体安排日程,邮件智能体起草回复,或新闻智能体搜索网络。每个助手只存活三十秒,只拥有它需要的特定工具,完成任务后就消失。3
For the daily coordinator, the system prompt acts as a dispatcher :
对于日常协调者,系统提示充当调度员:
You are Tomasz's daily coordinator.
Your session lives for 24 hours.
Workflow:
- Morning: Load preferences from `preferences.md`
& today's calendar.
- Intraday: Do not execute directly. Delegate
to sub-agents (`calendar_bot`, `email_bot`).
- Night: At midnight, save durable learnings
to `preferences.md` and terminate.You are Tomasz's daily coordinator.
Your session lives for 24 hours.
Workflow:
- Morning: Load preferences from `preferences.md`
& today's calendar.
- Intraday: Do not execute directly. Delegate
to sub-agents (`calendar_bot`, `email_bot`).
- Night: At midnight, save durable learnings
to `preferences.md` and terminate.For the calendar helper, the system prompt is a stateless executor :
对于日历助手,系统提示是无状态执行器:
You are an ephemeral calendar specialist.
Process this single request, call the tool,
report the result, & terminate.
Rules:
- Time zone: America/Los_Angeles.
- Duration: 30 minutes.
- Hours: 9:00 AM – 6:00 PM.
- Always check availability first.
Never double-book.
- If full, propose 2 nearest openings & stop.
Output: Return event title, time, & attendees,
then exit.You are an ephemeral calendar specialist.
Process this single request, call the tool,
report the result, & terminate.
Rules:
- Time zone: America/Los_Angeles.
- Duration: 30 minutes.
- Hours: 9:00 AM – 6:00 PM.
- Always check availability first.
Never double-book.
- If full, propose 2 nearest openings & stop.
Output: Return event title, time, & attendees,
then exit.Before the day’s session wipes at midnight, a quick consolidation pass runs. An offline summarizer reviews the day, saves lasting preferences (“Tomasz prefers thirty-minute meetings”) into a permanent note on disk, & throws away the rest of the daily chatter.4
在一天的会话于午夜清除之前,会运行一次快速的整合过程。离线摘要器回顾一天,将持久的偏好(如“Tomasz更喜欢三十分钟的会议”)保存到磁盘上的永久笔记中,并丢弃其余的日常闲聊。4
Does Grok Bot or your chat assistant perform this sleep cycle automatically?
Grok Bot或你的聊天助手会自动执行这种睡眠周期吗?
Not today. Most bots leave threads open forever until you click “+ New Chat” or context compaction silently erases your rules.
目前不会。大多数机器人会永远保持线程打开,直到你点击“+新聊天”,或者上下文压缩悄悄抹掉你的规则。
The nursery rhyme asks about a garden : silver bells & cockle shells, all in a row. Things that persist, in an order someone chose. The answer for an agent is the same : throw away the conversation ; keep the rules in a file to keep your agent & its garden healthy.
这首童谣问起一座花园:银铃与鸟蛤壳,排成一行。那些持久存在的事物,按某人选择的顺序排列。对于智能体而言,答案相同:丢弃对话;将规则保存在文件中,以保持你的智能体及其花园的健康。
- Amirali Ebrahimzadeh and Seyyed Muhammad Salili, “Not All Needles Are Found: How Fact Distribution and Prompting Shape Inference in Long-Context LLMs,” arXiv:2601.02023, January 2026; Kelly Hong et al., “Context rot: How increasing input tokens impacts LLM performance,” Chroma Research, 2025. ↩︎
- “Sleeper Memory Poisoning in LLM Agents,” arXiv:2605.15338, May 2026. Demonstrates persistent cross-session memory poisoning attacks in stateful AI assistants. ↩︎
- Shiyang Chen, “Governance Decay: How Context Compaction Silently Erases Safety Constraints in Long-Horizon LLM Agents,” arXiv:2606.22528, June 2026. Demonstrates that compaction drops standing rules in 30–59% of episodes. ↩︎
- Anthropic, “Dreams: Memory Consolidation,” research preview dreaming-2026-04-21, April 2026; and the Letta v2 stateful agent framework (2026). ↩︎
- Amirali Ebrahimzadeh 和 Seyyed Muhammad Salili,“并非所有针都能找到:事实分布与提示如何影响长上下文 LLM 的推理”,arXiv:2601.02023,2026年1月;Kelly Hong 等人,“上下文腐烂:增加输入令牌如何影响 LLM 性能”,Chroma Research,2025年。 ↩︎
- “LLM 智能体中的睡眠记忆中毒”,arXiv:2605.15338,2026年5月。展示了有状态 AI 助手中持久的跨会话记忆中毒攻击。 ↩︎
- Shiyang Chen,“治理衰减:上下文压缩如何悄然抹去长周期 LLM 智能体中的安全约束”,arXiv:2606.22528,2026年6月。证明压缩在30%至59%的回合中丢弃了既定规则。 ↩︎
- Anthropic,“梦境:记忆巩固”,研究预览 dreaming-2026-04-21,2026年4月;以及 Letta v2 有状态智能体框架(2026年)。 ↩︎
更进一步:量化金融体系
看懂新闻只是起点——沿量化金融路径,把它变成能交付的工程能力