GET STARTED

OPEN SOURCE · SELF-HOSTED OR MANAGED

ADD AN AGENT
TO YOUR APP
IN MINUTES

Embed a Cursor-style agent in your product. It answers questions, takes action in your app, renders your UI components, and works with users' files.

GET STARTED

BUILD IT WITH YOUR CODING AGENT

  1. Copy the prompt below.
  2. Open a coding agent (Cursor, Claude Code, Codex, etc.) in your app’s code repository.
  3. Paste the prompt. The agent will install the SDK and integrate AstralBeam into your app.
Add an AstralBeam agent sidebar/screen to this app by following https://astralbeam.ai/docs/start/quickstart.md and these steps: install @astralbeam/sdk, add a server endpoint that mints a chat token with createAstralBeamToken for the signed-in user and their tenant, and mount the chat where the sidebar/screen belongs (<AstralBeamChat /> from @astralbeam/sdk/react in React apps, or mountAstralBeamChat from @astralbeam/sdk/client otherwise). Read ASTRALBEAM_API_KEY from the server environment and never expose it to browser code.

Sign up to generate an AstralBeam API key needed to authorize chat requests.

Your browser blocked the clipboard, so the prompt is selected. Copy it with Ctrl+C or ⌘C.

READ QUICKSTART

STEP 01

ADD THE FRONTEND SDK

Install the SDK and mount the agentic chat component in your app. You get robust message streaming, file uploads, and style customization out of the box.

sidebar.tsx
$ npm install @astralbeam/sdk+ added 1 package import { AstralBeamChat } from "@astralbeam/sdk/react" export function Sidebar() {  return (    <AstralBeamChat      title="Acme Assistant"      theme={{        light: { "--primary": "#4f46e5", "--radius": "0.75rem" },        dark: { "--primary": "#818cf8" },      }}    />  )}
  • Cursor-style agentic chat

    Streaming replies, visible tool calls, and follow-up questions. A React component, or a one-line mount anywhere else.

  • Fully customizable

    Your title, copy, color scheme, and design tokens, or swap the header and empty state for your own components.

  • Files and artifacts

    Upload files, work with their contents, and download generated results.

  • Managed backend

    Model calls, tool orchestration, and file handling run on AstralBeam Cloud. No agent backend for you to deploy or scale.

STEP 02

IDENTIFY YOUR USERS

Your server already knows who is signed in. Mint a short-lived token that carries the user and their tenant, and the widget picks it up. API keys never reach the browser.

api/astralbeam/token.ts
import { createAstralBeamToken } from "@astralbeam/sdk/server" export async function POST(request: Request) {  const session = await getSession(request)  const token = await createAstralBeamToken({    apiKey: process.env.ASTRALBEAM_API_KEY,    user: {      id: session.user.id,      name: session.user.name,    },    tenant: {      id: session.org.id,      name: session.org.name,    },  })  return Response.json({ token })}
  • Conversation history

    Every user picks up their own threads, on any device, without you storing a message.

  • Usage limits

    Set token or spend limits per tenant, user, or conversation, with allowances that reset on your schedule.

  • Usage tracking

    See token usage and model spend against each allowance, broken down by tenant, user, or conversation.

  • Tenant isolation

    Keep each tenant's conversations and files separate, with access checked for every user.

STEP 03

CONNECT TOOLS & WIDGETS

Declare what the agent can do and what it can show. Tools run in your page against your own state. Widgets render your components inside the reply.

sidebar.tsx
<AstralBeamChat  tools={{    refundOrder: defineTool({      description: "Refund an order and notify the customer",      parameters: z.object({ orderId: z.string() }),      execute: ({ orderId }) => api.refund(orderId),    }),  }}  widgets={{    orderCard: defineWidget({      description: "Show an order's status and total",      parameters: z.object({ orderId: z.string() }),      render: ({ orderId }) => <OrderCard id={orderId} />,    }),  }}/>
  • Read data and take actions

    Tools use the user's session to read data and act inside your app, behind your permission checks.

  • Interactive widgets

    Render your own components inside the reply, connected to your app's live state.

  • Validation and approvals

    Validate inputs with your schemas and ask users a structured question before taking action.

  • MCP connections

    Connect remote MCP servers and let users authorize the tools their agent can use.

WORKS WITH YOUR STACK

AstralBeam sits between your app and the providers you already pay for. Swap any of them without touching the widget.

LLM PROVIDERS & GATEWAYS

Bring your own keys. Route through a gateway if you already have one.

  • OpenAI
  • Anthropic
  • Google Gemini
  • xAI Grok
  • OpenRouter
  • Vercel AI Gateway

OBSERVABILITY

Every run traced where your team already looks.

  • Langfuse
  • Braintrust
  • LangSmith
  • OpenTelemetry

CODING SANDBOXES

Pick a provider in the dashboard. The agent gets a workspace per conversation.

  • Docker
  • Daytona
  • Vercel Sandbox
  • Sprites

IDENTITY & BILLING

Your session is the source of truth. Usage rolls up into your billing.

  • Any auth provider
  • Stripe

OPEN SOURCE FROM DAY ONE

The AstralBeam platform is open source under AGPL-3.0, built on open standards, and modular by design. Read it, fork it, run it, extend it.

SELF-HOST

Run the whole platform on your own infrastructure. Your data never leaves your orbit.

CLOUD

Let us run it for you: managed infrastructure, zero maintenance, always current.

MODULAR

Start with the entire platform, or adopt it incrementally, piece by piece.

OPEN PROTOCOLS

Built on open protocols: AG-UI, MCP, A2A. Swap pieces in and out instead of adopting a proprietary runtime.

PRICING

PAY FOR WHAT YOU USE

Start on our cloud, let us manage yours, or host it yourself. Bring your own LLM keys wherever you run.

HOSTED BY ASTRALBEAM

Cloud

We run the platform. You build your product.

Platform fee
$0.20 / million tokensSame rate for input and output.
Conversation & file storage
$0.50 / GB / month

$20 in free credits every month

Get Started

YOUR INFRASTRUCTURE, OUR TEAM

Managed hosting

AstralBeam on your infrastructure, managed by us.

Platform fee
$0.20 / million tokensSame rate for input and output.
Conversation & file storage
$0.50 / GB / month
Hosting fee
Custom
Talk to Us

YOUR INFRASTRUCTURE, YOUR TEAM

Self-hosting

Run AstralBeam on your own infrastructure.

Free

Completely free to self-host. No AstralBeam platform or storage fees. You cover your own infrastructure and providers.

Self-hosting Guide

Bring your own LLM keys. Models, sandboxes, and observability are billed directly by providers. Cloud credits cover AstralBeam fees only. All prices in USD.

READY FOR LAUNCH

Get started with a few lines of code, or come talk to us on Discord.