Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/website/content/docs/chat/api/provide-chat.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ All chat components work without `provideChat()`. They use defaults:
export class SimpleChatComponent {
chatRef = agent({
apiUrl: 'http://localhost:2024',
assistantId: 'chat_agent',
assistantId: 'chat',
threadId: signal(null),
});
}
Expand Down
2 changes: 1 addition & 1 deletion apps/website/content/docs/chat/components/chat-debug.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export class DebugPageComponent {

protected readonly chat = agent({
apiUrl: '/api/langgraph',
assistantId: 'chat_agent',
assistantId: 'chat',
threadId: signal(localStorage.getItem('threadId')),
onThreadId: (id) => localStorage.setItem('threadId', id),
});
Expand Down
2 changes: 1 addition & 1 deletion apps/website/content/docs/chat/components/chat-input.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ import { ChatInputComponent } from '@threadplane/chat';
})
export class InputDemoComponent {
chatRef = agent({
assistantId: 'chat_agent',
assistantId: 'chat',
threadId: signal(null),
});

Expand Down
4 changes: 2 additions & 2 deletions apps/website/content/docs/chat/components/chat-popup.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import { ChatPopupComponent } from '@threadplane/chat';
})
export class AppComponent {
protected readonly chatAgent = agent({
assistantId: 'chat_agent',
assistantId: 'chat',
threadId: signal(null),
});
}
Expand Down Expand Up @@ -87,7 +87,7 @@ Control the open state from your component:
})
export class AppComponent {
chatOpen = false;
chatAgent = agent({ assistantId: 'chat_agent', threadId: signal(null) });
chatAgent = agent({ assistantId: 'chat', threadId: signal(null) });
}
```

Expand Down
4 changes: 2 additions & 2 deletions apps/website/content/docs/chat/components/chat-sidebar.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ import { ChatSidebarComponent } from '@threadplane/chat';
})
export class AppShellComponent {
protected readonly chatAgent = agent({
assistantId: 'chat_agent',
assistantId: 'chat',
threadId: signal(null),
});
}
Expand Down Expand Up @@ -110,7 +110,7 @@ In push-content mode, `ChatSidebarComponent` uses `display: flex` on its host. T
})
export class AppShellComponent {
sidebarOpen = signal(false);
chatAgent = agent({ assistantId: 'chat_agent', threadId: signal(null) });
chatAgent = agent({ assistantId: 'chat', threadId: signal(null) });
}
```

Expand Down
2 changes: 1 addition & 1 deletion apps/website/content/docs/chat/components/chat-trace.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ import { ChatTraceComponent, ChatMessageListComponent } from '@threadplane/chat'
})
export class TracedChatComponent {
protected readonly chatAgent = agent({
assistantId: 'chat_agent',
assistantId: 'chat',
threadId: signal(null),
});
}
Expand Down
2 changes: 1 addition & 1 deletion apps/website/content/docs/chat/components/chat.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export const appConfig: ApplicationConfig = {
providers: [
provideAgent({
apiUrl: 'http://localhost:2024',
assistantId: 'chat_agent',
assistantId: 'chat',
threadId: signal(null),
}),
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ import { provideAgent } from '@threadplane/langgraph';
export const appConfig: ApplicationConfig = {
providers: [
provideAgent({
assistantId: 'chat_agent', // The graph/agent ID exposed by your backend
assistantId: 'chat', // The graph/agent ID exposed by your backend
threadId: signal(null), // null = new thread on first send
}),
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ import { ChatComponent } from '@threadplane/chat';
})
export class ChatPageComponent {
protected readonly chatAgent = agent({
assistantId: 'chat_agent',
assistantId: 'chat',
threadId: signal(null),
});
}
Expand Down
2 changes: 1 addition & 1 deletion apps/website/content/docs/chat/guides/layout-modes.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import { ChatComponent } from '@threadplane/chat';
})
export class ChatPageComponent {
protected readonly chatAgent = agent({
assistantId: 'chat_agent',
assistantId: 'chat',
threadId: signal(null),
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ result = graph.invoke(
// app.config.ts
provideAgent({
apiUrl: '...',
assistantId: 'chat_agent',
assistantId: 'chat',
threadId: signal(localStorage.getItem('threadId')),
onThreadId: (id) => localStorage.setItem('threadId', id),
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ Thread: "user_123_session"
// app.config.ts — configure threadId/onThreadId on the provider
provideAgent({
apiUrl: '...',
assistantId: 'chat_agent',
assistantId: 'chat',

// Same threadId = restored conversation history
threadId: signal(this.route.snapshot.params['threadId']),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export const appConfig: ApplicationConfig = {
providers: [
provideAgent({
apiUrl: environment.langgraphUrl,
assistantId: 'chat_agent',
assistantId: 'chat',
}),
],
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ export const appConfig: ApplicationConfig = {
providers: [
provideAgent({
apiUrl: 'http://localhost:2024',
// 'chat_agent' maps to the key in your langgraph.json "graphs" config
assistantId: 'chat_agent',
// 'chat' maps to the key in your langgraph.json "graphs" config
assistantId: 'chat',
threadId: signal(localStorage.getItem('threadId')),
onThreadId: (id) => localStorage.setItem('threadId', id),
}),
Expand Down
4 changes: 2 additions & 2 deletions apps/website/content/docs/langgraph/guides/deployment.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Your agent code needs a `langgraph.json` manifest at the project root. This file
{
"dependencies": ["."],
"graphs": {
"chat_agent": "./agent/graph.py:graph"
"chat": "./agent/graph.py:graph"
},
"env": ".env"
}
Expand Down Expand Up @@ -164,7 +164,7 @@ In `langgraph.json`, add an `http` section:
{
"dependencies": ["."],
"graphs": {
"chat_agent": "./agent/graph.py:graph"
"chat": "./agent/graph.py:graph"
},
"http": {
"cors": {
Expand Down
6 changes: 3 additions & 3 deletions apps/website/content/docs/langgraph/guides/persistence.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ export const appConfig: ApplicationConfig = {
providers: [
provideAgent({
apiUrl: 'http://localhost:2024',
assistantId: 'chat_agent',
assistantId: 'chat',
// Restore thread from localStorage on app start
threadId: signal(localStorage.getItem('threadId')),
// Persist thread ID whenever a new thread is created
Expand Down Expand Up @@ -195,7 +195,7 @@ export const appConfig: ApplicationConfig = {
providers: [
provideAgent({
apiUrl: 'http://localhost:2024',
assistantId: 'chat_agent',
assistantId: 'chat',
threadId: activeThreadId,
onThreadId: (id) => activeThreadId.set(id),
}),
Expand Down Expand Up @@ -299,7 +299,7 @@ When you pass a Signal as `threadId` to `provideAgent({...})`, `injectAgent()` r
// In app.config.ts:
provideAgent({
apiUrl: '...',
assistantId: 'chat_agent',
assistantId: 'chat',
threadId: activeThreadId, // Signal — switches reactively
onThreadId: (id) => activeThreadId.set(id),
});
Expand Down
2 changes: 1 addition & 1 deletion apps/website/content/docs/langgraph/guides/streaming.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ By default Agent coalesces state-like signal updates every 16 ms. That is close
// app.config.ts
provideAgent({
apiUrl: '...',
assistantId: 'chat_agent',
assistantId: 'chat',
// Batch incoming chunks and flush at most once every 50 ms
throttle: 50,
});
Expand Down
2 changes: 1 addition & 1 deletion libs/langgraph/src/lib/agent.fn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ export function computeMessageCheckpoints(
* // app.config.ts — configure once
* providers: [
* provideAgent({
* assistantId: 'chat_agent',
* assistantId: 'chat',
* apiUrl: 'http://localhost:2024',
* threadId: signal(savedThreadId),
* onThreadId: (id) => localStorage.setItem('threadId', id),
Expand Down
Loading