Share via


ThreadRunOutput interface

Data representing a single evaluation run of an agent thread.

Properties

assistantId

The ID of the agent associated with the thread this run was performed against.

cancelledAt

The Unix timestamp, in seconds, representing when this was cancelled.

completedAt

The Unix timestamp, in seconds, representing when this completed.

createdAt

The Unix timestamp, in seconds, representing when this object was created.

expiresAt

The Unix timestamp, in seconds, representing when this item expires.

failedAt

The Unix timestamp, in seconds, representing when this failed.

id

The identifier, which can be referenced in API endpoints.

incompleteDetails

Details on why the run is incomplete. Will be null if the run is not incomplete.

instructions

The overridden system instructions used for this agent thread run.

lastError

The last error, if any, encountered by this agent thread run.

maxCompletionTokens

The maximum number of completion tokens specified to have been used over the course of the run.

maxPromptTokens

The maximum number of prompt tokens specified to have been used over the course of the run.

metadata

A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length.

model

The ID of the model to use.

object

The object type, which is always 'thread.run'.

parallelToolCalls

Determines if tools can be executed in parallel within the run.

requiredAction

The details of the action required for the agent thread run to continue.

responseFormat

The response format of the tool calls used in this run.

startedAt

The Unix timestamp, in seconds, representing when this item was started.

status

The status of the agent thread run.

Possible values: "queued", "in_progress", "requires_action", "cancelling", "cancelled", "failed", "completed", "expired"

temperature

The sampling temperature used for this run. If not set, defaults to 1.

threadId

The ID of the thread associated with this run.

toolChoice

Controls whether or not and which tool is called by the model.

toolResources

Override the tools the agent can use for this run. This is useful for modifying the behavior on a per-run basis

tools

The overridden enabled tools used for this agent thread run.

topP

The nucleus sampling value used for this run. If not set, defaults to 1.

truncationStrategy

The strategy to use for dropping messages as the context windows moves forward.

usage

Usage statistics related to the run. This value will be null if the run is not in a terminal state (i.e. in_progress, queued, etc.).

Property Details

assistantId

The ID of the agent associated with the thread this run was performed against.

assistantId: string

Property Value

string

cancelledAt

The Unix timestamp, in seconds, representing when this was cancelled.

cancelledAt: null | Date

Property Value

null | Date

completedAt

The Unix timestamp, in seconds, representing when this completed.

completedAt: null | Date

Property Value

null | Date

createdAt

The Unix timestamp, in seconds, representing when this object was created.

createdAt: Date

Property Value

Date

expiresAt

The Unix timestamp, in seconds, representing when this item expires.

expiresAt: null | Date

Property Value

null | Date

failedAt

The Unix timestamp, in seconds, representing when this failed.

failedAt: null | Date

Property Value

null | Date

id

The identifier, which can be referenced in API endpoints.

id: string

Property Value

string

incompleteDetails

Details on why the run is incomplete. Will be null if the run is not incomplete.

incompleteDetails: null | IncompleteRunDetailsOutput

Property Value

instructions

The overridden system instructions used for this agent thread run.

instructions: string

Property Value

string

lastError

The last error, if any, encountered by this agent thread run.

lastError: null | RunErrorOutput

Property Value

maxCompletionTokens

The maximum number of completion tokens specified to have been used over the course of the run.

maxCompletionTokens: null | number

Property Value

null | number

maxPromptTokens

The maximum number of prompt tokens specified to have been used over the course of the run.

maxPromptTokens: null | number

Property Value

null | number

metadata

A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length.

metadata: null | Record<string, string>

Property Value

null | Record<string, string>

model

The ID of the model to use.

model: string

Property Value

string

object

The object type, which is always 'thread.run'.

object: "thread.run"

Property Value

"thread.run"

parallelToolCalls

Determines if tools can be executed in parallel within the run.

parallelToolCalls: boolean

Property Value

boolean

requiredAction

The details of the action required for the agent thread run to continue.

requiredAction?: null | RequiredActionOutput

Property Value

responseFormat

The response format of the tool calls used in this run.

responseFormat: null | AgentsApiResponseFormatOptionOutput

Property Value

startedAt

The Unix timestamp, in seconds, representing when this item was started.

startedAt: null | Date

Property Value

null | Date

status

The status of the agent thread run.

Possible values: "queued", "in_progress", "requires_action", "cancelling", "cancelled", "failed", "completed", "expired"

status: string

Property Value

string

temperature

The sampling temperature used for this run. If not set, defaults to 1.

temperature?: null | number

Property Value

null | number

threadId

The ID of the thread associated with this run.

threadId: string

Property Value

string

toolChoice

Controls whether or not and which tool is called by the model.

toolChoice: null | AgentsApiToolChoiceOptionOutput

Property Value

toolResources

Override the tools the agent can use for this run. This is useful for modifying the behavior on a per-run basis

toolResources?: null | UpdateToolResourcesOptionsOutput

Property Value

tools

The overridden enabled tools used for this agent thread run.

tools: ToolDefinitionOutput[]

Property Value

topP

The nucleus sampling value used for this run. If not set, defaults to 1.

topP?: null | number

Property Value

null | number

truncationStrategy

The strategy to use for dropping messages as the context windows moves forward.

truncationStrategy: null | TruncationObjectOutput

Property Value

usage

Usage statistics related to the run. This value will be null if the run is not in a terminal state (i.e. in_progress, queued, etc.).

usage: null | RunCompletionUsageOutput

Property Value