Packages for Bayon AI systems

Shared packages keep Bayon AI websites, chat surfaces, and internal tools aligned around reusable API, design, analytics, auth, offline, and document infrastructure instead of copying product code across apps.

Package selection

These packages are the reusable Bayon AI layer: typed API access, product analytics, offline storage, auth flows, visual primitives, document editing, and assistant contracts.

Package catalog

Every package has a Details action. Separate documentation appears only when a dedicated docs page exists.

Published
v0.1.0

@bayonai/sdk

TypeScript SDK for Bayon AI Firebase API routes and product integrations.

NPM
Published
v1.0.0

@bayonai/rich-text-editor

Reusable rich-text editing, rendering, document utilities, and unsaved-change session controls.

DocsNPM
Published
v0.1.0

@bayonai/offline

Reusable offline read-cache and pending-write primitives for Bayon AI apps.

NPM
Published
v0.1.2

@bayonai/analytics

Shared Bayon AI analytics and Next.js log-export adapter with PostHog provider support.

NPM
Published
v0.1.0

@bayonai/firebase-auth

Reusable Firebase authentication actions, React provider, MUI login surfaces, and email Functions.

NPM
Internal
v0.1.0

@bayonai/website-agent

Shared public and internal Bayon AI agent contracts for website chat and operator workflows.

Published
v1.0.0

@bayonai/mui-design

Shared Bayon AI Material UI theme, tokens, page recipes, and reusable React surfaces.

NPM

@bayonai/sdk

TypeScript SDK for Bayon AI Firebase API routes and product integrations.

Use this package when a Bayon AI product, integration, or automation needs typed access to the shared Firebase API surface without copying request helpers across apps.

  • Typed client surface for Bayon AI API route groups
  • ESM and CommonJS package outputs for browser, Node, and Functions consumers
  • Shared request contracts for conversations, agents, users, feedback, subscriptions, and admin workflows

Package

@bayonai/sdk

Current version: v0.1.0

Source: npm:@bayonai/sdk

Boundaries

  • Does not host or deploy the Firebase API.
  • Does not own product authentication state.
  • Does not replace app-level validation or user-facing error handling.
  • Does not decide which API routes are exposed to public clients.

Install

npm install @bayonai/sdk

Verification or workspace command:

npm view @bayonai/sdk version

Usage

import { createBayonAiClient } from '@bayonai/sdk';

const bayonai = createBayonAiClient({
  baseUrl: 'https://api-q2ifyofooa-uc.a.run.app/api',
  apiKey: process.env.BAYONAI_API_KEY,
});

const response = await bayonai.conversations.send({
  personaId: 'journalapp',
  messages: [{ role: 'user', content: 'Hello' }],
});

Integration checklist

  1. Install the SDK in the app or server package that talks to the Bayon AI API.
  2. Configure the client from environment-owned API settings rather than hard-coded endpoints.
  3. Call typed route helpers from service modules, not directly from UI components.
  4. Keep API credentials server-side unless the route is explicitly safe for browser use.

Public contract

Consume the selected package contract directly instead of copying configuration into app components.

API clients are configured by the consuming app with its own base URL and credentials

Route helpers keep request and response contracts centralized

Consumers own auth policy, retries, telemetry, and product-specific error presentation

Package releases should track API surface changes before downstream apps upgrade

Building a Bayon AI app surface?

Start with the shared package boundary that matches the product surface, then keep app-specific routing, auth policy, storage, and user-facing workflows in the consuming app.

Talk to Bayon AI