10

Context Engineering for Agents

> manage_context_like_memory()

Master context management for AI agents. Learn when to /clear vs continue, how to budget the window under attention decay, and optimal strategies for feeding context through @-mentions vs full files.

Back to University

Expansion Guides

// from context chaos to surgical precision

01

When to /clear vs When to Continue

Context refresh triggers for optimal agent performance

Context accumulates noise. Learn the seven situations where /clear beats continue, how to preserve what matters before wiping, and the cost of dragging dead context through your session.

Context Pollution Session Refresh State Preservation Performance
02

Feeding Context: @-mentions vs Full Files

Strategic context delivery for different agent tasks

@-mention a file or paste it whole? Each approach has different effects on agent behavior. Master the tradeoffs, learn when to use each, and build a repeatable context-feeding strategy.

@-mention Strategy File Delivery Context Injection Agent Behavior

Free Primers