SDK overview
The four Baseera packages, what each one is for, and which to install in your app.
The Baseera SDK is four small packages that share one version. You install the ones your app needs.
| Package | Runs in | Use it to |
|---|---|---|
@baseera/react | Browser (React 18 or 19) | Wrap your app in BaseeraProvider, register tools, read the chat state. |
@baseera/ui | Browser (React 18 or 19) | Show the ready-made chat surface, approval cards and tool status lines. |
@baseera/node | Your server (Node 20 or later) | Sign user tokens, verify webhooks, push knowledge, guard finish routes, run evals from CI. |
@baseera/core | Anywhere with fetch | Talk to the runtime without React: the client, the chat controller, the protocol types. |
The four packages are not published to npm yet. The first release, 0.1.0, is pending, so every package is still at 0.0.0. Until then you install them from the Baseera repository workspace. See Installation.
Which package do I install
Most apps need three of them.
Browser
Install @baseera/react and @baseera/ui. The UI kit gives you the floating chat surface. @baseera/react already includes @baseera/core, so you do not install it yourself.
Server
Install @baseera/node in the part of your app that runs on a server. It signs the short-lived token that tells Baseera who the user is.
Optional
Install @baseera/core on its own only when you are not using React: a Vue, Svelte or plain script app, a worker, or a script that talks to the runtime.
Which package for which job
| I want to | Package |
|---|---|
| Show a chat assistant in my React app | @baseera/react and @baseera/ui |
| Let the assistant call functions in my app, with approval | @baseera/react (useBaseeraTool) |
| Draw my own chat interface | @baseera/react (useBaseeraChat) |
| Preview an assistant in docs or a settings page | @baseera/ui/static |
| Sign user tokens | @baseera/node |
| Receive webhooks | @baseera/node |
| Keep a knowledge base in step with my data | @baseera/node |
| Use Baseera without React | @baseera/core |
What stays on the server
A browser holds a publishable key (pk_). It identifies your agent and only works from the domains you allow. A secret key (sk_) signs tokens and must never reach the browser, a bundle or a NEXT_PUBLIC_* or VITE_* variable. Only @baseera/node takes a secret key.