Skip to main content
The default integration is the complete OpenGeni conversation inside your product: OpenGeniChat (the user’s chats plus the conversation) in the browser, backed by a packaged proxy on your backend. The browser talks only to your backend, and the organization API key never leaves it.
Install both packages from the same release.
1

Create an organization API key

In Organization settings → Developer, create a full-access organization API key and store the token in your secret manager. Copy the Organization ID from Organization settings → General. Your backend needs:
This one key is all the integration needs: it creates workspaces, adds your users as members, and creates and controls sessions as them. GET /v1/access/me lists only its organization grants (account:read, workspace:create, api_keys:manage) under accountGrants; that is expected. Check credential.access ("full") and credential.effectiveWorkspacePermissions instead. A read-only key can inspect sessions but cannot create them. See Authentication.
2

Onboard each user

Map each tenant to an OpenGeni workspace and make each user a member, once, when your product admits them:
ensureWorkspace is idempotent. Without membership the API answers 403. See Users, tenants & privacy.
3

Mount the proxy

Add one catch-all route. With the Next.js App Router, in app/api/opengeni/[...path]/route.ts:
For Express or Connect, use app.use("/api/opengeni", toNodeMiddleware(createSessionProxyHandler(og, options))) from @opengeni/sdk/express; for Hono, app.all("/api/opengeni/*", toHonoHandler(...)) from @opengeni/sdk/hono. See the SDK reference. A Django, Rails, Go, PHP, or Java backend needs no Node sidecar: see Proxy from any backend.
4

Render the conversation

OpenGeniChat lists the chats the signed-in user started (a sidebar when wide, a drawer when narrow) and starts new ones through your createSession hook. For an assistant bound to one record, create the session on your server as the user (og.asUser(userId, { source }).createSession(...) with a stable idempotencyKey) and render <SessionConversation sessionId={id} />. The stylesheet is scoped and needs no Tailwind setup. See Conversation UI & theming.

Next

Give the agent your data

Connect your API through MCP or OpenAPI, as the signed-in user.

Going to production

Key storage, costs, versions, cleanup, and a minimal tool surface.
The Northstar support example runs this whole path with a product MCP server.