# Dependencies (/dependencies/overview)



**Dependencies** are a way to inject variables into your Agent or Team context. The `dependencies` parameter accepts a dictionary containing functions or static variables that are automatically resolved before the agent or team runs.

<Note>
  You can use dependencies to inject memories, dynamic few-shot examples, "retrieved" documents, etc.
</Note>

## Basic usage [#basic-usage]

You can reference the dependencies in your agent instructions or user message.

```python title="dependencies.py"
from agno.agent import Agent
from agno.models.openai import OpenAIResponses

agent = Agent(
    model=OpenAIResponses(id="gpt-5.2"),
    dependencies={"name": "John Doe"},
    instructions="You are a story writer. The current user is {name}."
)

agent.print_response("Write a 5 second short story about {name}")
```

<Tip>
  You can set `dependencies` on `Agent`/`Team` initialization, or pass it to the `run()` and `arun()` methods.
</Tip>

## How dependencies work [#how-dependencies-work]

Dependencies are resolved at runtime, just before your agent or team executes. Here's the flow:

1. **Define dependencies**: Provide a dictionary of key-value pairs where values can be static data or callable functions
2. **Resolution**: When the agent/team runs, Agno resolves callable dependencies into values; asynchronous functions require async execution
3. **Template substitution**: Resolved dependencies are available in your instructions using `{dependency_name}` syntax
4. **Context injection**: When `add_dependencies_to_context=True`, dependencies are automatically added to the user message

Agent callables can request the current run input and loaded session by parameter name. See [runtime inputs for Agent dependencies](/dependencies/agent/overview#runtime-inputs-for-callables); the accepted parameters differ for Teams.

## Learn more [#learn-more]

<CardGroup cols="2">
  <Card title="Dependencies with Agents" icon="robot" href="/dependencies/agent/overview">
    Inject runtime values into agent instructions and context
  </Card>

  <Card title="Dependencies with Teams" icon="users" href="/dependencies/team/overview">
    Share resolved dependencies across team members
  </Card>

  <Card title="AgentOS API" icon="code-branch" href="/agent-os/using-the-api">
    Pass dependencies via the AgentOS API
  </Card>

  <Card title="Agent Schema" icon="book" href="/reference/agents/agent">
    View the full Agent schema reference
  </Card>
</CardGroup>
