Skip to main content
Context engineering controls what a model sees when an agent or team runs. Product teams use it to give the model the right instructions and application data while keeping each request focused.
support_agent.py
The system message carries the agent’s instructions and resolved plan. The user message carries the current request. Up to three previous runs from the same stored session can also enter the model context.

Sources of Context

Agno can assemble these sources for each run. Enable only the sources the model needs for the current use case.

Control Context Size

Start with the smallest set that supports the task. Inspect model messages in debug mode when behavior suggests the model received missing, stale, or conflicting context.

Context Caching

Some model providers cache repeated prompt prefixes. Provider requirements and pricing differ. Keep stable instructions consistent between requests, place changing data in the appropriate runtime fields, and verify the selected provider’s caching behavior.

Next Steps

Agent Context

Configure system messages and instructions for agents.

Team Context

Configure context for a leader and its members.

Chat History

Select previous messages for model context.