The agent role driving the conversation. CHAT is the
interactive human-in-the-loop assistant. CAMPAIGN_MANAGER is a
retired agent role — its UI surfaces and cron were removed and
nothing creates these rows today; the value is retained as the
canonical per-org system-conversation seam, since it is the only
kind the partial unique index that keeps system rows at
one-per-(org, kind) actually covers (the kinds below are all
excluded), so it backs the race-safe
get_or_create_for_org_and_kind path for a future per-org
background agent.
MAPPING_DISAMBIGUATION is a lever-pull conversation opened by
push-token discovery when the LLM needs operator input to pick a
candidate or run a flatten-view; the partial unique index that
keeps system rows at one-per-(org, kind) explicitly EXCLUDES this
kind so an org can carry one disambiguation thread per integration
that needs review. SLACK is the
per-Slack-thread internal agent conversation — one per mention
thread, also excluded from the partial index, keyed by
SlackAgentThread.conversation_id instead.
APP_BUILDER is the per-app editor thread — one per
polymorphic_apps row, also excluded from the partial index,
keyed by polymorphic_apps.conversation_id instead; like
MAPPING_DISAMBIGUATION it is write-enabled for org members
because the editor flows member instructions through the agent
loop. MORPH_SESSION is the per-edit-session thread — one per
morph_sessions row, also
excluded from the partial index, keyed by
morph_sessions.conversation_id instead.
APP_MAINTAINER is the per-app maintainer thread the daily
background agent runs in, one per polymorphic_apps row, keyed
by polymorphic_apps.maintainer_conversation_id; unlike
APP_BUILDER it stays read-only for org members, since no member
writes into it. Future agent roles
add new values; the enum is the discriminator callers filter on
(e.g. list-by-kind).