diff --git a/apps/website/content/docs/chat/api/provide-chat.mdx b/apps/website/content/docs/chat/api/provide-chat.mdx index 472c949c0..ade895a7f 100644 --- a/apps/website/content/docs/chat/api/provide-chat.mdx +++ b/apps/website/content/docs/chat/api/provide-chat.mdx @@ -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), }); } diff --git a/apps/website/content/docs/chat/components/chat-debug.mdx b/apps/website/content/docs/chat/components/chat-debug.mdx index cbe01b4ab..5fd48b7f2 100644 --- a/apps/website/content/docs/chat/components/chat-debug.mdx +++ b/apps/website/content/docs/chat/components/chat-debug.mdx @@ -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), }); diff --git a/apps/website/content/docs/chat/components/chat-input.mdx b/apps/website/content/docs/chat/components/chat-input.mdx index 11db06dd3..a46578ad5 100644 --- a/apps/website/content/docs/chat/components/chat-input.mdx +++ b/apps/website/content/docs/chat/components/chat-input.mdx @@ -162,7 +162,7 @@ import { ChatInputComponent } from '@threadplane/chat'; }) export class InputDemoComponent { chatRef = agent({ - assistantId: 'chat_agent', + assistantId: 'chat', threadId: signal(null), }); diff --git a/apps/website/content/docs/chat/components/chat-popup.mdx b/apps/website/content/docs/chat/components/chat-popup.mdx index f38af9049..79fd81d87 100644 --- a/apps/website/content/docs/chat/components/chat-popup.mdx +++ b/apps/website/content/docs/chat/components/chat-popup.mdx @@ -35,7 +35,7 @@ import { ChatPopupComponent } from '@threadplane/chat'; }) export class AppComponent { protected readonly chatAgent = agent({ - assistantId: 'chat_agent', + assistantId: 'chat', threadId: signal(null), }); } @@ -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) }); } ``` diff --git a/apps/website/content/docs/chat/components/chat-sidebar.mdx b/apps/website/content/docs/chat/components/chat-sidebar.mdx index 404a58bbd..1e067955d 100644 --- a/apps/website/content/docs/chat/components/chat-sidebar.mdx +++ b/apps/website/content/docs/chat/components/chat-sidebar.mdx @@ -39,7 +39,7 @@ import { ChatSidebarComponent } from '@threadplane/chat'; }) export class AppShellComponent { protected readonly chatAgent = agent({ - assistantId: 'chat_agent', + assistantId: 'chat', threadId: signal(null), }); } @@ -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) }); } ``` diff --git a/apps/website/content/docs/chat/components/chat-trace.mdx b/apps/website/content/docs/chat/components/chat-trace.mdx index 69375854c..104e1631e 100644 --- a/apps/website/content/docs/chat/components/chat-trace.mdx +++ b/apps/website/content/docs/chat/components/chat-trace.mdx @@ -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), }); } diff --git a/apps/website/content/docs/chat/components/chat.mdx b/apps/website/content/docs/chat/components/chat.mdx index 0d74d128e..d229b6ad2 100644 --- a/apps/website/content/docs/chat/components/chat.mdx +++ b/apps/website/content/docs/chat/components/chat.mdx @@ -40,7 +40,7 @@ export const appConfig: ApplicationConfig = { providers: [ provideAgent({ apiUrl: 'http://localhost:2024', - assistantId: 'chat_agent', + assistantId: 'chat', threadId: signal(null), }), ], diff --git a/apps/website/content/docs/chat/getting-started/installation.mdx b/apps/website/content/docs/chat/getting-started/installation.mdx index 1824768fd..473d24903 100644 --- a/apps/website/content/docs/chat/getting-started/installation.mdx +++ b/apps/website/content/docs/chat/getting-started/installation.mdx @@ -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 }), ], diff --git a/apps/website/content/docs/chat/getting-started/quickstart.mdx b/apps/website/content/docs/chat/getting-started/quickstart.mdx index c206e2ec0..d8ee6d3bd 100644 --- a/apps/website/content/docs/chat/getting-started/quickstart.mdx +++ b/apps/website/content/docs/chat/getting-started/quickstart.mdx @@ -50,7 +50,7 @@ import { ChatComponent } from '@threadplane/chat'; }) export class ChatPageComponent { protected readonly chatAgent = agent({ - assistantId: 'chat_agent', + assistantId: 'chat', threadId: signal(null), }); } diff --git a/apps/website/content/docs/chat/guides/layout-modes.mdx b/apps/website/content/docs/chat/guides/layout-modes.mdx index 593a61322..d83596c34 100644 --- a/apps/website/content/docs/chat/guides/layout-modes.mdx +++ b/apps/website/content/docs/chat/guides/layout-modes.mdx @@ -35,7 +35,7 @@ import { ChatComponent } from '@threadplane/chat'; }) export class ChatPageComponent { protected readonly chatAgent = agent({ - assistantId: 'chat_agent', + assistantId: 'chat', threadId: signal(null), }); } diff --git a/apps/website/content/docs/langgraph/concepts/langgraph-basics.mdx b/apps/website/content/docs/langgraph/concepts/langgraph-basics.mdx index 8dcc708fd..325a17c4f 100644 --- a/apps/website/content/docs/langgraph/concepts/langgraph-basics.mdx +++ b/apps/website/content/docs/langgraph/concepts/langgraph-basics.mdx @@ -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), }); diff --git a/apps/website/content/docs/langgraph/concepts/state-management.mdx b/apps/website/content/docs/langgraph/concepts/state-management.mdx index 66b4ef417..a71fdf751 100644 --- a/apps/website/content/docs/langgraph/concepts/state-management.mdx +++ b/apps/website/content/docs/langgraph/concepts/state-management.mdx @@ -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']), diff --git a/apps/website/content/docs/langgraph/getting-started/installation.mdx b/apps/website/content/docs/langgraph/getting-started/installation.mdx index 6a32acace..07faf653f 100644 --- a/apps/website/content/docs/langgraph/getting-started/installation.mdx +++ b/apps/website/content/docs/langgraph/getting-started/installation.mdx @@ -50,7 +50,7 @@ export const appConfig: ApplicationConfig = { providers: [ provideAgent({ apiUrl: environment.langgraphUrl, - assistantId: 'chat_agent', + assistantId: 'chat', }), ], }; diff --git a/apps/website/content/docs/langgraph/getting-started/quickstart.mdx b/apps/website/content/docs/langgraph/getting-started/quickstart.mdx index 7d89624f4..3f14a23cc 100644 --- a/apps/website/content/docs/langgraph/getting-started/quickstart.mdx +++ b/apps/website/content/docs/langgraph/getting-started/quickstart.mdx @@ -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), }), diff --git a/apps/website/content/docs/langgraph/guides/deployment.mdx b/apps/website/content/docs/langgraph/guides/deployment.mdx index 463c0adcd..0fefcbc45 100644 --- a/apps/website/content/docs/langgraph/guides/deployment.mdx +++ b/apps/website/content/docs/langgraph/guides/deployment.mdx @@ -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" } @@ -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": { diff --git a/apps/website/content/docs/langgraph/guides/persistence.mdx b/apps/website/content/docs/langgraph/guides/persistence.mdx index 59de74cbd..12e94bd97 100644 --- a/apps/website/content/docs/langgraph/guides/persistence.mdx +++ b/apps/website/content/docs/langgraph/guides/persistence.mdx @@ -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 @@ -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), }), @@ -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), }); diff --git a/apps/website/content/docs/langgraph/guides/streaming.mdx b/apps/website/content/docs/langgraph/guides/streaming.mdx index cbed02ed3..b5686d73c 100644 --- a/apps/website/content/docs/langgraph/guides/streaming.mdx +++ b/apps/website/content/docs/langgraph/guides/streaming.mdx @@ -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, }); diff --git a/libs/langgraph/src/lib/agent.fn.ts b/libs/langgraph/src/lib/agent.fn.ts index 6cb903de6..499ebc149 100644 --- a/libs/langgraph/src/lib/agent.fn.ts +++ b/libs/langgraph/src/lib/agent.fn.ts @@ -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),