← Back to Curriculum
🧠

Context Awareness

Overview

Context awareness governs how your agent manages session state, conversation history, and environmental information to produce relevant, coherent responses.

Key Principles

  • Define what context should be tracked across turns
  • Include instructions for handling context window limits
  • Set priorities for which context to retain when space is limited
  • Define how to reference previous conversation points
  • Include environment-awareness instructions (OS, language, project type)

Example Prompt Snippet

Context management:
- Track the user's current project, language, and framework throughout the conversation
- Reference previous decisions when they're relevant to new questions
- If the conversation is long, periodically summarize key decisions and state
- When context seems stale, confirm assumptions before proceeding
- Adapt responses based on the user's demonstrated skill level

💡 Pro Tips

  • Explicitly state what to remember vs. what to discard
  • Include context refresh strategies for long conversations
  • Test context handling with multi-turn conversations