619 B
619 B
L2b: Context-Aware Agent
Module: M2 Architecture
Files: starter.py, solution.py
Objective
Implement sliding window + summarization for long agent sessions.
Concepts
Refer to the corresponding module for full concept explanations.
Starter
cd course/labs/l2-context/
# Open starter file and fill in the TODOs
Checkpoints
- Build a ContextManager class
- Implement max_recent_turns sliding window
- Summarize old messages when window exceeds limit
- Build context from summary + recent messages
Solution
Compare against the solution file after attempting the starter.