ThreadRun 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. |
| 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: Date | null
Property Value
Date | null
completedAt
The Unix timestamp, in seconds, representing when this completed.
completedAt: Date | null
Property Value
Date | null
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: Date | null
Property Value
Date | null
failedAt
The Unix timestamp, in seconds, representing when this failed.
failedAt: Date | null
Property Value
Date | null
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: IncompleteRunDetails | null
Property Value
IncompleteRunDetails | null
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: RunError | null
Property Value
RunError | null
maxCompletionTokens
The maximum number of completion tokens specified to have been used over the course of the run.
maxCompletionTokens: number | null
Property Value
number | null
maxPromptTokens
The maximum number of prompt tokens specified to have been used over the course of the run.
maxPromptTokens: number | null
Property Value
number | null
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: Record<string, string> | null
Property Value
Record<string, string> | null
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?: RequiredActionUnion | null
Property Value
RequiredActionUnion | null
responseFormat
The response format of the tool calls used in this run.
responseFormat: AgentsResponseFormatOption | null
Property Value
AgentsResponseFormatOption | null
startedAt
The Unix timestamp, in seconds, representing when this item was started.
startedAt: Date | null
Property Value
Date | null
status
temperature
The sampling temperature used for this run. If not set, defaults to 1.
temperature?: number | null
Property Value
number | null
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: AgentsToolChoiceOption | null
Property Value
AgentsToolChoiceOption | null
toolResources
Override the tools the agent can use for this run. This is useful for modifying the behavior on a per-run basis
toolResources?: ToolResources | null
Property Value
ToolResources | null
tools
The overridden enabled tools used for this agent thread run.
tools: ToolDefinitionUnion[]
Property Value
topP
The nucleus sampling value used for this run. If not set, defaults to 1.
topP?: number | null
Property Value
number | null
truncationStrategy
The strategy to use for dropping messages as the context windows moves forward.
truncationStrategy: TruncationObject | null
Property Value
TruncationObject | null
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: RunCompletionUsage | null
Property Value
RunCompletionUsage | null