DASHBOARDGET STARTED

OPEN SOURCE · SELF-HOSTED OR MANAGED

ADD AN AGENT
TO YOUR APP
IN MINUTES

Give your users a Cursor-style assistant inside your app. It can answer questions, use your app's tools, and work with their 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 AI chat sidebar or screen to this app. Read and follow https://astralbeam.ai/agent-skills/astralbeam/SKILL.md, using this app's existing authentication and layout.

Sign up, connect a model, and create an organization API key. Keep the key in your backend.

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. SDK setup →

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. Connect your login →

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. Add your first tool →

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

Free till Jan 1, 2027. No card needed.

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
Discuss Hosting

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. 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 is AstralBeam different from other tools and services?

AstralBeam gives you an agentic chat sidebar and a managed backend together. We handle the agent loop, conversation history, files, and per-customer usage limits. You hook up tools and UI widgets to connect it to your product.

Tool / serviceWhat it providesWhy choose AstralBeam
CopilotKitChat components and an agent runtime, plus optional cloud services.We run the agent backend and store conversations and files, with usage limits for each customer.
assistant-uiCustomizable chat components, backend integrations, and hosted conversation history.Get the chat UI and agent backend together, with file handling and per-customer usage limits included.
OpenAI ChatKitEmbeddable chat UI. Its recommended path for new apps connects to your own agent backend.Use our managed backend or self-host the same open-source platform, with your choice of model providers.
MastraA TypeScript framework for building agents and workflows.Start with a working chat sidebar and managed backend, then add your app's tools and UI widgets.
ElevenAgentsAgents for voice and multimodal conversations, with web widgets, phone integrations, and model choice.We focus on agentic chat inside your web app, with tools, UI widgets, files, and per-customer usage limits.

Try the quickstart, or self-host the same open-source platform.

How do I get started?
Connect a model provider in the dashboard, create an API key, and follow the quickstart to add chat to your app. Then add a tool that reads or updates data in your app.
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. AstralBeam fees are free until January 1, 2027. See pricing for the rates and hosting options.

READY FOR LAUNCH

Start with a working chat. Add your app's tools when you're ready.