public.agents
Columns
Constraints
Indexes
Relations
erDiagram
"public.agents" }o--o| "public.agent_history" : "FOREIGN KEY (#quot;activeVersionId#quot;) REFERENCES agent_history(#quot;versionId#quot;) ON DELETE SET NULL"
"public.agents" }o--o| "public.workflow_entity" : "FOREIGN KEY (#quot;approvalWorkflowId#quot;) REFERENCES workflow_entity(id) ON DELETE RESTRICT"
"public.agent_background_job" }o--|| "public.agents" : "FOREIGN KEY (#quot;parentAgentId#quot;) REFERENCES agents(id) ON DELETE CASCADE"
"public.agent_channel_status" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE"
"public.agent_chat_attachments" }o--o| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE"
"public.agent_chat_subscriptions" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE"
"public.agent_checkpoints" }o--o| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE"
"public.agent_credential_dependency" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE"
"public.agent_eval_dataset" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE"
"public.agent_execution_threads" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE"
"public.agent_files" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE"
"public.agent_history" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE"
"public.agent_knowledge_dependency" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE"
"public.agent_publish_history" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE"
"public.agent_skill_dependency" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE"
"public.agent_task_definition" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE"
"public.agent_task_run_lock" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE"
"public.agent_workflow_dependency" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE"
"public.agents_memory_entries" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE"
"public.agents_memory_entry_candidates" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE"
"public.agents_memory_entry_locks" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE"
"public.agents_memory_entry_sources" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE"
"public.agents_observation_cursors" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE"
"public.agents_observation_locks" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE"
"public.agents_observations" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE"
"public.agents_tags" }o--|| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE"
"public.knowledge_collection" }o--o| "public.agents" : "FOREIGN KEY (#quot;agentId#quot;) REFERENCES agents(id) ON DELETE CASCADE"
"public.agents" }o--|| "public.user" : "FOREIGN KEY (#quot;identityId#quot;) REFERENCES #quot;user#quot;(id) ON DELETE RESTRICT"
"public.agents" }o--o| "public.folder" : "FOREIGN KEY (#quot;parentFolderId#quot;) REFERENCES folder(id) ON DELETE RESTRICT"
"public.agents" }o--o| "public.project" : "FOREIGN KEY (#quot;projectId#quot;) REFERENCES project(id) ON DELETE CASCADE"
"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.agent_history" {
varchar_36_ agentId FK
varchar_255_ author
timestamp_3__with_time_zone createdAt
text description
text name
uuid publishedById FK
json schema
json skills
json tools
timestamp_3__with_time_zone updatedAt
varchar_36_ versionId
}
"public.workflow_entity" {
boolean active
varchar_36_ activeVersionId FK
json connections
timestamp_3__with_time_zone createdAt
text description
varchar_36_ id
boolean isArchived
json meta
varchar_128_ name
json nodeGroups
json nodes
varchar_36_ parentFolderId FK
json pinData
json settings
varchar sourceWorkflowId
json staticData
integer triggerCount
timestamp_3__with_time_zone updatedAt
integer versionCounter
character_36_ versionId
}
"public.agent_background_job" {
integer callerExecutionId FK
varchar_36_ childExecutionId
varchar_128_ childThreadId
timestamp_3__with_time_zone createdAt
text error
json files
varchar_36_ id
varchar_16_ kind
timestamp_3__with_time_zone notifiedAt
varchar_36_ parentAgentId FK
varchar_64_ parentPrincipalHash
varchar_255_ parentResourceId
varchar_128_ parentRunId
varchar_128_ parentThreadId
uuid pauseRequestId
uuid planId FK
uuid planTaskId
text result
timestamp_3__with_time_zone settledAt
json skippedFiles
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
uuid wakeAttemptId
varchar_36_ workflowId
}
"public.agent_channel_status" {
varchar_36_ agentId FK
integer attempts
timestamp_3__with_time_zone backoffUntil
timestamp_3__with_time_zone createdAt
varchar_36_ credentialId
text errorMessage
timestamp_3__with_time_zone expiresAt
varchar_128_ hostId
varchar_64_ integrationType
varchar_16_ status
timestamp_3__with_time_zone updatedAt
}
"public.agent_chat_attachments" {
varchar_36_ agentId FK
text binaryDataId
varchar_64_ contentHash
timestamp_3__with_time_zone createdAt
varchar_128_ createdByThreadId
varchar_255_ fileName
integer fileSizeBytes
varchar_16_ id
varchar_255_ mimeType
varchar_36_ projectId FK
varchar_255_ resourceId
varchar_32_ source
varchar_128_ threadId
timestamp_3__with_time_zone updatedAt
}
"public.agent_chat_subscriptions" {
varchar_36_ agentId FK
timestamp_3__with_time_zone createdAt
varchar_255_ credentialId
varchar_64_ integrationType
varchar_255_ threadId
timestamp_3__with_time_zone updatedAt
}
"public.agent_checkpoints" {
varchar_255_ agentId FK
timestamp_3__with_time_zone createdAt
boolean expired
varchar_255_ runId
text state
text threadId
timestamp_3__with_time_zone updatedAt
}
"public.agent_credential_dependency" {
varchar_36_ agentId FK
timestamp_3__with_time_zone createdAt
varchar_36_ credentialId FK
}
"public.agent_eval_dataset" {
varchar_36_ agentId FK
json columnMapping
timestamp_3__with_time_zone createdAt
uuid createdById FK
json datasetRef
varchar_32_ datasetSource
text description
varchar_36_ id
varchar_128_ name
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
boolean isTestChat
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
}
"public.agent_files" {
varchar_36_ agentId FK
text binaryDataId
timestamp_3__with_time_zone createdAt
varchar_255_ fileName
integer fileSizeBytes
varchar_16_ id
varchar_255_ mimeType
text storageKey
varchar_2_ storedAt
timestamp_3__with_time_zone updatedAt
}
"public.agent_knowledge_dependency" {
varchar_36_ agentId FK
timestamp_3__with_time_zone createdAt
varchar_16_ knowledgeCollectionId FK
}
"public.agent_publish_history" {
varchar_36_ agentId FK
varchar_255_ author
timestamp_3__with_time_zone createdAt
varchar_16_ event
integer id
boolean isLegacy
uuid userId FK
varchar_36_ versionId FK
}
"public.agent_skill_dependency" {
varchar_36_ agentId FK
timestamp_3__with_time_zone createdAt
varchar_36_ skillId FK
uuid skillVersionId FK
}
"public.agent_task_definition" {
varchar_36_ agentId FK
timestamp_3__with_time_zone createdAt
varchar_128_ cronExpression
varchar_32_ id
varchar_128_ name
text objective
varchar_64_ timezone
timestamp_3__with_time_zone updatedAt
}
"public.agent_task_run_lock" {
varchar_36_ agentId FK
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone heldUntil
uuid holderId
varchar_32_ taskId
timestamp_3__with_time_zone updatedAt
}
"public.agent_workflow_dependency" {
varchar_36_ agentId FK
timestamp_3__with_time_zone createdAt
varchar_36_ workflowId FK
}
"public.agents_memory_entries" {
varchar_36_ agentId FK
text content
varchar_64_ contentHash
timestamp_3__with_time_zone createdAt
bytea embedding
varchar_128_ embeddingModel
varchar_36_ id
timestamp_3__with_time_zone lastSeenAt
json metadata
varchar_255_ resourceId FK
varchar_16_ status
varchar_36_ supersededBy FK
timestamp_3__with_time_zone updatedAt
}
"public.agents_memory_entry_candidates" {
varchar_36_ agentId FK
smallint attemptCount
text content
timestamp_3__with_time_zone createdAt
text evidenceText
varchar_36_ id
varchar_32_ kind
varchar_255_ resourceId FK
varchar_255_ runId
varchar_36_ sourceMessageId FK
varchar_16_ status
varchar_255_ threadId FK
varchar_255_ toolCallId
timestamp_3__with_time_zone updatedAt
}
"public.agents_memory_entry_locks" {
varchar_36_ agentId FK
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone heldUntil
varchar_64_ holderId
varchar_255_ resourceId FK
timestamp_3__with_time_zone updatedAt
}
"public.agents_memory_entry_sources" {
varchar_36_ agentId FK
varchar_36_ candidateId FK
timestamp_3__with_time_zone createdAt
varchar_64_ evidenceHash
text evidenceText
varchar_36_ id
varchar_36_ memoryEntryId FK
varchar_36_ observationId FK
varchar_255_ threadId FK
timestamp_3__with_time_zone updatedAt
}
"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_observation_locks" {
varchar_36_ agentId FK
timestamp_3__with_time_zone createdAt
timestamp_3__with_time_zone heldUntil
varchar_64_ holderId
varchar_255_ observationScopeId FK
varchar_20_ taskKind
timestamp_3__with_time_zone updatedAt
}
"public.agents_observations" {
varchar_36_ agentId FK
timestamp_3__with_time_zone createdAt
varchar_36_ id
varchar_16_ marker
varchar_255_ observationScopeId FK
varchar_36_ parentId FK
varchar_16_ status
varchar_36_ supersededBy FK
text text
integer tokenCount
timestamp_3__with_time_zone updatedAt
}
"public.agents_tags" {
varchar_36_ agentId FK
varchar_36_ tagId FK
}
"public.knowledge_collection" {
varchar_36_ agentId FK
timestamp_3__with_time_zone createdAt
uuid createdById FK
varchar_512_ description
varchar_16_ id
boolean isGlobal
varchar_16_ kind
varchar_128_ name
varchar_36_ projectId FK
varchar_24_ slug
timestamp_3__with_time_zone updatedAt
}
"public.user" {
timestamp_3__with_time_zone createdAt
boolean disabled
varchar_255_ email
varchar_32_ firstName
uuid id
varchar_16_ kind
date lastActiveAt
varchar_32_ lastName
boolean mfaEnabled
text mfaRecoveryCodes
text mfaSecret
varchar_255_ password
json personalizationAnswers
varchar_128_ roleSlug FK
json settings
timestamp_3__with_time_zone updatedAt
}
"public.folder" {
timestamp_3__with_time_zone createdAt
varchar_36_ id
varchar_128_ name
varchar_36_ parentFolderId FK
varchar_36_ projectId FK
varchar_16_ resourceType
timestamp_3__with_time_zone updatedAt
}
"public.project" {
timestamp_3__with_time_zone createdAt
uuid creatorId FK
json customTelemetryTags
varchar_512_ description
json icon
varchar_36_ id
varchar_255_ name
varchar_36_ type
timestamp_3__with_time_zone updatedAt
}
Generated by tbls
Markdown source: View on AtomGit·Content from the open-source project n8/n8n