> ## Documentation Index
> Fetch the complete documentation index at: https://docs.agno.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Dependencies with Teams

> Inject variables into team context with dependencies.

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

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

```python dependencies.py theme={null}
from datetime import datetime

from agno.agent import Agent
from agno.models.openai import OpenAIResponses
from agno.team import Team


def get_user_profile() -> dict:
    """Get user profile information that can be referenced in responses."""
    profile = {
        "name": "John Doe",
        "preferences": {
            "communication_style": "professional",
            "topics_of_interest": ["AI/ML", "Software Engineering", "Finance"],
            "experience_level": "senior",
        },
        "location": "San Francisco, CA",
        "role": "Senior Software Engineer",
    }

    return profile


def get_current_context() -> dict:
    """Get current contextual information like time, weather, etc."""
    return {
        "current_time": datetime.now().strftime("%Y-%m-%d %H:%M:%S"),
        "timezone": "PST",
        "day_of_week": datetime.now().strftime("%A"),
    }


profile_agent = Agent(
    name="ProfileAnalyst",
    model=OpenAIResponses(id="gpt-5.2"),
    instructions="You analyze user profiles and provide personalized recommendations.",
)

context_agent = Agent(
    name="ContextAnalyst",
    model=OpenAIResponses(id="gpt-5.2"),
    instructions="You analyze current context and timing to provide relevant insights.",
)

team = Team(
    name="PersonalizationTeam",
    model=OpenAIResponses(id="gpt-5.2"),
    members=[profile_agent, context_agent],
    dependencies={
        "user_profile": get_user_profile,
        "current_context": get_current_context,
    },
    instructions=[
        "You are a personalization team that provides personalized recommendations based on the user's profile and context.",
        "Here is the user profile: {user_profile}",
        "Here is the current context: {current_context}",
    ],
    debug_mode=True,
    markdown=True,
)

team.print_response(
    "Please provide me with a personalized summary of today's priorities based on my profile and interests.",
)
```

<Check>
  Dependencies are automatically resolved when the team is run.
</Check>

<Tip>
  You can set `dependencies` on `Team` initialization, or pass it to the `run()`, `arun()`, `print_response()` and `aprint_response()` methods. Use `add_dependencies_to_context=True` to automatically add all dependencies to the user message instead of referencing them in instructions.
</Tip>

## Learn more

<CardGroup cols={2}>
  <Card title="Dependencies Overview" icon="book" href="/dependencies/overview">
    Learn the fundamentals of dependency injection
  </Card>

  <Card title="Reference Dependencies" icon="link" href="/dependencies/team/reference-dependencies">
    Reference dependencies in instructions
  </Card>

  <Card title="Access Dependencies in Tool" icon="wrench" href="/dependencies/team/access-dependencies-in-tool">
    Use RunContext to access dependencies in tools
  </Card>

  <Card title="Team Schema" icon="file-code" href="/reference/teams/team">
    View the complete Team API reference
  </Card>
</CardGroup>
