31 lines
619 B
Markdown
31 lines
619 B
Markdown
# 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
|
|
|
|
```bash
|
|
cd course/labs/l2-context/
|
|
# Open starter file and fill in the TODOs
|
|
```
|
|
|
|
## Checkpoints
|
|
|
|
1. Build a ContextManager class
|
|
2. Implement max_recent_turns sliding window
|
|
3. Summarize old messages when window exceeds limit
|
|
4. Build context from summary + recent messages
|
|
|
|
## Solution
|
|
|
|
Compare against the solution file after attempting the starter.
|