Context Engineering

3 cookbooks for building the unified memory and context layer that powers reliable AI agents - from fundamentals to production patterns.

01

Fundamentals

The 5 context sources, Valkey data structures for each, system instructions, conversation history, tool outputs, and long-term memory.

Beginner~20 minPython
02

Context Assembly Pipeline

Build a complete context assembly function that gathers from all 5 sources + token budgeting.

Intermediate~25 minPython
03

Production Context Management

Short-term vs long-term memory, pruning, multi-user isolation, monitoring, data structure reference.

Advanced~25 minPython
⭐ View on GitHub