# Dependency callables can now read the run input and session

> An Agno agent's callable dependencies can now take run_input and session alongside agent and run_context, so they can build context from the user's question and earlier turns.

- Published: 2026-09-08
- Author: Ashpreet Bedi
- Categories: Changelog
- Canonical: https://www.agno.com/articles/dependency-callables-can-now-read-the-run-input-and-session
- Markdown: https://www.agno.com/articles/dependency-callables-can-now-read-the-run-input-and-session.md

Agno passes each callable in an agent's `dependencies` whichever of `agent`, `run_context`, `run_input` and `session` it asks for. `run_input.input_content` holds the user's message, and `session` gives it the earlier turns.

A docs assistant needs evidence that fits what the user asked, so the `docs_context` dependency below reads the question straight from `run_input`.

```python
async def docs_context(run_input) -> str:
    question = run_input.input_content if run_input is not None else None
    return await search_docs(question) if question else "No question supplied."

agent = Agent(
    dependencies={"docs_context": docs_context},
    instructions="Answer from this evidence:\n{docs_context}",
)
```

![One agent run in four stages: resolve dependencies, which can now receive run_input and session alongside agent and run_context, then pre-hooks, then build the prompt, then the model call, where a retry reuses the resolved values.](https://www.agno.com/images/v3-0-7-dependency-resolution-order.png)

Agno resolves dependencies before pre-hooks, and reuses a value that resolved successfully if the model call is retried. `add_dependencies_to_context` still defaults to `False`.

See the [cookbook](https://github.com/agno-agi/agno/blob/main/cookbook/05_agent_os/27_public_pages/public_pages.py) for reference, and learn more about [runtime inputs for dependencies](https://docs.agno.com/dependencies/agent/overview#runtime-inputs-for-callables) in the documentation.
