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.
@hashbrownai/angular gives you Hashbrown's resources and components for Angular: chat and UI chat resources, tools, UI kits, and message rendering.
Getting Started
npm install @hashbrownai/{core,angular,openai}
Point Hashbrown at your server:
export const appConfig: ApplicationConfig = {
providers: [provideHashbrown({ baseUrl: '/run' })],
};
Expose your components and give the model tools. The model only renders components you register, and Skillet validates their inputs. Tools run in the browser, with your app's state and services.
chat = uiChatResource({
system: 'Help users understand the air traffic on the map.',
components: [
exposeComponent(FlightCard, {
description: 'Show one aircraft',
input: { hex: s.string('Aircraft hex code') },
}),
],
tools: [
createTool({
name: 'getAircraft',
description: 'List the aircraft on the map',
handler: () => inject(AircraftApi).list(),
}),
],
});
Render the stream. Components render while the response streams in.
@for (message of chat.value(); track $index) {
<hb-render-message [message]="message" />
}
Docs
Read the Angular quick start and the Angular docs.
Connect a Model
Your server keeps the API key and streams from a Hashbrown adapter:
- OpenAI:
@hashbrownai/openai - Anthropic:
@hashbrownai/anthropic - Google Gemini:
@hashbrownai/google - Amazon Bedrock:
@hashbrownai/bedrock - Azure OpenAI:
@hashbrownai/azure - Ollama:
@hashbrownai/ollama - Your own backend
Need a Complete Chat UI?
Hashbrown is headless. threadplane is the full agent UI for React and Angular, built on Hashbrown: threads, approvals, and tool progress. Free and MIT, with enterprise support from the team behind Hashbrown.
Stuck? Ask Brian at https://hashbrown.dev/unstuck.