Installation
Install the Baseera packages, their peer dependencies, and the stylesheet.
Browser packages
pnpm add @baseera/react @baseera/ui @baseera/core lucide-react zodThen import the stylesheet once, near the root of your app:
import "@baseera/ui/baseera.css";Server package
pnpm add @baseera/node@baseera/node has no peer dependencies. It also installs the baseera command, which runs an agent's eval suites from CI.
Peer dependencies
| Package | Peer dependencies |
|---|---|
@baseera/core | None. |
@baseera/react | react 18 or later, zod 4 (^4.0.0). It depends on @baseera/core directly. |
@baseera/ui | react 18 or later, react-dom 18 or later, lucide-react, @baseera/core. @baseera/react is optional: you need it only for the connected components in @baseera/ui/connected. |
@baseera/node | None. |
Zod 4 is required by useBaseeraTool, which turns a z.object(...) schema into the JSON Schema the model sees.
Supported versions
| Runtime | Supported |
|---|---|
| React | 18 and 19 |
| Next.js | App Router. The demo app runs on Next.js 15. |
| Vite | Any version that serves a React app. |
| Node (server) | 20 or later for @baseera/node and @baseera/core. |
| Node (build tooling) | 18 or later for @baseera/react and @baseera/ui. |
@baseera/core also runs in browsers, workers and edge runtimes that have fetch.
Entry points
| Import | What you get |
|---|---|
@baseera/ui | Props-only components: Baseera, ApprovalCard, ToolStatus, ChatTranscript, label helpers. |
@baseera/ui/connected | Components wired to @baseera/react: BaseeraSurface, BaseeraApprovals, BaseeraToolActivity, BaseeraField, BaseeraKnowledgeUpload. |
@baseera/ui/static | BaseeraStaticChat and the static review pieces. No provider, no network. |
@baseera/ui/baseera.css | The stylesheet. @baseera/ui/styles.css is the same file. |
Every built file in @baseera/react and @baseera/ui starts with "use client", so you can import them from a client component in the Next.js App Router.
Environment variables
You need three values from the Baseera console, plus the URL of your runtime:
| Value | Where it lives |
|---|---|
Publishable key (pk_ and 48 hex characters) | The browser. A NEXT_PUBLIC_ or VITE_ variable is fine. |
Secret key (sk_ and 64 hex characters) | Your server only. A normal environment variable. |
| Agent id (a uuid) | Your server, for verifyFinish, knowledge and the CLI. |
| Runtime URL | Both. baseUrl is required until a hosted runtime exists. |