Anthropic's Official Best Practices for Agent Engineering
thisdudelikesAI · x · 2026-07-16
Anthropic recently released an engineering guide, noting that traditional prompt engineering is outdated and the new core focus is context engineering. To maximize model capabilities in long-context and complex Agent tasks, the guide outlines several key practices:
- Structured notes: Instead of cramming everything into the conversation history, Agents should persist their progress and plans in a NOTES.md file to avoid getting lost in lengthy histories.
- Retrieval over recall: Longer contexts are prone to "context rot." Extract only the information needed for the current step and continuously summarize completed work.
- Freeze prefixes: Keep stable information like system prompts at the very beginning and unchanged, placing dynamic content at the end. This maximizes Prompt cache hit rates and reduces costs.
- Clean up unused tool calls: Raw outputs from old tools in the history can distract the model. Cleaning these up, combined with memory and context editing, yielded a 39% performance boost in internal evaluations.
- Use sub-agents: Launch dedicated sub-agents with clean contexts for deep exploration tasks, passing back only concise summaries to keep the main Agent focused.
- Self-verification: Provide test scripts for the Agent to check its own results, minimizing frequent human intervention.
Related event: Anthropic shifts agent engineering toward context engineering(5 posts)→
More from coding & agent
- LangChain and Tavily to co-host NYC event on production agents using live web data, Nov 12 — LangChain · 2026-10-26
- SentinelForge: evidence-driven AI software repair with human-in-the-loop verification — Byte_Forge_2811 · 2026-10-26
- Dev hacks reMarkable e-ink tablet to let Opus draw and animate — Stefania_druga · 2026-10-26
- Godot games are trivially decompilable — compile C# to native DLL for real protection — mflux · 2026-10-26
- Techhalla shares full 2D-to-3D workflow with Opus 5.5 and Kling 4.0 prompts — techhalla · 2026-10-26
- Jason Furman: Building Econvitals pre-AI would need ~50 people, 3 years, $20M — HarrySurden · 2026-10-26