ThreadRunOutput interface
Data representing a single evaluation run of an agent thread.
Properties
assistant |
The ID of the agent associated with the thread this run was performed against. |
cancelled |
The Unix timestamp, in seconds, representing when this was cancelled. |
completed |
The Unix timestamp, in seconds, representing when this completed. |
created |
The Unix timestamp, in seconds, representing when this object was created. |
expires |
The Unix timestamp, in seconds, representing when this item expires. |
failed |
The Unix timestamp, in seconds, representing when this failed. |
id | The identifier, which can be referenced in API endpoints. |
incomplete |
Details on why the run is incomplete. Will be |
instructions | The overridden system instructions used for this agent thread run. |
last |
The last error, if any, encountered by this agent thread run. |
max |
The maximum number of completion tokens specified to have been used over the course of the run. |
max |
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'. |
parallel |
Determines if tools can be executed in parallel within the run. |
required |
The details of the action required for the agent thread run to continue. |
response |
The response format of the tool calls used in this run. |
started |
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. |
thread |
The ID of the thread associated with this run. |
tool |
Controls whether or not and which tool is called by the model. |
tool |
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. |
truncation |
The strategy to use for dropping messages as the context windows moves forward. |
usage | Usage statistics related to the run. This value will be |
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
null | IncompleteRunDetailsOutput
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
null | RunErrorOutput
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
null | RequiredActionOutput
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
null | TruncationObjectOutput
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
null | RunCompletionUsageOutput