DocsChatGetting StartedQuick Start

Quick Start

Build a streaming chat UI with @ngaf/chat in 5 minutes.

Prerequisites

Angular 20+ project with an agent provider configured. See Agent Installation if you need help.

1
Install the package
npm install @ngaf/chat marked

marked is the markdown renderer used for assistant messages.

2
Configure providers
// app.config.ts
import { ApplicationConfig } from '@angular/core';
import { provideAgent } from '@ngaf/langgraph';
import { provideChat } from '@ngaf/chat';
 
export const appConfig: ApplicationConfig = {
  providers: [
    provideAgent({ apiUrl: 'http://localhost:2024' }),
    provideChat({ assistantName: 'Assistant' }),
  ],
};
3
Render the chat
// chat-page.component.ts
import { Component, ChangeDetectionStrategy, signal } from '@angular/core';
import { agent } from '@ngaf/langgraph';
import { ChatComponent } from '@ngaf/chat';
 
@Component({
  selector: 'app-chat-page',
  standalone: true,
  imports: [ChatComponent],
  changeDetection: ChangeDetectionStrategy.OnPush,
  template: `<div style="height: 100vh"><chat [agent]="chatAgent" /></div>`,
})
export class ChatPageComponent {
  protected readonly chatAgent = agent({
    assistantId: 'chat_agent',
    threadId: signal(null),
  });
}

That's it — no Tailwind setup, no PostCSS config, no global stylesheet import. The chat ships with its own design tokens and component-scoped styles.

What's Next