Skip to content

nova-superagent-sn-app schema

Originally reverse-engineered by reading the ServiceNow update-set export
directly (dictionary + sys_db_object XML). Passed the schema-first gate
and reflects the current data contract for the Super Agent's ServiceNow-side
tables.

Derived from the ServiceNow update-set export in nova-superagent-sn-app
(dictionary + sys_db_object XML under the 06c2bf0583c1f210fbe09696feaad3c9
app folder). This is the current data contract for the Super Agent's
ServiceNow-side tables.

App dependencies (per the app's generated README): Task table schema,
Nova Total Workforce Management Platform, Nova Frontend. One table (tasks)
extends the base task table; one field (event_workflow.business_event_phase)
references a table owned by the platform app (x_novaw_platform_event_phase_configuration),
not this scope — a cross-app dependency to keep in mind for the schema-first
gate.

Every table carries sys_domain (and several also sys_domain_path) — this
app is domain-separated (multi-tenant) throughout.

Diagrams

One diagram covering all 11 tables plus sys_user was too dense to read —
split into the two natural clusters instead: the conversation/event-workflow
core, and the per-user data tables that all just hang off sys_user.
sys_domain / sys_domain_path are omitted everywhere — assume present.

Conversation & event-workflow core

erDiagram
    EVENT_PHASE_CONFIGURATION ||--o{ EVENT_WORKFLOW : "phase (external app)"
    EVENT_WORKFLOW ||--o{ EVENT_INSTRUCTION : has
    EVENT_WORKFLOW ||--o{ AGENT_CONVERSATION_INSTANCE : drives
    AGENT_CONVERSATION_INSTANCE ||--o{ AGENT_CONVERSATION_LOGS : "logs (via conversation_id)"
    AGENT_CONVERSATION_INSTANCE ||--o{ CONVERSATION_HISTORY : "turns (via agent_conversation_instance)"

    EVENT_PHASE_CONFIGURATION {
        string sys_id PK
        string _note "owned by Nova Total Workforce Mgmt Platform, not this app"
    }
    EVENT_WORKFLOW {
        string name
        choice technical_event "approve, confirm"
        boolean autonomous
        string description
        reference business_event_phase FK
        reference user FK
    }
    EVENT_INSTRUCTION {
        reference event_workflow FK
        string instruction
        integer order
    }
    AGENT_CONVERSATION_INSTANCE {
        string conversation_id "display field, plain string"
        string status
        string summary
        string checkpoint_state "32000 chars — serialized agent state"
        choice thread_type "business_event, technical_event, conversation"
        reference event_workflow FK
        reference user FK
    }
    AGENT_CONVERSATION_LOGS {
        reference conversation_id FK "unlike sibling tables' string field of same name"
        string actor "free text, not a reference"
        string relates_to "free text, not a reference"
        choice kind "user_message, planner_thought, agent_dispatch, tool_call, tool_result, agent_result, assistant_message"
        string event_data
        string event_summary
        string event_metadata
        glide_utc_time timestamp
        reference user FK
    }
    CONVERSATION_HISTORY {
        reference agent_conversation_instance FK
        string conversation_id "plain string here"
        choice role "user, assistant"
        string content
        integer sequence
    }

Per-user data

Everything below hangs off sys_user directly — no relationships between
these tables themselves.

erDiagram
    SYS_USER ||--o{ DEVICE_TOKENS : owns
    SYS_USER ||--o{ TASKS : owns
    SYS_USER ||--o{ USER_INSTRUCTIONS : "owns (2x: user, user_id)"
    SYS_USER ||--o{ USER_LONG_TERM_MEMORY : owns
    SYS_USER ||--o{ USER_PREFERENCES : owns
    SYS_USER ||--o{ NOTIFICATION_INBOX : owns

    SYS_USER {
        string sys_id PK
    }
    DEVICE_TOKENS {
        string device_id
        string fcm_token "mandatory — only required field in schema"
        choice platform "ios, android"
        boolean is_logged_in
        reference user FK
    }
    TASKS {
        string task_meta_data
        string task_instructions
        string result
        boolean sa_tasks "default true, discriminator"
        reference user FK
        string _note "extends base task table"
    }
    USER_INSTRUCTIONS {
        string event_type "free text"
        string event_name
        string instructions "40000 chars"
        reference user FK
        reference user_id FK "default All — second user ref, unclear precedence"
    }
    USER_LONG_TERM_MEMORY {
        choice status "active, archived, invalid"
        choice type "fact, behavior, decision, preference"
        integer confidence
        string description
        reference user FK
    }
    USER_PREFERENCES {
        string preferences "free-form blob, presumably JSON"
        reference user FK
    }
    NOTIFICATION_INBOX {
        string conversation_id "plain string, third representation"
        string parent_workflow_id "free text, not FK to event_workflow"
        choice notification_type "info, input, confirm"
        choice thread_type "business_event, technical_event, conversation — duplicated choice list"
        choice status "unread, read"
        string title
        string message
        reference user FK
    }

Note: agent_conversation_instance, agent_conversation_logs, and
event_workflow (in the diagram above) also reference sys_user — omitted
from this second diagram to avoid duplicating the first.

superagent-userschema.drawio

Tables at a glance

Table Label Purpose
x_novaw_superagent_agent_conversation_instance Agent Conversation Instance One row per conversation/thread — status, checkpoint state, links to its Event Workflow
x_novaw_superagent_agent_conversation_logs Agent Conversation Logs Fine-grained execution trace within a conversation (tool calls, dispatch, results)
x_novaw_superagent_conversation_history Superagent Conversation History User/assistant message turns for a conversation
x_novaw_superagent_event_workflow Event Workflow A business/technical event driving agent behavior (approve/confirm)
x_novaw_superagent_event_instruction Event Instruction Ordered instructions attached to an Event Workflow
x_novaw_superagent_notification_inbox Notification inbox User-facing notifications (info/input/confirm), read/unread
x_novaw_superagent_device_tokens Device tokens Mobile push registration (FCM token) per user/device
x_novaw_superagent_tasks tasks Agent task records; extends base task table
x_novaw_superagent_user_instructions User Instructions Per-user, per-event-type instruction overrides
x_novaw_superagent_user_long_term_memory User Long Term Memory Persisted facts/behaviors/decisions/preferences about a user
x_novaw_superagent_user_preferences User Preferences Free-form preferences blob per user

Table detail

x_novaw_superagent_agent_conversation_instance — Agent Conversation Instance

Field Type Notes
status string(200)
updated_at glide_date_time
user reference → sys_user edge-encrypted
sys_domain domain_id
summary string(1000)
checkpoint_state string(32000) large field — likely serialized agent state
event_workflow reference → x_novaw_superagent_event_workflow edge-encrypted
thread_type choice business_event, technical_event, conversation (has stray French-labeled duplicate choice rows — see Open Questions)
conversation_id string(255), display field

Indexed on event_workflow, sys_domain, user.

x_novaw_superagent_agent_conversation_logs — Agent Conversation Logs

Field Type Notes
user reference → sys_user
actor string(40) free-text, not a reference — who/what performed the action
event_metadata string(10000)
relates_to string(40) free-text, not a reference
kind choice user_message, panner_thought [sic, likely "planner"], agent_dispatch, tool_call, tool_result, agent_result, assistant_message
sys_domain domain_id
event_data string(10000)
active boolean edge-encrypted
event_summary string(10000)
event_id string(40)
conversation_id reference → x_novaw_superagent_agent_conversation_instance note: named conversation_id but is a reference, not a string — inconsistent with other tables' conversation_id string field
timestamp glide_utc_time edge-encrypted; UTC while sibling tables use glide_date_time

Indexed on conversation_id, sys_domain, user.

x_novaw_superagent_conversation_history — Superagent Conversation History

Field Type Notes
role choice user, assistant
agent_conversation_instance reference → x_novaw_superagent_agent_conversation_instance
conversation_id string(255) plain string here, unlike the logs table's reference field of the same name
timestamp glide_date_time
content string(32000)
sys_domain domain_id
sequence integer turn ordering

Indexed on agent_conversation_instance, sys_domain.

x_novaw_superagent_event_workflow — Event Workflow

Field Type Notes
technical_event choice approve, confirm — distinct meaning from thread_type's technical_event value elsewhere; naming collision worth flagging
name string(40)
sys_domain domain_id
autonomous boolean
user reference → sys_user
description string(1000)
business_event_phase reference → x_novaw_platform_event_phase_configuration cross-app reference, owned by the platform app, not superagent

Indexed on business_event_phase, sys_domain, user.

x_novaw_superagent_event_instruction — Event Instruction

Field Type Notes
sys_domain domain_id
event_workflow reference → x_novaw_superagent_event_workflow
instruction string(10000)
order integer sequencing within a workflow

Indexed on event_workflow, sys_domain.

x_novaw_superagent_notification_inbox — Notification inbox

Field Type Notes
message string(4000)
expires_at glide_date_time
user reference → sys_user
conversation_id string(100) plain string, not a reference (third distinct representation of "conversation_id" across this app)
notification_type choice info, input, confirm
sys_domain / sys_domain_path domain_id / domain_path
thread_type choice business_event, technical_event, conversation — duplicated choice list vs. agent_conversation_instance.thread_type, no shared choice definition
parent_workflow_id string(100) free-text, not a reference to event_workflow
status choice unread, read
title string(200)

Indexed on sys_domain, sys_domain_path, user.

x_novaw_superagent_device_tokens — Device tokens

Field Type Notes
sys_domain / sys_domain_path domain_id / domain_path
is_logged_in boolean
app_version string(40)
os_version string(40)
device_id string(100)
last_active_at glide_date_time
user reference → sys_user
fcm_token string(600), mandatory only mandatory field in the whole schema
platform choice ios, android

Indexed on device_id, sys_domain, sys_domain_path, user.

x_novaw_superagent_tasks — tasks

Extends base task table (inherits task's standard fields — number, state, assignment, etc. — not repeated here).

Field Type Notes
user reference → sys_user
task_meta_data string(4000)
result string(4000)
sa_tasks boolean, default true discriminator flag, oddly typed as boolean with max_length=255
task_instructions string(4000)

No custom indexes beyond what task provides.

x_novaw_superagent_user_instructions — User Instructions

Field Type Notes
user reference → sys_user
event_type string(40) free text, not a reference
sys_domain_path domain_path
user_id reference → sys_user, default "All" second user reference on this table alongside user — unclear which is authoritative; default value "All" is unusual for a reference field
instructions string(40000)
sys_domain domain_id
event_name string(100)

Indexed on sys_domain, sys_domain_path, user, user_id.

x_novaw_superagent_user_long_term_memory — User Long Term Memory

Field Type Notes
status choice active, archived, invalid
confidence integer
sys_domain domain_id
type choice fact, behavior, decision, preference
description string(1000)
user reference → sys_user

Indexed on sys_domain, user.

x_novaw_superagent_user_preferences — User Preferences

Field Type Notes
preferences string_full_utf8(6000) free-form blob, presumably JSON
user reference → sys_user
sys_domain domain_id

Indexed on sys_domain, user.

Relationships (informal)

event_workflow ──< event_instruction
event_workflow ──< agent_conversation_instance
agent_conversation_instance ──< agent_conversation_logs
agent_conversation_instance ──< conversation_history
sys_user ──< (conversation_instance, conversation_logs, device_tokens, tasks,
              user_instructions, user_long_term_memory, user_preferences,
              notification_inbox, event_workflow)
event_workflow.business_event_phase ──> x_novaw_platform_event_phase_configuration (external app)

Open questions / things to confirm before treating this as the reviewed contract

  1. **conversation_id is represented three different ways across tables: a plain string on agent_conversation_instance and conversation_history,
    a
    reference
    to agent_conversation_instance on agent_conversation_logs,
    and a plain string again on notification_inbox. Decide whether these
    should converge on the reference type, or whether the string fields are
    deliberately loose (e.g. for cross-system correlation).
  2. **thread_type choice list is duplicated** verbatim (with the same three values) on both agent_conversation_instance and notification_inbox,
    with no shared/derived choice definition. If they're meant to always
    match, consider a shared choice list or a reference table instead.
  3. Naming collision: event_workflow.technical_event (approve/confirm) vs. thread_type's technical_event choice value — same term, unrelated
    meaning. Worth renaming one to avoid confusion when read out of context.
  4. **user_instructions has two user references** (user and user_id, the latter defaulting to "All") — clarify which is authoritative and
    whether "All" is a real sys_user record or a sentinel that will break
    reference integrity.
  5. **parent_workflow_id on notification_inbox** is a free-text string, not a reference to event_workflow — confirm whether that's intentional
    (e.g. it can point to non-event_workflow things) or should be tightened.
  6. **tasks.sa_tasks** is a boolean field with max_length="255", which is normal for ServiceNow boolean columns but worth a sanity check that it's
    used purely as a discriminator and not storing anything else.
  7. **fcm_token is the only mandatory field in the schema** — confirm that's deliberate (i.e. a device-token row is meaningless without it) and not an
    oversight on other tables that arguably need required fields (e.g. user).
  8. Cross-app reference (event_workflow.business_event_phasex_novaw_platform_event_phase_configuration) means this schema isn't
    fully self-contained — changes to the platform app's phase configuration
    table can affect Super Agent without a corresponding delta in this repo.