public.agents_observation_cursors¶
Columns¶
| Name | Type | Default | Nullable | Children | Parents | Comment |
|---|---|---|---|---|---|---|
| agentId | varchar(36) | false | public.agents | Agent that owns this cursor | ||
| createdAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | |||
| lastModelId | varchar(255) | true | Model id of the last model request | |||
| lastObservedAt | timestamp(3) with time zone | false | ||||
| lastObservedMessageId | varchar(36) | false | ||||
| lastRequestTokens | integer | true | Input tokens the provider reported for the last model request | |||
| observationScopeId | varchar(255) | false | public.agents_threads | agents_threads.id source stream checkpointed by this cursor | ||
| resumeFromAt | timestamp(3) with time zone | true | Creation time of resumeFromMessageId | |||
| resumeFromMessageId | varchar(36) | true | Last message replaced by resumeNotes; later requests start after it | |||
| resumeNotes | text | true | Observation notes as sent to the model at the resume point | |||
| updatedAt | timestamp(3) with time zone | CURRENT_TIMESTAMP(3) | false | |||
| workingSet | text | true | Plan checklist and working commands the Observer last wrote; each write replaces it |
Constraints¶
| Name | Type | Definition |
|---|---|---|
| FK_64e92819f4b413661ed6e2c3c3d | FOREIGN KEY | FOREIGN KEY ("agentId") REFERENCES agents(id) ON DELETE CASCADE |
| FK_87aa187d27ea67eafd164905154 | FOREIGN KEY | FOREIGN KEY ("observationScopeId") REFERENCES agents_threads(id) ON DELETE CASCADE |
| PK_eb777ac57ab872d38f8ebd19317 | PRIMARY KEY | PRIMARY KEY ("agentId", "observationScopeId") |
| agents_observation_cursors_agentId_not_null | n | NOT NULL "agentId" |
| agents_observation_cursors_createdAt_not_null | n | NOT NULL "createdAt" |
| agents_observation_cursors_lastObservedAt_not_null | n | NOT NULL "lastObservedAt" |
| agents_observation_cursors_lastObservedMessageId_not_null | n | NOT NULL "lastObservedMessageId" |
| agents_observation_cursors_observationScopeId_not_null | n | NOT NULL "observationScopeId" |
| agents_observation_cursors_updatedAt_not_null | n | NOT NULL "updatedAt" |
Indexes¶
| Name | Definition |
|---|---|
| IDX_87aa187d27ea67eafd16490515 | CREATE INDEX "IDX_87aa187d27ea67eafd16490515" ON public.agents_observation_cursors USING btree ("observationScopeId") |
| PK_eb777ac57ab872d38f8ebd19317 | CREATE UNIQUE INDEX "PK_eb777ac57ab872d38f8ebd19317" ON public.agents_observation_cursors USING btree ("agentId", "observationScopeId") |
Relations¶
erDiagram
"public.agents_observation_cursors" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE"
"public.agents_observation_cursors" }o--|| "public.agents_threads" : "FOREIGN KEY (#quot;observationScopeId#quot;) REFERENCES agents_threads(id) ON DELETE CASCADE"
"public.agents_observation_cursors" {
varchar_36_ agentId FK
timestamp_3__with_time_zone createdAt
varchar_255_ lastModelId
timestamp_3__with_time_zone lastObservedAt
varchar_36_ lastObservedMessageId
integer lastRequestTokens
varchar_255_ observationScopeId FK
timestamp_3__with_time_zone resumeFromAt
varchar_36_ resumeFromMessageId
text resumeNotes
timestamp_3__with_time_zone updatedAt
text workingSet
}
"public.agents" {
varchar_36_ activeVersionId FK
varchar_36_ approvalWorkflowId FK
boolean availableInMCP
timestamp_3__with_time_zone createdAt
varchar_36_ id
uuid identityId FK
json integrations
boolean isArchived
varchar_128_ name
varchar_36_ parentFolderId FK
varchar_255_ projectId FK
integer publicationRevision
integer revision
json schema
varchar_16_ scope
timestamp_3__with_time_zone setupCompletedAt
json skills
json tools
timestamp_3__with_time_zone updatedAt
varchar_36_ versionId
}
"public.agents_threads" {
timestamp_3__with_time_zone createdAt
varchar_128_ id
text metadata
varchar_255_ resourceId
varchar_255_ title
timestamp_3__with_time_zone updatedAt
}Generated by tbls
Markdown source: View on AtomGit·Content from the open-source project n8/n8n