All guides

Context engineering with memory notes

Store long term memory notes and state for multi-session workflows.

Intermediate17 min readJun 25, 2025
Agents SDKMemoryState
Key takeaways
  • Store short term state separately from long term memory.
  • Attach TTLs and privacy labels to memory notes.
  • Summarize memory before reuse.

Define a state model

Create a schema for session state and keep it small and explicit.

Memory notes

Store long term notes with a source, timestamp, and confidence.

Privacy and retention

Expire memory notes and prevent sensitive data from persisting.