Skip to content

RunConfig

type RunConfig = object;

Configures settings for the entire agent run.

optional groupId: string;

A grouping identifier to use for tracing, to link multiple traces from the same conversation or process. For example, you might use a chat thread ID.


optional handoffInputFilter: HandoffInputFilter;

A global input filter to apply to all handoffs. If Handoff.inputFilter is set, then that will take precedence. The input filter allows you to edit the inputs that are sent to the new agent. See the documentation in Handoff.inputFilter for more details.


optional inputGuardrails: InputGuardrail[];

A list of input guardrails to run on the initial run input.


optional model:
| string
| Model;

The model to use for the entire agent run. If set, will override the model set on every agent. The modelProvider passed in below must be able to resolve this model name.


modelProvider: ModelProvider;

The model provider to use when looking up string model names. Defaults to OpenAI.


optional modelSettings: ModelSettings;

Configure global model settings. Any non-null values will override the agent-specific model settings.


optional outputGuardrails: OutputGuardrail<AgentOutputType<unknown>>[];

A list of output guardrails to run on the final output of the run.


optional traceId: string;

A custom trace ID to use for tracing. If not provided, we will generate a new trace ID.


traceIncludeSensitiveData: boolean;

Whether we include potentially sensitive data (for example: inputs/outputs of tool calls or LLM generations) in traces. If false, we’ll still create spans for these events, but the sensitive data will not be included.


optional traceMetadata: Record<string, any>;

An optional dictionary of additional metadata to include with the trace.


tracingDisabled: boolean;

Whether tracing is disabled for the agent run. If disabled, we will not trace the agent run.


optional workflowName: string;

The name of the run, used for tracing. Should be a logical name for the run, like “Code generation workflow” or “Customer support agent”.