Skip to content
For developers

Give your product an agent. Skip building the platform.

Add one route on your server and one React component. Opengeni runs everything behind them: sessions, sandboxes, your tools and approvals, with every customer kept apart.

Open source under Apache 2.0. Any model. Our cloud or yours.

How it works

Three steps. Then it's in your product.

Install the packages and put a full-access API key from Organization settings in OPENGENI_API_KEY on your server.

bun add @opengeni/sdk @opengeni/react
  1. 1

    Add one route

    Your server checks who is signed in and tells Opengeni the user and tenant. The API key never leaves the server, and each tenant gets its own workspace on first use.

    route.ts
    // app/api/opengeni/[...path]/route.ts
    import { Opengeni } from "@opengeni/sdk/chat";
    import { createSessionProxyRoute } from "@opengeni/sdk/next";
    
    const og = new Opengeni({ apiKey: process.env.OPENGENI_API_KEY! });
    
    export const { GET, POST, PUT, PATCH, DELETE } = createSessionProxyRoute(og, {
      resolve: async (request) => {
        const me = await authenticate(request); // your session check
        if (!me) return new Response("Unauthorized", { status: 401 });
        return { user: me.id, tenant: me.orgId };
      },
    });
  2. 2

    Render the chat

    A complete conversation: streaming replies, tool calls, approvals, questions, attachments and steering. The stylesheet is scoped, needs no Tailwind and takes your brand's colors.

    assistant.tsx
    "use client";
    import { OpenGeniChat } from "@opengeni/react";
    import "@opengeni/react/compiled.css";
    
    export function Assistant() {
      return <OpenGeniChat baseUrl="/api/opengeni" />;
    }
  3. 3

    Give it your tools

    Point it at your MCP server or OpenAPI description. The agent acts as the signed-in user with short-lived tokens, your API still checks every permission, and the tools you name wait for approval.

    route.ts
    createSessionProxyRoute(og, {
      resolve,
      createSession: (input) => ({
        ...input,
        agent: {
          identity: "You are Acme's support assistant.",
          capabilities: { from: "none", webSearch: true },
          renderer: "opengeni",
        },
        sandboxBackend: "none",
      }),
      toolServer: {
        url: "https://app.example.com/api/mcp",
        approvals: { ask: ["update_ticket"] },
      },
    });
Fastest path

Or let your coding agent wire it up.

Paste this into Claude Code, Codex or Cursor in your repository. It reads your auth and data routes, asks what it can't tell, then adds the route, the chat and your tools, with tests for tenant isolation.

Full prompt and guide
Prompt for your coding agent
Add an Opengeni agent to this product.

1. Install the Opengeni integration skill:
     npx skills add Cloudgeni-ai/opengeni --skill opengeni-client --yes
2. Read the skill, then inspect this repository: auth, tenants,
   data routes, frontend, tests.
3. Add one backend route whose resolve returns our signed-in user
   and tenant, and render <OpenGeniChat baseUrl="/api/opengeni" />.
   Give the agent our data through our own authenticated tools.
4. Before building, ask me once about anything the repository
   does not answer.

The API key is in OPENGENI_API_KEY. Keep the key on the server.
Under the hood

What you don't have to build.

Every agent that does real work needs these. They come with the route.

  • Durable sessions

    Every event lands in a Postgres log. Reloads, audits and new clients replay the same history, and work survives worker restarts.

  • Agents that finish

    Give a session a goal with success criteria. It keeps working until it can show the goal is met, or pauses with a reason.

  • Approvals and questions

    A tool approval or a question pauses the exact turn until your user answers, right in the conversation.

  • Background work

    Schedules and inbound webhooks start agents with no user in the loop.

  • Compute when it needs it

    Run a session with no sandbox, in a managed sandbox of its own, or on a machine you enroll.

  • Every customer kept apart

    Each tenant gets its own workspace with its own sessions, files and credentials.

In production

Our own product runs on it.

The Cloudgeni website, marked Powered by Opengeni: One policy. Agents do the rest. Beside it, a compliance remediation workflow that blocked public access to a storage bucket and merged the fix within policy, and below it a row of Cloudgeni agents at work on drift, cost, security and reviews.
Built on Opengeni

Cloudgeni

Our AI-native platform for cloud infrastructure. Its agents fix security findings, bring drifted resources back in line and cut idle spend, and every one of them runs on Opengeni. Large enterprises run it in production.

Where it runs

Our cloud. Or yours.

Opengeni cloud

Sign up, create a key and ship. Pay as you go from credit that never expires, or bring your own model keys with no platform fee.

Self-host

The same platform under Apache 2.0. Run the whole stack locally with one command, or on AWS, Azure or GCP with the reference Terraform and a Helm chart.

Run it locally
git clone https://github.com/Cloudgeni-ai/opengeni.git
cd opengeni && bun run dev
Questions

Good to know.

Do I need Next.js and React?

No. Besides the Next.js route there are adapters for Express and Hono and a handler for any other backend. If you build your own interface, the TypeScript SDK gives you sessions, tools, files and the event stream.

Which models can the agents use?

Any model. Pay as you go from Opengeni credit at the rates shown in the app, or use your own API keys and pay the provider directly. Opengeni currently adds no platform fee on your own keys.

Where does my customers' data live?

In our cloud, or only in yours when you self-host. Either way the agent reaches your product through your own API as the signed-in user, so your permissions still apply.

Something else? Talk to the team

Ship your first agent feature.

Start free, create an API key and add one route.