@opengeni packages on the same version.
1
Get an API key
Sign up at app.opengeni.ai. In Organization settings → Developer → API keys, create a full-access key and put it in your server environment:Self-hosting? Also pass
baseUrl to new Opengeni(...) below.2
Add the backend route
resolve maps your signed-in user to Opengeni. Workspaces and memberships are created on first use, so there is no onboarding step. See Users & tenants for the three shapes.When the user sends their first message in a new chat, the proxy calls your backend’s createSession hook and creates the session as that user. The hook chooses the agent, tools, and model; see Choose what your agent can do below.Not on Next.js? Use the Express or Hono adapter, or createSessionProxyHandler from @opengeni/sdk/session-proxy (see Proxy from any backend).3
Render the conversation
OpenGeniChat shows the user’s chats and the open conversation. For one chat tied to a record, render <SessionConversation baseUrl="/api/opengeni" sessionId={id} />. The stylesheet is scoped and needs no Tailwind. See Conversation UI & theming.Choose what your agent can do
Embedded agents can use Opengeni’s built-in capabilities and your product’s own tools. Configure them on your backend; the conversation component stays the same. For example, replace the route above with this configuration to give a support agent web search and your product’s MCP tools, with approval required before updating a ticket:- Built-in capabilities:
agent.capabilitiesselects features such as web search, Knowledge, artifacts, and subagents.from: "none"starts with essentials such as asking questions and reading Skills; this example adds web search. Your attached product tools remain available. Usefrom: "all"to start with all capabilities, then turn individual ones off. See Configure the agent for the full list and how to update an existing session. - Your product’s tools:
toolServerattaches your MCP endpoint and supplies a signed user token. You implement the endpoint, verify the token, and authorize each action against your product’s data. See Give the agent your data for the matching server example, tool allowlists, per-session MCP servers, and OpenAPI integrations. - Approvals:
approvals.askrequests human approval for the named tools; the embedded conversation displays the approval. Tool selection and approval do not grant access to your data: your API still enforces the user’s permissions. See Approvals & questions for saved permission choices and approval behavior.
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, and cleanup.