Skip to main content
The LLM runtime includes built-in policies for handling transient failures, managing costs, and protecting against provider outages. Configure them via the builder profile or individual policy settings.

Policy pipeline

Every LLM request passes through this policy chain:

Built-in profiles

Use profile() to apply a curated set of policies:

Individual policies

Configure each policy independently with create_llm_client():
Retry transient LLM failures with exponential backoff.

Fallback chains

Configure a chain of models to try when the primary model fails:

Tuning cheat sheet

Next steps

Agent Integration

How agents resolve and use LLM clients.

Observability

Monitor LLM call latency, errors, and costs.