Overview
Dependencies let you inject runtime variables into your agent’s instructions and user messages using{template} syntax. Values can be static, synchronous functions, or async functions — all resolved at the start of each run.
Quick Start
Per-Run Overrides
Accessing in Tools
Resolved dependencies are available inRunContext:
Template Syntax
{key}— replaced with the resolved value- Unknown keys are left as-is (e.g.
{unknown}stays{unknown}) - Templates work in both
instructionsand stringinput
Resolution Order
- Agent-level
dependenciesfrom config - Per-run
dependenciesfromRunOpts(overrides agent-level) - All callable values are invoked and awaited
- Results are flattened to
Record<string, string>