Skip to main content

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 in RunContext:

Template Syntax

  • {key} — replaced with the resolved value
  • Unknown keys are left as-is (e.g. {unknown} stays {unknown})
  • Templates work in both instructions and string input

Resolution Order

  1. Agent-level dependencies from config
  2. Per-run dependencies from RunOpts (overrides agent-level)
  3. All callable values are invoked and awaited
  4. Results are flattened to Record<string, string>