dependencies parameter accepts a dictionary containing functions or static variables that are automatically resolved before the agent or team 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
How dependencies work
Dependencies are resolved at runtime, just before your agent or team executes. Here’s the flow:- Define dependencies: Provide a dictionary of key-value pairs where values can be static data or callable functions
- Resolution: When the agent/team runs, Agno calls all callable dependencies and replaces them with their return values
- Template substitution: Resolved dependencies are available in your instructions using
{dependency_name}syntax - Context injection: When
add_dependencies_to_context=True, dependencies are automatically added to the user message