Setting the file. One moment.
Subchapter 16.16
agent_execution.mdMarkdown8 KBView on GitHub
CREATE TABLE "agent_execution" ("id" varchar(36) PRIMARY KEY NOT NULL, "threadId" varchar(128) NOT NULL, "status" varchar(16) NOT NULL, "startedAt" datetime(3), "stoppedAt" datetime(3), "duration" integer NOT NULL DEFAULT (0), "userMessage" text, "model" varchar(255), "promptTokens" integer, "completionTokens" integer, "totalTokens" integer, "cost" real, "timeline" text, "error" text, "hitlStatus" varchar(16), "source" varchar(32), "createdAt" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), "updatedAt" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), "storedAt" varchar(2) NOT NULL DEFAULT ('db'), "attachments" text, "failureSummary" text, "author" text, "acceptsSteering" BOOLEAN NOT NULL DEFAULT FALSE, "finishReason" VARCHAR(32), "guardrailCode" VARCHAR(64), "cacheReadTokens" integer, "cacheWriteTokens" integer, "parentExecutionId" varchar(36) CONSTRAINT "FK_agent_execution_parentExecutionId" REFERENCES "agent_execution" ("id") ON DELETE SET NULL, CONSTRAINT "CHK_agent_execution_storedAt" CHECK ((("storedAt" IN ('db', 'fs', 's3', 'az')))), CONSTRAINT "CHK_agent_execution_hitlStatus" CHECK (((((("hitlStatus" IN ('suspended', 'resumed'))))))), CONSTRAINT "CHK_agent_execution_status" CHECK (("status" IN ('running', 'success', 'error', 'cancelled', 'interrupted'))), CONSTRAINT "FK_add2432fb6034cc18b6af299dce" FOREIGN KEY ("threadId") REFERENCES "agent_execution_threads" ("id") ON DELETE CASCADE ON UPDATE NO ACTION)| Name | Type | Default | Nullable | Children | Parents | Comment |
|---|---|---|---|---|---|---|
| acceptsSteering | BOOLEAN | FALSE | false | |||
| attachments | TEXT | true | ||||
| author | TEXT | true | ||||
| cacheReadTokens | INTEGER | true | ||||
| cacheWriteTokens | INTEGER | true | ||||
| completionTokens | INTEGER | true | ||||
| cost | REAL | true | ||||
| createdAt | datetime(3) | STRFTIME(‘%Y-%m-%d %H:%M:%f’, ‘NOW’) | false | |||
| duration | INTEGER | 0 | false | |||
| error | TEXT | true | ||||
| failureSummary | TEXT | true | ||||
| finishReason | VARCHAR(32) | true | ||||
| guardrailCode | VARCHAR(64) | true | ||||
| hitlStatus | varchar(16) | true | ||||
| id | varchar(36) | false | agent_background_job agent_execution agent_execution_message_links agent_message_queue | |||
| model | varchar(255) | true | ||||
| parentExecutionId | varchar(36) | true | agent_execution | |||
| promptTokens | INTEGER | true | ||||
| source | varchar(32) | true | ||||
| startedAt | datetime(3) | true | ||||
| status | varchar(16) | false | ||||
| stoppedAt | datetime(3) | true | ||||
| storedAt | varchar(2) | ‘db’ | false | |||
| threadId | varchar(128) | false | agent_execution_threads | |||
| timeline | TEXT | true | ||||
| totalTokens | INTEGER | true | ||||
| updatedAt | datetime(3) | STRFTIME(‘%Y-%m-%d %H:%M:%f’, ‘NOW’) | false | |||
| userMessage | TEXT | true |
| Name | Type | Definition |
|---|---|---|
| - | CHECK | CHECK (((“storedAt” IN (‘db’, ‘fs’, ‘s3’, ‘az’)))) |
| - | CHECK | CHECK ((((((“hitlStatus” IN (‘suspended’, ‘resumed’))))))) |
| - | CHECK | CHECK ((“status” IN (‘running’, ‘success’, ‘error’, ‘cancelled’, ‘interrupted’))) |
| - (Foreign key ID: 0) | FOREIGN KEY | FOREIGN KEY (threadId) REFERENCES agent_execution_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE |
| - (Foreign key ID: 1) | FOREIGN KEY | FOREIGN KEY (parentExecutionId) REFERENCES agent_execution (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE |
| id | PRIMARY KEY | PRIMARY KEY (id) |
| sqlite_autoindex_agent_execution_1 | PRIMARY KEY | PRIMARY KEY (id) |
| Name | Definition |
|---|---|
| IDX_63d3c3a68b9cebf05f967f0b1c | CREATE INDEX “IDX_63d3c3a68b9cebf05f967f0b1c” ON “agent_execution” (“threadId”, “createdAt”) |
| IDX_agent_execution_parentExecutionId | CREATE INDEX “IDX_agent_execution_parentExecutionId” ON “agent_execution” (“parentExecutionId”) |
| IDX_agent_execution_status | CREATE INDEX “IDX_agent_execution_status” ON “agent_execution” (“status”) WHERE “status” = ‘running’ |
| sqlite_autoindex_agent_execution_1 | PRIMARY KEY (id) |
erDiagram
"agent_background_job" }o--o| "agent_execution" : "FOREIGN KEY (sourceExecutionId) REFERENCES agent_execution (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE"
"agent_execution" }o--o| "agent_execution" : "FOREIGN KEY (parentExecutionId) REFERENCES agent_execution (id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE"
"agent_execution_message_links" |o--|| "agent_execution" : "FOREIGN KEY (executionId) REFERENCES agent_execution (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
"agent_message_queue" }o--o| "agent_execution" : "FOREIGN KEY (executionId) REFERENCES agent_execution (id) ON UPDATE NO ACTION ON DELETE NO ACTION MATCH NONE"
"agent_message_queue" }o--o| "agent_execution" : "FOREIGN KEY (steeringExecutionId) REFERENCES agent_execution (id) ON UPDATE NO ACTION ON DELETE NO ACTION MATCH NONE"
"agent_execution" }o--|| "agent_execution_threads" : "FOREIGN KEY (threadId) REFERENCES agent_execution_threads (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
"agent_execution" {
BOOLEAN acceptsSteering
TEXT attachments
TEXT author
INTEGER cacheReadTokens
INTEGER cacheWriteTokens
INTEGER completionTokens
REAL
Generated by tbls (opens in a new tab)