dependencies parameter accepts a dictionary containing functions or static variables that are automatically resolved before the agent runs.
You can use dependencies to inject memories, dynamic few-shot examples, “retrieved” documents, etc.
Basic usage
You can reference the dependencies in your agent instructions or user message.dependencies.py
Dependencies can be static values or callable functions. When using functions, they are automatically executed at runtime before the agent runs, and their return values are used as the dependency values.
Adding dependencies to context
Setadd_dependencies_to_context=True to add the entire list of dependencies to the user message. This way you don’t have to manually add the dependencies to the instructions.
dependencies_instructions.py
This adds the entire dependencies dictionary to the user message between
<additional context> tags.
The new user message looks like this:Access dependencies in tool calls and hooks
You can access the dependencies in tool calls and hooks by using theRunContext object.
Learn more
Dependencies Overview
Learn about dependencies in Agno
Add Dependencies on Run
Pass dependencies to agent.run()
Add Dependencies to Context
Auto-inject dependencies into messages
Access in Tools
Use dependencies in custom tools