Orkestia
Blog
Chat

Enable and publish

Turn on a chat space for an identity app with buzz.space.enable, publish the hosted chat page with buzz.space.publish-chat, and let your end users sign in with their app identity

This page takes an identity app from "no chat" to a chat page your end users can open. Two workflows do the work: buzz.space.enable and buzz.space.publish-chat. Both are callable from the console, the API and an assistant over MCP, and both must be started by a person in your organization, not by an agent.

Before you start

  • A live identity app. Chat sign-in uses the app's hosted login, so the app must be in live mode with its OIDC client (see Sign in with Orkestia). A dev mode app is refused when the chat page is published.
  • An App Host site claimed for that app. The relay runs next to the site. See Your app.
  • Postgres attached to the site. The relay keeps its messages in the app's own App Data instance. If the site has none yet, attach it from the site's Postgres tab first. See App Data on App Host.
  • An active platform subscription. Publishing a release on the site needs one.
Turning the chat on makes the site's machine always-on, the same as the Buzz addon. The relay, its Redis and its media storage run whether or not anyone is chatting. Chat media is not the Identity app Files tab (apphost.file.*).

1. Enable the chat

From the console: open the identity app, go to the Chat tab and turn the chat on. From the API or an assistant:

start_workflow("buzz.space.enable", {
  "identity_app_uuid": "<your identity app uuid>",
  "sku": "small",
  "channel_scope": "app",
  "publish_chat": false
})
InputRequiredMeaning
identity_app_uuidyesThe app whose end users will chat
site_uuidnoOnly when the app has more than one claimed site
skunosmall (default), medium or large
channel_scopenoapp (default): channels span the whole app. workspace: channels bind to the app's workspaces
publish_chatnotrue also publishes the hosted chat page at the end. Default false, because publishing replaces the site's active release

buzz.space.enable is a DAG. In order, it:

  1. checks that the caller is a person in the organization that owns the app, and resolves the app's site;
  2. creates a platform-held owner key for the relay (you never see or paste an nsec);
  3. applies the relay on the site and proves it is ready and owned by that key;
  4. publishes the default Orkestia theme;
  5. exposes the chat's end-user entry points on the identity app (open the chat, sign out, theme, channels, members, your display name, and the channel and notification actions);
  6. with publish_chat, publishes the chat page.

Re-running it is safe. It converges: a disabled space comes back active, and a space that already has entry points gets only the ones it is missing.

If the site already ran a relay that you set up by hand with a pasted owner key, enabling the chat adopts it. The platform key becomes the owner and the old owner key is removed from the relay, so it cannot keep adding members the platform does not know about.

2. Publish the chat page

The console Chat tab has a publish button. The workflow is:

start_workflow("buzz.space.publish-chat", {"space_uuid": "<space uuid>"})

Get the space_uuid from data.buzz.space.get with your identity_app_uuid, or from data.buzz.space.list.

It builds the Orkestia chat page with your app's public settings (the public client key, the app name, the sign-in and API addresses), uploads it as a new release on the site and publishes it. The output carries url, the address of the chat page, and the space records it. Re-running publishes a new release, which is how a space picks up a newer chat page.

The page is published on the chat's own address under app.orkestia.dev, returned as url. To serve it on your site's own https://<slug>.app.orkestia.dev as well, pass also_site_slug: true: the same page replaces what that address served, and its address comes back as slug_url. If your people open the chat on the slug address, pass also_site_slug: true every time you republish.

start_workflow("buzz.space.publish-chat", {"space_uuid": "<space uuid>", "also_site_slug": true})

Common refusals:

CodeFix
space_not_activeEnable (or re-enable) the space first
space_has_no_siteClaim an App Host site for the identity app
identity_app_client_missingThe identity app has no OIDC client. Provision or configure it
apphost_release_publish_refused: ...Usually no active subscription or a dev mode identity app

3. Your end users sign in

A person opens the chat page and signs in with the account they already have in your app. On the first open the platform:

  • checks that they are an active, seated end user of the app (the normal login seat cap applies);
  • admits them to the relay with one stable chat key that the platform holds for them;
  • hands that key to this browser session only. The page keeps it in memory, never in local storage or a cookie. A reload opens a new session;
  • gives them a display name that is never taken from their email. They can change it on the page. See Members and moderation.

Under the hood that is the open entry point, which wraps buzz.session.issue. Sign-out is buzz.session.revoke. People never call buzz.* types directly: end users can only start the compositions your app exposes.

Signing out does not cut a key off the relay. It revokes the session records. To stop a person from chatting, remove or suspend them, and after a suspected key leak rotate their key. See Members and moderation.

Pause or delete the chat

WantWorkflowEffect
Pausebuzz.space.disable with space_uuidStops issuing chat sessions and pauses every attached actor. The relay, history and memberships stay. buzz.space.enable brings it back
Deletebuzz.space.delete with space_uuid and confirm_identity_app_uuidRemoves the relay, its Redis and its media storage with their volumes, and releases members and actors. Irreversible. You must type the identity app uuid to confirm

Check it worked

start_workflow("buzz.space.status", {"identity_app_uuid": "<your identity app uuid>"})

buzz.space.status is read-only. It returns the space, relay readiness, member convergence counts and the actors. A healthy space shows the relay ready and members in sync.

Ask your AI assistant

prompts
Enable the chat for my identity app "<app name>". Show me the buzz.space.enable inputs first and wait for my confirmation before starting it.

Publish the hosted chat page for my chat space with buzz.space.publish-chat and give me the URL when it finishes.

Run buzz.space.status for my identity app and explain anything that is not ready.

My buzz.space.enable run failed. Read its history and tell me which step failed and why.

For AI agents

RuleDetail
Human callers onlybuzz.space.enable, buzz.space.publish-chat, buzz.space.disable and buzz.space.delete refuse agents. Prepare the call and let a person start it
Confirm firstEnabling makes the site always-on. Publishing replaces the site's active release
Resolve idsidentity.app.query for the app, data.buzz.space.get for the space. Never ask the user for an organization_uuid
Watchbuzz.space.enable is a DAG. Use watch_workflow, then get_workflow_history on failure
NeverStart buzz.space.delete without the user typing the identity app uuid themselves