Documentation
/ Reference
Hive app
Hive is the web interface for Hive Intelligence. Once signed in, you can open Knowledge, Ask, Notes, Sources, and Overview. Notes and Overview show the review queue and its record. Knowledge, Ask and Sources show empty states. Review happens through the assistant connector. The app does not mount a corpus or call a model.
Run Hive
- Install the
vf-hive-appwheel at the engine version you deploy. - Provision a dedicated Postgres database, an owner role, and a separate unprivileged login for the app.
With the owner DSN in
HIVE_APP_DATABASE_DSN, runhiveapp init-db --runtime-role hive_app_web. Use the name of your actual runtime login. Use its DSN, not the owner DSN, to start the app. - Register a confidential web client with your OIDC provider. Enable authorization code flow with
PKCE (S256), query response mode, and signed ID tokens. Register the exact callback
https://hive.example.invalid/auth/callback, replacing the origin with your deployment origin. Configure the provider to include the groups as an array of exact, case-sensitive strings in the ID token, not just the UserInfo response or access token. Limit the client to staff who should have access to your installation. - Set the installation variables and run
hiveapp servebehind a TLS reverse proxy on a dedicated origin. Forward to127.0.0.1:8000by default; use--hostand--portto change the listener. Keep callback query strings and unsubscribe paths out of proxy logs. Use trusted TLS to connect to a remote Postgres server and keep the runtime DSN and session secret private.GET /healthzreturns200when the app schema is reachable under the runtime role, or503when it cannot be used. The health check does not call the OIDC provider. - Sign in with the configured administrator group. In Settings, add each project, its Hive,
and the provider group allowed to open it. For example, the invented project Cobalt Kites
belongs to Paper Insects and uses
sample-kites. Reuse the exact Hive name to put more than one project in that Hive. Nothing is seeded by default.
Backup and restore
Schedule hiveapp backup nightly. It takes a consistent PostgreSQL snapshot of the entire hive_app
schema: cards and drafts, decisions and their timestamps, clarification requests, seen people,
digest and send logs, database settings, sessions, and connector authorization records. It does not
copy service configuration, installation secrets, a publication outbox, or the external corpus.
Keep those separately under the installation's recovery policy.
- Install
pg_dumpandpg_restoreonPATH. Use client tools at least as new as the source server. Use the same PostgreSQL major version for a restore drill. - Provision a dedicated backup directory. Give the backup job write access and the web app only
enough access to list the directory and read file metadata. Set
HIVE_APP_BACKUP_DIRto its absolute path in both environments. Hive does not upload or prune copies; set retention and off-site storage through your installation, and preserve modification times when moving copies. - Generate a dedicated key with
python -c 'from cryptography.fernet import Fernet; print(Fernet.generate_key().decode())'using the app's Python environment. Put it in the installation's secret store asHIVE_APP_BACKUP_KEY. Do not use the session or connector key, put the backup key beside the copies, or give it to the web process. Keep older keys separately for as long as you keep the backups they encrypted. Losing the matching key makes a copy unrecoverable. - Give the backup job its own
HIVE_APP_DATABASE_DSN. Its login needs schema usage, table and sequence reads, andBYPASSRLS, so it can copy rows protected by forced row-level security. Limit that login's access to the databases and data it needs. Never give it tohiveapp serve. Prefer a private libpq passfile or a standaloneservice=...DSN to an inline password. - Run
hiveapp backuponce and check that it writes ahive-app-*.dump.fernetfile. Then schedule it with your service manager, for example at0 2 * * *in UTC with the installed command's absolute path. Monitor the job's exit status. A failed job does not publish a new copy.
On the workspace Overview, administrators see an alarm when the directory is unreadable or
has no completed copy modified in the past 26 hours, including before the first backup. An unset
HIVE_APP_BACKUP_DIR disables the alarm. The alarm checks file age, not recoverability; run a restore
drill to verify that a retained copy and its key still work. Both commands hold the archive in
memory for encryption or authentication and do not write a plaintext archive to disk. Allow memory
for multiple times the archive size.
To restore, provision an empty target database and recreate the original unprivileged runtime
role under the same name. Do not run init-db first. Keep the target app, digest job, and publishing
worker offline during the drill or recovery. Set HIVE_APP_DATABASE_DSN to the target owner, not the
source or runtime login, and supply the key used for the selected copy:
hiveapp restore /var/backups/hive-app/hive-app-example.dump.fernet
Restore validates the encrypted file before contacting PostgreSQL. It restores the schema, data,
policies and grants in one transaction. An existing Hive schema causes restore to fail without
replacing it. The database role used for restore becomes the owner of the restored objects. Give
the recovered app its original installation settings and a runtime DSN for the restored database.
Check /healthz and verify drafts, decisions, clarifications, seen people, and digest history before
reopening it. Reconcile email and publishing work since the snapshot before restarting those jobs.
If recovering from a security incident, revoke restored sessions and grants as needed before allowing
connections. Restore does not undo email delivery or publication outside the app.
File Notes through an assistant
Use the contribute skill with the app's streamable HTTP MCP
endpoint, /mcp. The connector also serves the same seven steps as its MCP instructions, from
tooling/hive-app/hiveapp/drafting.md. Reviewers use the review skill,
which the connector serves after those steps from tooling/hive-app/hiveapp/reviewing.md. A test keeps
the served text equal to both skill bodies.
Run hiveapp init-db with the owner DSN again before upgrading an existing installation. It
adds the connector identity and approval tables without dropping projects or old cards.
Connector sign-in through Hive
Set HIVE_APP_CONNECTOR_ENCRYPTION_KEY to enable OAuth on /mcp. Use a separate Fernet key,
shared by Hive replicas and backed up separately from the database. Register the exact additional
OIDC callback https://hive.example.invalid/oauth/callback at your company provider. Enable
offline_access for that flow. The provider must issue a refresh credential and return a newly
signed ID token with current groups when Hive refreshes it. Without verified claims for the same
subject, Hive refuses the refresh. If the provider cannot be reached, Hive answers 503 and the
assistant keeps its refresh token. Web sign-in still works without offline access.
Hive advertises OAuth discovery at /.well-known/oauth-protected-resource/mcp and
/.well-known/oauth-authorization-server. Assistants can register dynamically or use a client ID
and secret created by an administrator in Settings > Connector clients. A Settings client uses
client_secret_post. To accept a platform's published metadata document, add its exact, trusted
HTTPS URL to HIVE_APP_CONNECTOR_CLIENT_METADATA_IDS. Hive does not follow document redirects or
fetch arbitrary client IDs. Use exact HTTPS redirect URIs and PKCE S256 with all three methods.
Desktop assistants may register an http loopback redirect on 127.0.0.1, [::1] or localhost.
Hive ignores the port of a loopback redirect when it matches and still requires the exact host and
path. Hive ignores any scope an assistant asks for and always issues the single scope mcp. Each
dynamic registration that never completes a sign-in is deleted after 24 hours. Clients that an
administrator entered, and clients that completed a sign-in, are kept.
Access tokens last one hour and work only at the installation's /mcp endpoint. Refresh tokens
rotate on every use and expire no later than 30 days after authorization. Reuse of an old refresh
token revokes that grant. Hive stores only hashes of its own tokens. It encrypts the provider's
refresh credential. Keep the encryption key private: replacing it requires existing connector users
to reconnect for refresh. Do not log authorization or callback query strings, token request or
response bodies, or Authorization headers. Rate-limit registration and OAuth endpoints at the
reverse proxy, and keep the app listener private to that proxy.
Connector sign-in through a trusted proxy
Set HIVE_APP_CONNECTOR_PROXY_SECRET to keep the Phase 0 authentication proxy path. It can run
without Hive OAuth. With both enabled, a verified proxy identity takes precedence over a bearer token.
The authentication proxy handles assistant sign-in and verifies the caller's issuer,
audience, expiry and permissions for the connector. It must remove all incoming copies of the
identity headers below and set them itself after authentication. Keep the app listener private to
that proxy, use a secret dedicated to this link, and do not log these headers or request bodies.
Forward the configured public Host header and limit MCP request bodies at the proxy (1 MiB suffices).
| Forwarded header | Value from the trusted proxy |
|---|---|
X-Hive-Proxy-Secret |
The configured secret, never provided to the assistant. |
X-Hive-Subject |
The stable subject for the caller (matching the web sign-in subject). |
X-Hive-Groups |
A JSON array of verified group names, using the same groups as web sign-in. |
X-Hive-Author |
Optional verified display name for compatibility replies. Defaults to the subject. |
X-Hive-Verified-Email |
Optional address, supplied only if the provider verified it. |
X-Hive-Platform |
Optional platform identifier verified by the proxy. |
If neither connector sign-in path is configured, /mcp is disabled.
| Tool | What it does |
|---|---|
get_project_state() |
Lists the signed-in person's projects. Pass project for current notes and reusable topics. |
submit_card(card, original_words) |
Files a confirmed draft Markdown file and keeps the person's words separately. Returns the draft ID, state, project, and Notes link. |
list_my_cards(project?, limit?) |
Lists the signed-in person's own card states and any recorded decline reasons. |
A project member can open a filed draft in Notes and read the original card file. The person's words are not returned by the connector or shown on the Notes page. Drafts do not serve as Hive knowledge. Project notes stay on the installation. Use an approved local assistant for private project text.
The three legacy contribution tools (submit_memory_promotion, submit_correction and
list_pending_contributions) keep their argument and reply formats. Their memo and url
fields now identify local Notes entries. To retain legacy routing, set HIVE_APP_LEGACY_CORRECTION_PROJECTS
to a product-to-project object such as {"paper-craft":"cobalt-kites"}. Set
HIVE_APP_LEGACY_PROJECT_SLUGS only for project slugs the old connector already disclosed in errors.
These settings do not grant access. Legacy next_steps is retained verbatim for old clients; it
is not a description of the new workflow.
Review through the connector
| Tool | What it does |
|---|---|
my_review_tasks() |
Counts waiting tasks, clarifications, and decisions recorded under your name. No card text or version token. |
list_review_tasks(project?, level?, limit?) |
Lists your tasks by rule check and age. |
get_review_card(card_id) |
Opens one eligible card with its defaults, evidence, approval trail, and version token. |
decide(...), decide_batch(decisions) |
Records decisions on exact cards with current version tokens. A batch has at most 25 cards at one level. |
undo_decision(decision_id) |
Takes back your decision, change or batch during its two-minute hold. |
record_clarification(card_id, version, asked) |
Records who was asked and when without storing or sending a message. |
The connector checks the signed-in project, role, and level. A version token is bound to one reviewer and expires after 24 hours. A card or its defaults changing invalidates the token. A reviewer can decide a card at only one level. Blind tasks omit checker output, and audit submissions are not part of this release.
Clients that negotiate MCP form elicitation get a direct confirmation prompt. Clients without it can still decide under the server's rules. Hive records which path was used. Keep an interactive client's session on one Hive service instance. A scheduled conversation should only list tasks and wait. Hive cannot tell whether a request came from a schedule, so do not pre-approve the decision tools for unattended requests.
Get your Hive tasks every morning
Paste this prompt into a scheduled conversation. The run should list your work, then wait for you. Use the email digest if your platform or plan cannot run the Hive connector on a schedule.
Check my Hive review tasks. Call the Hive connector's my_review_tasks. If nothing waits, say "Nothing waits for you in Hive" and stop. Otherwise call list_review_tasks, show the groups oldest first, and name the card you would open first. This is a scheduled check: do not open a card, do not decide, change, undo or record anything, and do not send or draft any message. Then wait for my answer.
Claude: Scheduled tasks
- Connect Hive in Claude on the web or desktop. On Team or Enterprise, an Owner adds the connector first.
- Open Scheduled in the left sidebar and create a task, or ask Claude to schedule one.
- Paste the prompt. Choose weekdays at 08:30, or your own time.
- Keep the Hive connector on for the task.
- Set the approval mode to Manual. When Claude asks about my_review_tasks and list_review_tasks, choose “Allow for all scheduled runs”.
- Never choose that option for get_review_card, decide, decide_batch, undo_decision, record_clarification or submit_audit.
- Open the run's session and answer there to start the review. Scheduled tasks require a paid plan.
ChatGPT: Scheduled tasks or your dot
- Connect the Hive app on ChatGPT web. On Business, Enterprise or Edu, an admin creates and publishes it first. Free, Go and Plus do not support this connector.
- For a scheduled task, say “Every weekday at 08:30:” and paste the prompt. Manage it on the Scheduled page. Turn on push or email under Settings > Notifications.
- For a dot, connect Hive under Customize > Plugins. Ask your dot: “Every weekday at 08:30:” and paste the prompt.
- Set the dot's custom rule to “Never call Hive's decide, decide_batch, undo_decision, record_clarification or submit_audit unless I answer in this conversation.” Set Hive's actions to “Ask before taking action”.
- Answer in the run's conversation to start the review. On ChatGPT Pro, you can see your tasks but must decide on another platform.
- Scheduled tasks and dots with custom Hive connectors are not yet confirmed. Use the email digest until verified.
Grok: Automations or a Grok Bot routine
- At grok.com/connectors, choose New Connector, then Custom. Enter the Hive address and sign in. On Business or Enterprise, a team admin provisions the connector first.
- For an automation, open Automations and choose weekdays at 08:30. Paste the prompt and mention the connector with “@Hive”. Use “Run now” once to test it.
- For a Grok Bot, connect the Hive MCP server by URL (Remote HTTPS, with the client ID and secret from Hive Settings). Make a routine on a schedule with the prompt. Keep Auto Review on.
- Open the run's conversation and answer there to start the review.
- Automations with custom Hive connectors are not yet confirmed. Use the email digest until verified.
Any other platform
- If the platform can run a prompt on a schedule and call a remote MCP connector, use the same prompt.
- Pre-approve only my_review_tasks and list_review_tasks.
Daily email fallback
In Notes, open Your daily email to set the sending hour and time zone, pause until a date, or stop email. The digest sends on weekdays if work is waiting and your assistant has not checked since the later of the last digest and the sending hour on the previous working day, or a task has waited for more than three working days. The email contains counts and project names, not card titles or text. Unsubscribe from the message without signing in.
The digest does not ask the sign-in provider for groups. It uses the groups from the last verified read of that person, for at most 30 days. If an administrator removes a person from a group, that person can still receive counts and project names for that group until Hive next reads their groups or the stored groups expire. A verified web sign-in or assistant connector refresh that reads fewer groups replaces the stored groups at once, and the next digest uses the new groups. The email never contains card text.
For an installation, set the SMTP settings and run hiveapp init-db
with the schema owner before upgrading. Schedule hiveapp send-digests every 15 minutes with the
same runtime settings as the app. For example, use */15 * * * * in cron with an absolute path to
the installed command and the environment loaded by your service manager. In Settings > Email
digest, send a test to your own verified address. Use a send-only SMTP account with a trusted
TLS certificate. The relay should DKIM-sign both List-Unsubscribe and List-Unsubscribe-Post for
mail clients to show their one-click button.
Overview warns administrators when the command has not run for 24 hours. Hive gives a new installation 24 hours from when the app starts with mail configured before it warns. Monitor the command's exit status for mail failures. Hive reserves one attempt per person and local day before sending, so retries or an interrupted connection cannot send a second digest that day. A failed or interrupted attempt is not counted as sent. If SMTP is unset, no digest runs or alarms are shown.
Publish reviewed cards
Run hiveapp init-db again before upgrading the app. A worker in the app advances elapsed holds. Only a card that passes the final level enters publication. Set one destination for the installation:
HIVE_APP_PUBLICATION_OUTBOX: an existing absolute folder writable only by trusted processes. Each completed job contains the repository-relative Markdown files and a manifest. Your corpus process imports the complete change and runs its checks.HIVE_APP_PUBLICATION_REPOSITORYandHIVE_APP_PUBLICATION_TOKEN: the private corpus repository on GitHub and a repository-scoped credential with contents and pull-request write access. Configure the corpus checks and a corpus workflow to merge accepted Hive branches and close rejected ones. Hive opens a pull request, then observes the result. It does not bypass branch rules or merge changes itself.
A published card gets its corpus path from its type:
- A shared concept publishes to
concepts/<product>/<slug>-<note id>.md. A shared correction publishes toconcepts/<product>/corrections/<slug>-<note id>.md. The<slug>comes from the title, and the note id keeps each path unique. <product>comes from the card header and must be a lowercase product slug. A shared card without a valid product is Blocked. A reviewer sets it with theproductfield of achange,approve, orapprove_and_replacedecision.productis not valid on a decline or in a batch.- A shared card omits
clientwhen published. Drafts keepclientbecause it names the project that reviews them. - A client-tier card keeps
clientand publishes underclients/<project>/.
Without a destination, final approvals wait for publication. A rejected change returns to the final review level. The app shows a hosted change as current only after merge. For the outbox, current means the complete change was handed off, not that the serving engine has indexed it yet.
Read the review in the app
Run hiveapp init-db with the owner DSN again before upgrading. It adds the table for the
contributor setting. The pages below are read only. No page lets anyone approve, decline or change a card.
- Notes lists the cards that wait for a decision, with their level, age, who filed them, and a badge when a clarification request is open. It also lists declined cards with the decline reason. A filter selects one level or the cards that wait for clarification. Blind cards (checks whose answer a decision must not reveal) stay out of this list until they are decided.
- A card page shows the approval trail for each level, including undone decisions, and who was asked to clarify and when. Only reviewers on the card's route and the person who filed it see the clarification lines.
- Overview counts from the same queue and decision record that the connector uses. It shows the waiting cards, the oldest one, each level, clarification requests, current cards for each project, approvals and declines for the last seven days (UTC), and a link to the list of decisions. The time for a decision runs from when the assistant received the full card to when the decision arrived. A time above 15 minutes counts as interrupted and stays out of the median. Each level also shows the total wait, the wait without time after a clarification request, and the wait before and after the first assistant pull. Overview is open to every member of a project, and Hive shows only the projects the person can open.
- Reviewers reached is part of Overview. It covers the current UTC weekday and is not shown on weekends. It counts seen reviewers with at least one task, or a decision, that day, split into those whose assistant pulled tasks, those who only received the email digest that day, and those not reached. A pull takes precedence over a send. A pull shows that an assistant asked for tasks, and a send shows that Hive delivered an email, not that anyone read either.
- Contributors lists the people who filed cards, with one page for each person and a CSV export. A card counts as a contribution when it is approved, and it credits the person who filed it, not the assistant. Declined and waiting cards are counted apart. The counts cover the last 7, 30 or 90 days. A person can open their own page. A reviewer sees the contributors of cards on routes they review. Other members cannot open someone else's page.
In Settings > Contributors, an administrator can turn the contributor numbers off. They are on by default. Turning them off removes the Contributors pages, the export and the links to them. Names stay on cards.
Project access
Only projects that match a group in the signed-in session appear in the navigation. Direct links
for other projects return 404, just like a missing project. An administrator can see project
assignments in Settings, but cannot open a project without its sign-in group. PostgreSQL row-level
security also filters card reads before a page, search, direct link, or count could use those rows.
This is independent of the serving package's identity model.
Hive keeps the web subject and group membership in Postgres, not in the browser cookie. It stores no provider token for web sign-in. Web group changes take effect at the next sign-in. Sign out revokes the browser session, not the company session or the separate assistant grant.
Hive remembers people only after verified sign-in or a verified proxy call. It keeps an email address from OIDC only when the provider marks it verified. There is no Settings page to manage people. Each review task pull records its time and platform. Hive sends review digests, not clarification emails.
In Settings > Approval, administrators can map roles to sign-in groups and pick one to four levels in order. The default is one Administrator level. A project can override the company route or inherit it. A card keeps the list of levels it started with. Each role's sign-in group is read from Settings when needed, so a group change reaches waiting cards. The web app shows the approval trail. Use the assistant connector to record decisions.
The interface follows your device's theme until you use the Dark mode switch. The browser remembers that choice. The bundled Inter font comes from Fontsource Inter Variable 5.3.0 and is redistributed under the SIL Open Font License included with the font.
Test locally
From tooling/hive-app, use uv sync --extra dev and uv run pytest. Tests use an invented OIDC
provider and disposable Postgres. Install Docker or Podman, or set HIVE_APP_TEST_DSN to a test
server where the login can create and drop test databases and roles and seed the isolated card rows.