Quick Start
Give the trip planner a composer, a transcript, and a visible response while the agent works. The <chat> composition binds these pieces to an agent; your application supplies the backend connection and decides where the conversation belongs.
Angular 20–22 project with an agent provider configured. See Agent Installation if you need help.
Try without a backend renders the same <chat> with a fake agent — no server, no key. The provider steps below assume a running LangGraph server at http://localhost:2024.
Yes. Every Threadplane package is MIT-licensed for commercial and noncommercial use, with no token, activation step, or runtime check.
npm install @threadplane/chat @threadplane/langgraph @langchain/core @langchain/langgraph-sdk marked@threadplane/langgraph provides the adapter used by the provider snippet below. The LangChain packages are required peers for that adapter, and marked is the markdown renderer used for assistant messages.
// app.config.ts
import { ApplicationConfig, signal } from '@angular/core';
import { provideAgent } from '@threadplane/langgraph';
export const appConfig: ApplicationConfig = {
providers: [
provideAgent({
assistantId: 'chat',
apiUrl: 'http://localhost:2024',
threadId: signal(null),
}),
],
};provideAgent() is the only provider <chat> requires. There is no separate chat provider: everything <chat> renders is driven by its inputs.
// chat-page.component.ts
import { Component, ChangeDetectionStrategy } from '@angular/core';
import { injectAgent } from '@threadplane/langgraph';
import { ChatComponent } from '@threadplane/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 = injectAgent();
}injectAgent() returns the singleton wired up in Step 2 — no extra provider needed here. To host several <chat> surfaces that share a backend URL but target different graphs, re-provide provideAgent({...}) in a component's providers: [] array; Angular's hierarchical DI scopes that override to the subtree.
That is it — no Tailwind setup, no PostCSS config, no global stylesheet import. The chat ships with its own design tokens and component-scoped styles.
What happens when you send
Ask “Plan a weekend in Portland.” The composition submits the message through the injected agent, renders the messages signal as the answer arrives, and reflects loading or failure in the controls. The composer draft remains UI state; the accepted message becomes conversation state.
No model runs because the component renders. A new run starts when you submit an intention. Follow a conversation traces the same path through tools, generated UI, and saved history.
Run with no backend
No LangGraph server yet? Bind <chat> to mockAgent() from @threadplane/chat. It implements the same Agent contract with canned messages, so the UI renders exactly as it will against a real agent — only the responses are static.
// chat-page.component.ts
import { ChangeDetectionStrategy, Component } from '@angular/core';
import { ChatComponent, mockAgent, staticDelivery } from '@threadplane/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 = mockAgent({
messages: [
{ id: 'm1', role: 'user', content: 'Hello', delivery: staticDelivery('m1') },
{
id: 'm2',
role: 'assistant',
content: 'Hi there — I am a mock agent.',
delivery: staticDelivery('m2'),
},
],
});
}With mockAgent() you can drop the provideAgent() call — the agent is constructed directly in the component, no DI wiring or apiUrl required. Swap it for injectAgent() once your backend is up.
What's Next
Embedded, popup, or sidebar.
Customize colors, fonts, and shapes.
Full primitive and composition reference.
Swap the mock for a real adapter, review the production checklist, and deploy your backend — see Installation and Agent deployment.