The schemas
The SQL schema

The schemas

The database is divided into schemas, and each schema holds the tables for one part of the hub: one for accounts, another for personas, another for projects and so on. This page is the catalogue. Each entry says in a line what the schema is for, then names its tables, with a word on the ones whose purpose is not plain from their name.

Description

auth

Who you are to the platform. users is the platform account. refresh_tokens keeps you signed in. user_auth_methods holds the ways you can sign in: a password, OAuth providers, passkeys. api_tokens holds the tmp_ tokens, stored as SHA-256 hashes, each with its scope, expires_at, application_id, persona_id, subject_kind and subject_id. tokens holds the adh_ storage tokens. The rest are pending_users, auth_method_settings (which sign-in methods are on), invitation_requests and invitations.

customer

A person as a member of one ecosystem. customers is keyed by the pair of ecosystem and customer, with a slug and a profile visibility. Around it are auth_methods, sessions, contact_methods, verification_codes, totp_credentials, webauthn_credentials and recovery_codes.

oauth

The sign-in clients. clients holds each one, with a default_ecosystem_id from which its realm is inferred. providers holds the upstream OAuth providers, and client_providers joins the two.

rdid

Addresses. identifiers has one row for every object that can be addressed, in the shape <type>.<parent path>.<slug>, with aliases. archived_identifiers keeps the old ones.

system

The platform's own state: audit_events, feature_flags (the platform-wide flags), server_bag, admin_notes, entity_history and message_log.

billing

Money. subscription_tiers and tier_entitlements say what each tier gives. subscriptions says who is on which. offers map to Stripe prices, accounts are a product's billing accounts, and events is the stored log of Stripe webhooks.

organization

organizations: a name, a slug, a description, the workspace that owns it, and archived_at.

ecosystem

The boundary each owner's data sits inside. ecosystems has the owner, the namespace, a parent_id and an is_infrastructure flag. Around it are ecosystem_regions, applications (each with its OIDC client), auth_settings (the sign-up mode and providers for the ecosystem), feature_flags (flags for this ecosystem), provisioned_features (a key and a state), server_bag, application_data_types and namespaces.

persona

AI personas and what runs them. personas has the prompt, the personality, canned_chat, chat_status, the visibility, the owner and the service. services is a connection to a provider, with its key. service_templates, models (the synced catalog), catalog_sync_runs, mcp_servers (outside MCP servers a persona has registered), tool_templates and special_interests complete it.

persona_memory

What a persona remembers: memories, with its HNSW-indexed embedding, and blocks, facts and links.

team

teams and members.

access

Who may do what. roles, role_grants and role_assignments are the workspace roles. groups and group_members are groups of people. grants are bucket permissions, each a C, R, U or D. Then permissions, user_capabilities, item_access (a restriction on one item), team_permissions (a team's reach into an ecosystem), privacy_grants, persona_tools (what a persona may do), persona_user_grants, persona_may_act and audit.

bucket

The named places data is grouped under. buckets is the tree, with a parent_id. bucket_types says what a bucket holds, with a sql_table_name and a ref_mode. bucket_refs says which rows are in a bucket.

content

Markdown, and everything that attaches to it. The text itself: markdown, markdown_chunks (with a source_hash and an embedding), markdown_versions, notes, docs, papers, attachments, urls, feed and feedback. Filing: categories, category_edges (kept free of cycles by the category_edges_assert_acyclic() trigger), category_items, tags, keywords, keyword_items, lists and list_items. Social: reactions, polls, poll_options, poll_votes, bookmarks, social_links and relationships. Personal: contacts, locations, dates and addresses. Persona storage: key_value_pairs, counters, queues, queue_items and events.

document

The block editor: documents, blocks, operations (the log of edits), versions and marks.

personal

jobs and education.

project

Planning and tracking work: programs, projects, participants, statuses (whose category is backlog, todo, in_progress, done or canceled), iterations, work_items, fields, work_item_field_values, work_item_dependencies, comments, activity, saved_views, status_updates, artifacts, research_projects, templates, tasks and milestones.

chat

Conversations: chats, chat_messages, chat_participants, chat_mentions, chat_rich_content, chat_plugins, chat_definitions and chat_definition_personas.

discussion

Public conversation: topics, posts (whose bodies live in content.markdown), categories, communities and community_members.

integration

Connections to outside services: integration_connections, integration_provider_configs, integration_user_configs, integration_global_configs and integration_action_logs, plus a table for each kind of thing synced in: integration_items, integration_pages, integration_bookmarks, integration_media_items, integration_calendar_events, integration_email_messages, integration_financial_transactions, integration_social_notifications, integration_audiences, integration_audience_contacts and integration_campaign_stats.

monitoring

The sites you watch: site_groups, sites, endpoints and health_checks.

usage

Metering what is used and what it costs: usage_events, usage_daily, cost_lines, cost_daily, rates, fixed_costs, rate_limit_tiers, principal_tiers, storage_quota, usage_counters, rate_buckets and visitor_rate_counters.

settings

Your preferences: notifications, communication, appearance and workspace.

audience

Email sign-up: contacts, lists, list_members, templates, campaigns and deliveries.

announcement, notification, presence, social

Smaller schemas with a few tables each: announcement.announcements and announcement_recipients; notification.notifications; presence.user_presence; and social.friendships, follows and user_blocks.

gamification and game

Points, badges and games. gamification.realm_config sets the mode to none, gamification or game, and around it are realm_event_types, badge_definitions, levels, events, point_ledger, subject_badges, stats and preferences. game holds games, artifacts, sessions, events, players, holdings, stats, definitions, effects, mappings, instances and key_values.

registry

Public directories: registries, sections, field_defs, entries (a typed spine plus a values jsonb column), entry_services and entry_slug_aliases.

shipr

Deployment: groups, dev_repos, deploy_repos, org_defaults, platform_connections, connection_repositories, repo_personas, runs, run_steps, run_events and repo_states.

processing

Background work: jobs (the AI processing queue), change_events (the source the relay reads), webhook_endpoints, webhook_deliveries and persona_approvals.

sync

Syncing to devices: push_ops, gc_state and enrollment (sync overrides for one ecosystem).

theme

themes.

Tech Detail
APIs & protocols
MCPOAuth