콘텐츠로 이동

RunConfig

이 콘텐츠는 아직 번역되지 않았습니다.

type RunConfig = object;

Configures settings for the entire agent run.

optional callModelInputFilter: CallModelInputFilter;

Invoked immediately before calling the model, allowing callers to edit the system instructions or input items that will be sent to the model.


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 sessionInputCallback: SessionInputCallback;

Customizes how session history is combined with the current turn’s input. When omitted, history items are appended before the new input.


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, string>;

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”.