Contexts
Contexts provide structured state or memory that an agent can use during execution.
Contexts are small pieces of structured information supplied to an agent. They are useful when the answer depends on state outside the user's latest message.
Examples
| Context | Example fields |
|---|---|
| User profile | name, plan, locale, preferences |
| Workspace state | project_name, current_phase, owner |
| Support case | ticket_id, priority, last_status |
Contexts vs Knowledge
Use contexts for compact, structured state. Use knowledge bases for larger searchable documents.
| Use case | Better fit |
|---|---|
| User's current plan | Context |
| A 20-page policy PDF | Knowledge base |
| Current ticket priority | Context |
| Product troubleshooting guide | Knowledge base |
Privacy
Only pass context fields the agent needs. Avoid sending sensitive user data unless your product and data policy require it.