public.agent_execution
Columns
| Name |
Type |
Default |
Nullable |
Children |
Parents |
Comment |
| acceptsSteering |
boolean |
false |
false |
|
|
Accept input until the runtime closes admission |
| attachments |
json |
|
true |
|
|
Metadata of files attached to the user turn ({id, fileName, mimeType, sizeBytes}[]); bytes live in BinaryDataService |
| author |
json |
|
true |
|
|
Chat platform user who wrote the turn as {id, name}; null for runs outside chat integrations |
| cacheReadTokens |
integer |
|
true |
|
|
Input tokens read from the provider prompt cache. A subset of promptTokens, not added to it |
| cacheWriteTokens |
integer |
|
true |
|
|
Input tokens written to the provider prompt cache. A subset of promptTokens, not added to it |
| completionTokens |
integer |
|
true |
|
|
|
| cost |
double precision |
|
true |
|
|
|
| createdAt |
timestamp(3) with time zone |
CURRENT_TIMESTAMP(3) |
false |
|
|
|
| duration |
integer |
0 |
false |
|
|
|
| error |
text |
|
true |
|
|
|
| failureSummary |
json |
|
true |
|
|
Execution failure projection as {count, latest} for session list queries |
| finishReason |
varchar(32) |
|
true |
|
|
Why the run ended, e.g. stop or guardrail. Null for older runs. |
| guardrailCode |
varchar(64) |
|
true |
|
|
Code of the guardrail that stopped the run, e.g. budget.session. |
| hitlStatus |
varchar(16) |
|
true |
|
|
|
| id |
varchar(36) |
|
false |
public.agent_background_job public.agent_execution public.agent_execution_message_links public.agent_message_queue |
|
|
| model |
varchar(255) |
|
true |
|
|
|
| parentExecutionId |
varchar(36) |
|
true |
|
public.agent_execution |
Execution of the parent turn that delegated this run. Null for a top-level turn |
| promptTokens |
integer |
|
true |
|
|
|
| source |
varchar(32) |
|
true |
|
|
|
| startedAt |
timestamp(3) with time zone |
|
true |
|
|
|
| status |
varchar(16) |
|
false |
|
|
|
| stoppedAt |
timestamp(3) with time zone |
|
true |
|
|
|
| storedAt |
varchar(2) |
'db'::character varying |
false |
|
|
|
| threadId |
varchar(128) |
|
false |
|
public.agent_execution_threads |
|
| timeline |
json |
|
true |
|
|
|
| totalTokens |
integer |
|
true |
|
|
|
| updatedAt |
timestamp(3) with time zone |
CURRENT_TIMESTAMP(3) |
false |
|
|
|
| userMessage |
text |
|
true |
|
|
|
Constraints
| Name |
Type |
Definition |
| CHK_agent_execution_hitlStatus |
CHECK |
CHECK ((("hitlStatus")::text = ANY ((ARRAY['suspended'::character varying, 'resumed'::character varying])::text[]))) |
| CHK_agent_execution_status |
CHECK |
CHECK (((status)::text = ANY ((ARRAY['running'::character varying, 'success'::character varying, 'error'::character varying, 'cancelled'::character varying, 'interrupted'::character varying])::text[]))) |
| CHK_agent_execution_storedAt |
CHECK |
CHECK ((("storedAt")::text = ANY ((ARRAY['db'::character varying, 'fs'::character varying, 's3'::character varying, 'az'::character varying])::text[]))) |
| FK_add2432fb6034cc18b6af299dce |
FOREIGN KEY |
FOREIGN KEY ("threadId") REFERENCES agent_execution_threads(id) ON DELETE CASCADE |
| FK_agent_execution_parentExecutionId |
FOREIGN KEY |
FOREIGN KEY ("parentExecutionId") REFERENCES agent_execution(id) ON DELETE SET NULL |
| PK_ba438acc8532addc12d1ef17049 |
PRIMARY KEY |
PRIMARY KEY (id) |
| agent_execution_acceptsSteering_not_null |
n |
NOT NULL "acceptsSteering" |
| agent_execution_createdAt_not_null |
n |
NOT NULL "createdAt" |
| agent_execution_duration_not_null |
n |
NOT NULL duration |
| agent_execution_id_not_null |
n |
NOT NULL id |
| agent_execution_status_not_null |
n |
NOT NULL status |
| agent_execution_storedAt_not_null |
n |
NOT NULL "storedAt" |
| agent_execution_threadId_not_null |
n |
NOT NULL "threadId" |
| agent_execution_updatedAt_not_null |
n |
NOT NULL "updatedAt" |
Indexes
| Name |
Definition |
| IDX_63d3c3a68b9cebf05f967f0b1c |
CREATE INDEX "IDX_63d3c3a68b9cebf05f967f0b1c" ON public.agent_execution USING btree ("threadId", "createdAt") |
| IDX_agent_execution_parentExecutionId |
CREATE INDEX "IDX_agent_execution_parentExecutionId" ON public.agent_execution USING btree ("parentExecutionId") |
| IDX_agent_execution_status |
CREATE INDEX "IDX_agent_execution_status" ON public.agent_execution USING btree (status) WHERE ((status)::text = 'running'::text) |
| PK_ba438acc8532addc12d1ef17049 |
CREATE UNIQUE INDEX "PK_ba438acc8532addc12d1ef17049" ON public.agent_execution USING btree (id) |
Relations
erDiagram
"public.agent_background_job" }o--o| "public.agent_execution" : "FOREIGN KEY (#quot;sourceExecutionId#quot;) REFERENCES agent_execution(id) ON DELETE SET NULL"
"public.agent_execution" }o--o| "public.agent_execution" : "FOREIGN KEY (#quot;parentExecutionId#quot;) REFERENCES agent_execution(id) ON DELETE SET NULL"
"public.agent_execution_message_links" }o--|| "public.agent_execution" : "FOREIGN KEY (#quot;executionId#quot;) REFERENCES agent_execution(id) ON DELETE CASCADE"
"public.agent_message_queue" }o--o| "public.agent_execution" : "FOREIGN KEY (#quot;executionId#quot;) REFERENCES agent_execution(id)"
"public.agent_message_queue" }o--o| "public.agent_execution" : "FOREIGN KEY (#quot;steeringExecutionId#quot;) REFERENCES agent_execution(id)"
"public.agent_execution" }o--|| "public.agent_execution_threads" : "FOREIGN KEY (#quot;threadId#quot;) REFERENCES agent_execution_threads(id) ON DELETE CASCADE"
"public.agent_execution" {
boolean acceptsSteering
json attachments
json author
integer cacheReadTokens
integer cacheWriteTokens
integer completionTokens
double_precision cost
timestamp_3__with_time_zone createdAt
integer duration
text error
json failureSummary
varchar_32_ finishReason
varchar_64_ guardrailCode
varchar_16_ hitlStatus
varchar_36_ id
varchar_255_ model
varchar_36_ parentExecutionId FK
integer promptTokens
varchar_32_ source
timestamp_3__with_time_zone startedAt
varchar_16_ status
timestamp_3__with_time_zone stoppedAt
varchar_2_ storedAt
varchar_128_ threadId FK
json timeline
integer totalTokens
timestamp_3__with_time_zone updatedAt
text userMessage
}
"public.agent_background_job" {
varchar_36_ childExecutionId
varchar_128_ childThreadId
timestamp_3__with_time_zone createdAt
text error
varchar_36_ id
varchar_16_ kind
timestamp_3__with_time_zone notifiedAt
varchar_36_ parentAgentId FK
varchar_64_ parentPrincipalHash
varchar_255_ parentResourceId
varchar_128_ parentThreadId
uuid pauseRequestId
uuid planId FK
uuid planTaskId
text result
timestamp_3__with_time_zone settledAt
varchar_36_ sourceExecutionId FK
varchar_16_ status
varchar_36_ subAgentId
timestamp_3__with_time_zone timeoutAt
varchar_255_ title
timestamp_3__with_time_zone updatedAt
varchar_36_ workflowId
}
"public.agent_execution_message_links" {
timestamp_3__with_time_zone createdAt
varchar_6_ direction
varchar_36_ executionId FK
varchar_36_ messageId FK
integer position
}
"public.agent_message_queue" {
timestamp_3__with_time_zone createdAt
varchar_36_ executionId FK
bigint id
varchar_36_ messageId FK
json payload
integer position
varchar_36_ steeringExecutionId FK
integer steeringOrder
varchar_128_ threadId FK
timestamp_3__with_time_zone updatedAt
}
"public.agent_execution_threads" {
varchar_16_ accessScope
varchar_36_ agentId FK
varchar_255_ agentName
timestamp_3__with_time_zone createdAt
varchar_8_ emoji
varchar_128_ id
uuid ownerId FK
varchar_36_ parentAgentId
varchar_128_ parentThreadId
varchar_255_ projectId FK
integer sessionNumber
varchar_32_ taskId
json taskStop
varchar_36_ taskVersionId FK
varchar_255_ title
integer totalCompletionTokens
double_precision totalCost
integer totalDuration
integer totalPromptTokens
timestamp_3__with_time_zone updatedAt
}
Generated by tbls