Skip to content

Commit 55a4366

Browse files
committed
Add bundled chat UI documentation to README
1 parent 87b36ef commit 55a4366

1 file changed

Lines changed: 30 additions & 3 deletions

File tree

integrations/appkit-agent/README.md

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,15 +48,15 @@ const app = await createApp({
4848
});
4949
```
5050

51-
### Agent + Chat
51+
### Agent + Chat with bundled UI
5252

5353
```typescript
5454
import { createApp, server } from "@databricks/appkit";
5555
import { agent, chat } from "@databricks/appkit-agent";
5656

5757
await createApp({
5858
plugins: [
59-
server({ autoStart: true }),
59+
server({ autoStart: true, staticPath: chat.staticAssetsPath }),
6060
agent({
6161
model: "databricks-claude-sonnet-4-5",
6262
systemPrompt: "You are a helpful assistant.",
@@ -68,7 +68,7 @@ await createApp({
6868
});
6969
```
7070

71-
The agent plugin registers `POST /api/agent` (OpenAI Responses API format with SSE streaming). The chat plugin registers routes under `/api/chat/` for streaming chat, history, feedback, and more.
71+
This starts a server with the agent backend, chat API, and a pre-built chat UI served at `/`. The agent plugin registers `POST /api/agent` (OpenAI Responses API format with SSE streaming). The chat plugin registers routes under `/api/chat/` for streaming chat, history, feedback, and more.
7272

7373
## Environment Variables
7474

@@ -319,6 +319,32 @@ All routes are mounted under `/api/chat/`.
319319
| `DELETE` | `/:id` | required+ACL | Delete a chat |
320320
| `POST` | `/` | required | Main chat handler (streaming) |
321321

322+
## Bundled Chat UI
323+
324+
The package includes a pre-built React chat application in `dist/chat-client/`. It provides a full-featured chat experience with conversation history sidebar, message editing, code syntax highlighting, MCP tool approval, file attachments, reasoning display, and theme toggle.
325+
326+
### Serving the UI
327+
328+
Pass `chat.staticAssetsPath` to the server plugin's `staticPath` option:
329+
330+
```typescript
331+
server({ staticPath: chat.staticAssetsPath })
332+
```
333+
334+
The chat UI communicates with the chat plugin's `/api/chat/` endpoints automatically. No additional configuration is needed.
335+
336+
### UI path customization
337+
338+
By default the chat plugin also mounts the UI at `/chat` via its built-in `mountUI` method. To change or disable this:
339+
340+
```typescript
341+
chat({
342+
backend: "agent",
343+
uiPath: "/my-chat", // mount at a different path
344+
// uiPath: null, // disable built-in mounting entirely
345+
});
346+
```
347+
322348
## API Reference
323349

324350
### Exports
@@ -339,6 +365,7 @@ All routes are mounted under `/api/chat/`.
339365
| --------------------- | ------------------------------------------------------------- |
340366
| `IAgentConfig` | Agent plugin configuration options |
341367
| `ChatConfig` | Chat plugin configuration options |
368+
| `ChatBackend` | Backend target: plugin name, `{ proxy }`, or `{ endpoint }` |
342369
| `ChatSession` | Session object with user info |
343370
| `GetSession` | Custom session resolver function type |
344371
| `AgentInterface` | Contract for custom agent implementations |

0 commit comments

Comments
 (0)