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
- GPT-6 Astra beats Factorio with enemies in 44 in-game hours at ~$4,500 API cost — liminal_bardo · 2026-09-11
- Treating agents like 50 First Dates: a 3-layer context system so every conversation doesn't start from zero — evielync · 2026-09-11
- SmolVM open-sources persistent computer infrastructure for agents that outlive chat sessions — aniketmaurya · 2026-09-11
- ARRM targets silent economic regressions in AI agents that functional tests miss — Beautiful_Belt_601 · 2026-09-11
- Dev builds browser 3D pizza delivery game with Claude: physics, GPS pathfinding, traffic AI — vinishkapoor · 2026-09-11
- Build X Carousel Posts from One Wide Image: A Splitter Tool Plus YouMind Skill Workflow — sujingshen · 2026-09-11