GET STARTED

OPEN SOURCE · SELF-HOSTED OR MANAGED

ADD AN AGENT
TO YOUR APP
IN MINUTES

Embed a Cursor-style agentic chat sidebar in your app. It answers questions, takes actions, displays your UI widgets, and works with users' files.

GET STARTED

BUILD IT WITH YOUR CODING AGENT

  1. Open your app’s repository in Cursor, Claude Code, Codex, or another coding agent.
  2. Copy and paste the prompt below to start the integration.
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 and create an organization API key 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 agent chat in your app. You get robust message streaming, file uploads, and style customization.

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 code.

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
  • E2B
  • Vercel Sandbox
  • Sprites

IDENTITY & BILLING

Your session is the source of truth. Set per-customer token and spend limits.

  • 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. Choose where conversations and files are stored.

CLOUD

Let us run it for you: a managed backend for the agentic loop, conversation history, and files.

MODULAR

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

OPEN PROTOCOLS

Built on open protocols: AG-UI and MCP.

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

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.

FAQ

FREQUENTLY ASKED QUESTIONS

What is AstralBeam?

AstralBeam is an open-source platform for adding an AI agent to your app. It provides an embeddable chat UI and an agent backend so users can ask questions, use your app's tools, and work with files. You can use AstralBeam Cloud or self-host it.

Who is AstralBeam for?

AstralBeam is for developers and product teams building SaaS and multi-tenant apps who want to add an AI assistant to their product. You connect the agent to your app's data and actions while keeping your existing authentication and permission checks.

Why choose AstralBeam instead of building an agent myself?

You have to patch together a lot of tools. It's error-prone, and you might end up building something sub-optimal or something that blows up your LLM bills. It's a moving target: models are changing, protocols are evolving, and best practices are changing. Developers should be able to focus on their product rather than keeping up with all this. That's why we made AstralBeam open source. We encourage you to try self-hosting it before building your own.

How do I get started?

AstralBeam provides the chat UI and agent backend, including conversation history and file handling. You add a server endpoint to identify your users, define the tools that connect to your app, and keep your business logic and permission checks. See the quickstart.

Will it work with our existing authentication and permissions?

Yes. Your server uses your existing session to identify the user and customer account, then issues a short-lived chat token. Your API key stays on the server. Actions go through your app's own authorization checks. Read the security model.

Does it work outside React?

Yes. Use the React component, mount the widget with JavaScript in another framework, or load it with a script tag in a server-rendered app. Your token endpoint can be written in any language with a JWT library. See the script-tag integration.

Can I customize the chat UI?

Customize the widget's colors, typography, copy, and components, and render your own widgets inside replies. For full control, use the headless SDK to build your own chat interface on the same authentication, transport, and conversation state.

Can I use my own models and provider keys?

Yes. Bring your own keys for OpenAI, Anthropic, Google Gemini, xAI, or OpenRouter, then choose the models each agent can use. Model providers bill you directly. See model configuration.

Can the agent analyze files and create downloadable reports?

Yes. Users can upload supported documents, images, and data files. Connect a sandbox provider to let the agent run code, analyze spreadsheets, and publish charts or reports. Published files remain available from the conversation after the sandbox shuts down. See sandboxes and artifacts.

Can I set usage limits for each customer?

Yes. Set token or model-spend allowances per customer, user, or conversation, with fixed or rolling reset windows. Apply different allowances based on the plans in your app. Usage controls are available today. Stripe billing integration is in progress. See usage limits.

Can I self-host AstralBeam?

Yes. Use AstralBeam Cloud, have us manage it on your infrastructure, or operate it yourself. The platform is open source under AGPL-3.0, and the SDK is MIT licensed. Self-hosting has no AstralBeam platform or storage fees. You cover your infrastructure and providers. Read the self-hosting guide.

What will I pay for?

Cloud pricing includes a usage-based platform fee and conversation and file storage. Model and sandbox providers bill you directly. Monthly free credits cover AstralBeam fees only. See pricing for the rates and hosting options.

READY FOR LAUNCH

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