2025年中版:

KV Cache——重中之重

尽力保持prefix信息稳定,让context只追加,不修改之前轮次的动作和结果。

MCP/Tools

避免在一次agentic任务中动态增删MCP/Tools,因为Tools definitions 一般落在 system prompt layer,在中途修改一定会造成cache miss。其次如果在中途删除已经使用的tool,后续会导致模型迷惑。manus设计了一种context-aware state machine来管理agnet能看到的tools的范围,根据当前context mask掉一部分tools而不是移除tools,从而保持kv-cache同时增加tools call准确性。

Keep the Wrong Stuff In(?_?)

当agent犯错误时,不要rewind,把失败的证据留在context内。When the model sees the wrong turns in the context, that reduces the chance of repeating the same mistake.

Don't Get Few-Shotted


Manus于2025.11分享的context engineering内容总结

Technical Manual: Context Engineering for AI Agent Stability and Performance Optimization