Skip to content

Build AI agents into your SaaS.

Your customers stay in your app. Your agent calls your functions. OpenLegion runs the agent, isolates each customer’s workspace and returns a receipt when work is done.

Anyone can read the quickstart. Running it requires access to a hosted test project. Join the Platform waitlist

Give the integration to your coding agent.

Run the setup command in your project folder, or give the prompt below to your coding assistant with the project open. You authorize the hosted test project.

npx openlegion setup
Read https://platform.openlegion.ai/llms.txt and https://platform.openlegion.ai/docs/quickstart. Inspect this project and integrate OpenLegion in test mode. Use the documented SDK for a compatible app or the HTTP API for another backend. Map each signed-in customer to their own workspace, expose one read-only tool, and verify a customer-scoped call. Ask me when hosted access or credentials are needed.
https://platform.openlegion.ai/docs/add-to-your-app
Documentation index for agents

What you build

  1. openlegion/session.ts

    Connect your app’s sign-in to one isolated workspace per customer.

    currentSession()
  2. openlegion/tools.ts

    Expose a function as a tool. The signed request tells your handler which customer it serves.

    ctx.external_ref
  3. app/agent/page.tsx

    Render agent chat in your product and use receipts or signed webhooks to follow the work.

    <AgentChat />

Move from a test project to production.

Already have a hosted test project? Once your connector, webhook, template, spending limit and test run pass the checks, an owner or admin can request review under Go live in the Platform console.