hashbrown

AI chat and agents for your React or Angular app

Hashbrown is a headless TypeScript framework. The model renders your components and calls your tools, in the browser, with any provider.

npm i @hashbrownai/{core,angular,openai}
Quick start →
assistant.component.ts
export const invoiceKit = createUiKit({
  components: [
    exposeComponent(InvoiceCard, {
      description: 'Show one invoice',
      input: { id: s.string('Invoice id') },
    }),
    exposeComponent(AgingChart, { /* … */ }),
  ],
});

chat = uiChatResource({
  system: 'Help users understand invoices.',
  components: [invoiceKit],
});
OpenAI Anthropic Gemini BedrockAzure OllamaLocal models

How it works

The same API in React and Angular.

  1. 1

    Expose your components

    The model only renders components you register. Skillet validates their props.

    exposeComponent(AgingChart, {
      input: { buckets: s.array(…) },
    })
  2. 2

    Give it tools

    Tools run in the browser, with your app's state and services.

    createTool({
      name: 'getInvoices',
      handler: () => api.list(),
    })
  3. 3

    Render the stream

    Components render while the response streams in.

    <hb-render-message [message]="m" />

Features

Generative UI

The model composes your components. Bundle them into UI kits.

Read the docs

Client-side tools

The model calls functions in your app. Connect MCP servers too.

Read the docs

Structured output

Skillet schemas turn model output into typed JSON.

Read the docs

Streaming

Strings, arrays, and objects parse as they arrive. Magic Text streams Markdown.

Read the docs

Any model

OpenAI, Anthropic, Gemini, Bedrock, Azure, Ollama, or a model in the browser.

Read the docs

Code execution

Run model-written JavaScript in a sandbox.

Read the docs

See it in a real app

An invoicing assistant that answers with the app's own tables and charts. The data is simulated.

The invoicing example answering which USD customers are more than 60 days overdue with a ledger table, an aging chart, and a customer card

From the blog

Get started

npm i @hashbrownai/{core,angular,openai}