@alexanderolsen/create-deepagent 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +2 -0
- package/dist/index.js +661 -0
- package/dist/index.js.map +1 -0
- package/package.json +59 -0
- package/registry/frameworks/deno/.env.example +6 -0
- package/registry/frameworks/deno/README.md +137 -0
- package/registry/frameworks/deno/client/index.html +23 -0
- package/registry/frameworks/deno/client/package.json +30 -0
- package/registry/frameworks/deno/client/public/favicon.ico +0 -0
- package/registry/frameworks/deno/client/src/components/Chat.tsx +124 -0
- package/registry/frameworks/deno/client/src/components/ChatApp.tsx +129 -0
- package/registry/frameworks/deno/client/src/components/Conversation.tsx +91 -0
- package/registry/frameworks/deno/client/src/components/MessageBubbles.tsx +88 -0
- package/registry/frameworks/deno/client/src/components/MessageReasoning.tsx +71 -0
- package/registry/frameworks/deno/client/src/components/MessageThread.tsx +135 -0
- package/registry/frameworks/deno/client/src/components/StreamingIndicator.tsx +36 -0
- package/registry/frameworks/deno/client/src/components/Subagents.tsx +120 -0
- package/registry/frameworks/deno/client/src/components/ThemeIcons.tsx +31 -0
- package/registry/frameworks/deno/client/src/components/ThreadHistory.tsx +73 -0
- package/registry/frameworks/deno/client/src/components/ToolCall.tsx +89 -0
- package/registry/frameworks/deno/client/src/lib/agent-type.ts +4 -0
- package/registry/frameworks/deno/client/src/lib/chat/threads-client.ts +51 -0
- package/registry/frameworks/deno/client/src/main.tsx +11 -0
- package/registry/frameworks/deno/client/src/styles/globals.css +714 -0
- package/registry/frameworks/deno/client/src/vite-env.d.ts +1 -0
- package/registry/frameworks/deno/client/tsconfig.app.json +7 -0
- package/registry/frameworks/deno/client/tsconfig.json +24 -0
- package/registry/frameworks/deno/client/tsconfig.node.json +19 -0
- package/registry/frameworks/deno/client/vite.config.ts +24 -0
- package/registry/frameworks/deno/deno.json +16 -0
- package/registry/frameworks/deno/main.ts +23 -0
- package/registry/frameworks/deno/package.json +14 -0
- package/registry/frameworks/deno/server/agent/index.ts +60 -0
- package/registry/frameworks/deno/server/agent/middleware.ts +24 -0
- package/registry/frameworks/deno/server/agent/tools.ts +64 -0
- package/registry/frameworks/deno/server/registry.ts +40 -0
- package/registry/frameworks/deno/server/routes.ts +114 -0
- package/registry/frameworks/deno/server/serialize.ts +30 -0
- package/registry/frameworks/deno/server/session.ts +210 -0
- package/registry/frameworks/deno/server/threads.ts +404 -0
- package/registry/frameworks/deno.ts +17 -0
- package/registry/frameworks/hono/.env.example +6 -0
- package/registry/frameworks/hono/README.md +186 -0
- package/registry/frameworks/hono/index.html +22 -0
- package/registry/frameworks/hono/package.json +42 -0
- package/registry/frameworks/hono/src/components/Chat.tsx +124 -0
- package/registry/frameworks/hono/src/components/ChatApp.tsx +129 -0
- package/registry/frameworks/hono/src/components/Conversation.tsx +90 -0
- package/registry/frameworks/hono/src/components/MessageBubbles.tsx +88 -0
- package/registry/frameworks/hono/src/components/MessageReasoning.tsx +71 -0
- package/registry/frameworks/hono/src/components/MessageThread.tsx +135 -0
- package/registry/frameworks/hono/src/components/StreamingIndicator.tsx +36 -0
- package/registry/frameworks/hono/src/components/Subagents.tsx +120 -0
- package/registry/frameworks/hono/src/components/ThemeIcons.tsx +31 -0
- package/registry/frameworks/hono/src/components/ThreadHistory.tsx +73 -0
- package/registry/frameworks/hono/src/components/ToolCall.tsx +89 -0
- package/registry/frameworks/hono/src/lib/agent/types.ts +4 -0
- package/registry/frameworks/hono/src/lib/chat/threads-client.ts +57 -0
- package/registry/frameworks/hono/src/main.tsx +11 -0
- package/registry/frameworks/hono/src/styles/globals.css +714 -0
- package/registry/frameworks/hono/src/vite-env.d.ts +1 -0
- package/registry/frameworks/hono/tsconfig.app.json +22 -0
- package/registry/frameworks/hono/tsconfig.json +7 -0
- package/registry/frameworks/hono/tsconfig.worker.json +18 -0
- package/registry/frameworks/hono/vite.config.ts +16 -0
- package/registry/frameworks/hono/worker/agent/index.ts +53 -0
- package/registry/frameworks/hono/worker/agent/middleware.ts +20 -0
- package/registry/frameworks/hono/worker/agent/tools.ts +55 -0
- package/registry/frameworks/hono/worker/durable-objects/thread-session.ts +159 -0
- package/registry/frameworks/hono/worker/env.d.ts +17 -0
- package/registry/frameworks/hono/worker/index.ts +140 -0
- package/registry/frameworks/hono/worker/server/registry.ts +39 -0
- package/registry/frameworks/hono/worker/server/runs.ts +82 -0
- package/registry/frameworks/hono/worker/server/serialize.ts +30 -0
- package/registry/frameworks/hono/worker/server/threads.ts +404 -0
- package/registry/frameworks/hono/worker/tsconfig.json +4 -0
- package/registry/frameworks/hono/wrangler.jsonc +28 -0
- package/registry/frameworks/hono.ts +35 -0
- package/registry/frameworks/next/.env.example +6 -0
- package/registry/frameworks/next/README.md +173 -0
- package/registry/frameworks/next/app/api/threads/[threadId]/commands/route.ts +21 -0
- package/registry/frameworks/next/app/api/threads/[threadId]/history/route.ts +35 -0
- package/registry/frameworks/next/app/api/threads/[threadId]/route.ts +13 -0
- package/registry/frameworks/next/app/api/threads/[threadId]/state/route.ts +51 -0
- package/registry/frameworks/next/app/api/threads/[threadId]/stream/route.ts +30 -0
- package/registry/frameworks/next/app/api/threads/route.ts +11 -0
- package/registry/frameworks/next/app/favicon.ico +0 -0
- package/registry/frameworks/next/app/globals.css +712 -0
- package/registry/frameworks/next/app/layout.tsx +34 -0
- package/registry/frameworks/next/app/page.tsx +5 -0
- package/registry/frameworks/next/components/Chat.tsx +124 -0
- package/registry/frameworks/next/components/ChatApp.tsx +129 -0
- package/registry/frameworks/next/components/Conversation.tsx +90 -0
- package/registry/frameworks/next/components/MessageBubbles.tsx +88 -0
- package/registry/frameworks/next/components/MessageReasoning.tsx +71 -0
- package/registry/frameworks/next/components/MessageThread.tsx +135 -0
- package/registry/frameworks/next/components/StreamingIndicator.tsx +36 -0
- package/registry/frameworks/next/components/Subagents.tsx +120 -0
- package/registry/frameworks/next/components/ThemeIcons.tsx +31 -0
- package/registry/frameworks/next/components/ThreadHistory.tsx +73 -0
- package/registry/frameworks/next/components/ToolCall.tsx +89 -0
- package/registry/frameworks/next/eslint.config.mjs +18 -0
- package/registry/frameworks/next/lib/agent/index.ts +95 -0
- package/registry/frameworks/next/lib/agent/middleware.ts +40 -0
- package/registry/frameworks/next/lib/agent/tools.ts +66 -0
- package/registry/frameworks/next/lib/chat/threads-client.ts +57 -0
- package/registry/frameworks/next/lib/server/registry.ts +57 -0
- package/registry/frameworks/next/lib/server/serialize.ts +32 -0
- package/registry/frameworks/next/lib/server/session.ts +212 -0
- package/registry/frameworks/next/lib/server/threads.ts +406 -0
- package/registry/frameworks/next/next.config.ts +7 -0
- package/registry/frameworks/next/package.json +37 -0
- package/registry/frameworks/next/postcss.config.mjs +7 -0
- package/registry/frameworks/next/public/file.svg +1 -0
- package/registry/frameworks/next/public/globe.svg +1 -0
- package/registry/frameworks/next/public/next.svg +1 -0
- package/registry/frameworks/next/public/vercel.svg +1 -0
- package/registry/frameworks/next/public/window.svg +1 -0
- package/registry/frameworks/next/tsconfig.json +34 -0
- package/registry/frameworks/next.ts +17 -0
- package/registry/frameworks/nuxt/.env.example +3 -0
- package/registry/frameworks/nuxt/README.md +133 -0
- package/registry/frameworks/nuxt/app/app.vue +26 -0
- package/registry/frameworks/nuxt/app/assets/css/main.css +707 -0
- package/registry/frameworks/nuxt/app/components/Chat.vue +105 -0
- package/registry/frameworks/nuxt/app/components/ChatApp.vue +89 -0
- package/registry/frameworks/nuxt/app/components/ChatThread.vue +27 -0
- package/registry/frameworks/nuxt/app/components/MessageBubble.vue +60 -0
- package/registry/frameworks/nuxt/app/components/MessageBubbles.vue +213 -0
- package/registry/frameworks/nuxt/app/components/MessageList.vue +51 -0
- package/registry/frameworks/nuxt/app/components/MessageReasoning.vue +53 -0
- package/registry/frameworks/nuxt/app/components/StreamingIndicator.vue +9 -0
- package/registry/frameworks/nuxt/app/components/SubagentDetail.vue +51 -0
- package/registry/frameworks/nuxt/app/components/SubagentList.vue +49 -0
- package/registry/frameworks/nuxt/app/components/ThemeToggle.vue +43 -0
- package/registry/frameworks/nuxt/app/components/ThreadHistory.vue +65 -0
- package/registry/frameworks/nuxt/app/components/ToolCall.vue +81 -0
- package/registry/frameworks/nuxt/app/components/TypingDots.vue +14 -0
- package/registry/frameworks/nuxt/app/composables/useTheme.ts +14 -0
- package/registry/frameworks/nuxt/app/utils/streaming.ts +44 -0
- package/registry/frameworks/nuxt/app/utils/threads.ts +57 -0
- package/registry/frameworks/nuxt/nuxt.config.ts +6 -0
- package/registry/frameworks/nuxt/package.json +28 -0
- package/registry/frameworks/nuxt/public/favicon.ico +0 -0
- package/registry/frameworks/nuxt/public/robots.txt +2 -0
- package/registry/frameworks/nuxt/server/agent/index.ts +89 -0
- package/registry/frameworks/nuxt/server/agent/middleware.ts +38 -0
- package/registry/frameworks/nuxt/server/agent/tools.ts +66 -0
- package/registry/frameworks/nuxt/server/api/threads/[threadId]/commands.post.ts +16 -0
- package/registry/frameworks/nuxt/server/api/threads/[threadId]/history.post.ts +37 -0
- package/registry/frameworks/nuxt/server/api/threads/[threadId]/index.delete.ts +12 -0
- package/registry/frameworks/nuxt/server/api/threads/[threadId]/state.get.ts +22 -0
- package/registry/frameworks/nuxt/server/api/threads/[threadId]/state.post.ts +32 -0
- package/registry/frameworks/nuxt/server/api/threads/[threadId]/stream.post.ts +24 -0
- package/registry/frameworks/nuxt/server/api/threads/index.get.ts +13 -0
- package/registry/frameworks/nuxt/server/utils/runtime.ts +42 -0
- package/registry/frameworks/nuxt/server/utils/serialize.ts +30 -0
- package/registry/frameworks/nuxt/server/utils/session.ts +210 -0
- package/registry/frameworks/nuxt/server/utils/threads.ts +404 -0
- package/registry/frameworks/nuxt/tsconfig.json +18 -0
- package/registry/frameworks/nuxt.ts +17 -0
- package/registry/frameworks/vite/.env.example +20 -0
- package/registry/frameworks/vite/README.md +149 -0
- package/registry/frameworks/vite/agent/index.ts +59 -0
- package/registry/frameworks/vite/agent/middleware.ts +24 -0
- package/registry/frameworks/vite/agent/tools.ts +64 -0
- package/registry/frameworks/vite/index.html +23 -0
- package/registry/frameworks/vite/langgraph.json +16 -0
- package/registry/frameworks/vite/package.json +39 -0
- package/registry/frameworks/vite/public/favicon.ico +0 -0
- package/registry/frameworks/vite/scripts/vite-langgraph-proxy.ts +34 -0
- package/registry/frameworks/vite/src/components/Chat.tsx +124 -0
- package/registry/frameworks/vite/src/components/ChatApp.tsx +122 -0
- package/registry/frameworks/vite/src/components/Conversation.tsx +91 -0
- package/registry/frameworks/vite/src/components/MessageBubbles.tsx +88 -0
- package/registry/frameworks/vite/src/components/MessageReasoning.tsx +71 -0
- package/registry/frameworks/vite/src/components/MessageThread.tsx +135 -0
- package/registry/frameworks/vite/src/components/StreamingIndicator.tsx +36 -0
- package/registry/frameworks/vite/src/components/Subagents.tsx +120 -0
- package/registry/frameworks/vite/src/components/ThemeIcons.tsx +31 -0
- package/registry/frameworks/vite/src/components/ThreadHistory.tsx +73 -0
- package/registry/frameworks/vite/src/components/ToolCall.tsx +89 -0
- package/registry/frameworks/vite/src/lib/agent-type.ts +4 -0
- package/registry/frameworks/vite/src/lib/chat/threads-client.ts +114 -0
- package/registry/frameworks/vite/src/main.tsx +11 -0
- package/registry/frameworks/vite/src/styles/globals.css +714 -0
- package/registry/frameworks/vite/src/vite-env.d.ts +11 -0
- package/registry/frameworks/vite/tsconfig.app.json +24 -0
- package/registry/frameworks/vite/tsconfig.json +7 -0
- package/registry/frameworks/vite/tsconfig.node.json +21 -0
- package/registry/frameworks/vite/vercel.json +3 -0
- package/registry/frameworks/vite/vite.config.ts +24 -0
- package/registry/frameworks/vite.ts +17 -0
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2017",
|
|
4
|
+
"lib": ["dom", "dom.iterable", "esnext"],
|
|
5
|
+
"allowJs": true,
|
|
6
|
+
"skipLibCheck": true,
|
|
7
|
+
"strict": true,
|
|
8
|
+
"noEmit": true,
|
|
9
|
+
"esModuleInterop": true,
|
|
10
|
+
"module": "esnext",
|
|
11
|
+
"moduleResolution": "bundler",
|
|
12
|
+
"resolveJsonModule": true,
|
|
13
|
+
"isolatedModules": true,
|
|
14
|
+
"jsx": "react-jsx",
|
|
15
|
+
"incremental": true,
|
|
16
|
+
"plugins": [
|
|
17
|
+
{
|
|
18
|
+
"name": "next"
|
|
19
|
+
}
|
|
20
|
+
],
|
|
21
|
+
"paths": {
|
|
22
|
+
"@/*": ["./*"]
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"include": [
|
|
26
|
+
"next-env.d.ts",
|
|
27
|
+
"**/*.ts",
|
|
28
|
+
"**/*.tsx",
|
|
29
|
+
".next/types/**/*.ts",
|
|
30
|
+
".next/dev/types/**/*.ts",
|
|
31
|
+
"**/*.mts"
|
|
32
|
+
],
|
|
33
|
+
"exclude": ["node_modules"]
|
|
34
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { createFramework } from "../../src/registry/framework.js";
|
|
2
|
+
|
|
3
|
+
export const next = createFramework({
|
|
4
|
+
id: "next",
|
|
5
|
+
title: "Next.js",
|
|
6
|
+
defaultProjectName: "next-deepagents",
|
|
7
|
+
address: {
|
|
8
|
+
scheme: "github",
|
|
9
|
+
owner: "aolsenjazz",
|
|
10
|
+
repo: "deployment-cookbook",
|
|
11
|
+
subPath: "js-next",
|
|
12
|
+
},
|
|
13
|
+
envFilePath: ".env.local",
|
|
14
|
+
packageJsonPath: "package.json",
|
|
15
|
+
agentPath: "lib/agent",
|
|
16
|
+
files: [],
|
|
17
|
+
});
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
# Nuxt Deep Agent
|
|
2
|
+
|
|
3
|
+
A [Nuxt 4](https://nuxt.com) example that deploys a LangChain **deep agent** with
|
|
4
|
+
thread storage, history, and a subagent-aware chat UI built with
|
|
5
|
+
[`@langchain/vue`](https://www.npmjs.com/package/@langchain/vue).
|
|
6
|
+
|
|
7
|
+
It is a Vue/Nuxt port of the streaming-cookbook `react-custom-backend` example:
|
|
8
|
+
the same Agent Streaming Protocol, served from Nuxt's Nitro server engine
|
|
9
|
+
instead of a standalone Hono process, and consumed with Vue composables instead
|
|
10
|
+
of React hooks.
|
|
11
|
+
|
|
12
|
+
## What it demonstrates
|
|
13
|
+
|
|
14
|
+
- **One deployable app.** Nitro serves the Agent Streaming Protocol routes under
|
|
15
|
+
`/api/threads/:id/…`; the Nuxt frontend talks to them through an
|
|
16
|
+
`HttpAgentServerAdapter`. No separate backend process.
|
|
17
|
+
- **Thread storage & history.** The agent's in-memory `MemorySaver` checkpointer
|
|
18
|
+
is the single source of truth for threads — there is no client-side cache.
|
|
19
|
+
`GET /api/threads` enumerates threads from the checkpointer, `DELETE
|
|
20
|
+
/api/threads/:id` drops one, and `GET|POST /state` + `POST /history` expose the
|
|
21
|
+
LangGraph SDK thread-state wire shape. The sidebar is always fetched from the
|
|
22
|
+
server (titles derived from each thread's first message), so restarting the
|
|
23
|
+
server clears every thread.
|
|
24
|
+
- **Subagents.** The agent is a [`deepagents`](https://www.npmjs.com/package/deepagents)
|
|
25
|
+
coordinator with no direct tools — it delegates through the `task` tool to a
|
|
26
|
+
`researcher` (web search) and a `math-whiz` (calculator) subagent.
|
|
27
|
+
`@langchain/vue` discovers those subagents from the stream and the UI renders a
|
|
28
|
+
clickable chip per subagent; selecting one drills into its own chat view,
|
|
29
|
+
scoped to its namespaced `messages` and `tools` channels via `useMessages`.
|
|
30
|
+
- **Token & reasoning streaming.** Assistant tokens and tool-call lifecycle
|
|
31
|
+
events stream over the `messages` and `tools` channels through `useStream`. The
|
|
32
|
+
coordinator runs a reasoning model over the Responses API, so its reasoning
|
|
33
|
+
*summaries* (`{ type: "reasoning" }` content blocks) stream into a collapsible
|
|
34
|
+
"Thinking" block that auto-expands while it streams and collapses when the turn
|
|
35
|
+
settles.
|
|
36
|
+
|
|
37
|
+
## Prerequisites
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
cp .env.example .env
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Set `OPENAI_API_KEY` in `.env`. Nitro loads it automatically in development.
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
pnpm install
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Run
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
pnpm dev
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Open [http://localhost:3000](http://localhost:3000). Send the example prompt and
|
|
56
|
+
watch the orchestrator delegate to its subagents while their work streams into
|
|
57
|
+
dedicated cards.
|
|
58
|
+
|
|
59
|
+
Other commands:
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
pnpm build # production build
|
|
63
|
+
pnpm preview # preview the production build
|
|
64
|
+
pnpm typecheck # vue-tsc over the project
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## How it works
|
|
68
|
+
|
|
69
|
+
### Backend (`server/`)
|
|
70
|
+
|
|
71
|
+
- `server/agent/index.ts` — the `createDeepAgent` coordinator and its subagents,
|
|
72
|
+
compiled with an exported `MemorySaver` checkpointer. The coordinator uses a
|
|
73
|
+
reasoning model over the Responses API; the tool-using subagents use a plain
|
|
74
|
+
chat-completions model (to avoid the Responses API replaying reasoning items by
|
|
75
|
+
id through the checkpointer).
|
|
76
|
+
- `server/agent/middleware.ts` — `stripReasoningReplay`: rebuilds prior assistant
|
|
77
|
+
messages from `content` + `tool_calls` so stale reasoning/function-call item
|
|
78
|
+
ids are never replayed to the Responses API (which would 400). State is
|
|
79
|
+
untouched, so the UI still renders each turn's reasoning.
|
|
80
|
+
- `server/agent/tools.ts` — mock `search_web` and `calculator` tools (offline).
|
|
81
|
+
- `server/utils/session.ts` — `LocalThreadSession`: buffers protocol events in a
|
|
82
|
+
LangGraph `StreamChannel`, filters subscriptions with `matchesSubscription`,
|
|
83
|
+
and fans matching frames out over SSE.
|
|
84
|
+
- `server/utils/threads.ts` — checkpointer-backed `listThreads` / `getState` /
|
|
85
|
+
`updateState` / `getHistory` helpers in the LangGraph SDK wire format.
|
|
86
|
+
- `server/utils/serialize.ts` — converts LangChain message instances to plain
|
|
87
|
+
protocol dicts for the wire.
|
|
88
|
+
- `server/utils/runtime.ts` — process-local singleton owning the agent, the
|
|
89
|
+
shared checkpointer, and one session per thread id (plus `deleteThread`).
|
|
90
|
+
- `server/api/threads/index.get.ts` — `GET /api/threads`, the checkpointer-backed
|
|
91
|
+
thread list.
|
|
92
|
+
- `server/api/threads/[threadId]/…` — Nitro route handlers for `commands`,
|
|
93
|
+
`stream`, `state` (GET/POST), `history`, and `DELETE` (drop a thread).
|
|
94
|
+
|
|
95
|
+
### Frontend (`app/`)
|
|
96
|
+
|
|
97
|
+
- `app/components/ChatApp.vue` — the app shell: a thread-history sidebar, theme
|
|
98
|
+
toggle, and the active conversation. Fetches the thread list from the server,
|
|
99
|
+
manages switching/creating/deleting, and refreshes the sidebar whenever a run
|
|
100
|
+
settles (titles/order are owned by the server).
|
|
101
|
+
- `app/components/ThreadHistory.vue` — the sidebar listing every server thread
|
|
102
|
+
with create / select / delete actions.
|
|
103
|
+
- `app/components/ChatThread.vue` — keyed by thread id, builds the
|
|
104
|
+
`HttpAgentServerAdapter` and calls `provideStream({ transport, threadId })`;
|
|
105
|
+
descendants read it with `useStreamContext()`.
|
|
106
|
+
- `app/components/Chat.vue` — centered message view with the composer pinned to
|
|
107
|
+
the bottom, plus the per-subagent detail view (with breadcrumb) you drill into
|
|
108
|
+
by clicking a subagent chip.
|
|
109
|
+
- `app/components/SubagentList.vue` / `SubagentDetail.vue` — the inline subagent
|
|
110
|
+
cards (built from `task` tool calls) and the scoped chat for one subagent
|
|
111
|
+
(`useMessages` bound to its namespace).
|
|
112
|
+
- `app/components/MessageList.vue` / `MessageBubbles.vue` / `MessageBubble.vue` —
|
|
113
|
+
the root chat transcript and bubble rendering. `MessageBubbles` renders each AI
|
|
114
|
+
turn's reasoning as a standalone block, delegations as inline subagent cards,
|
|
115
|
+
and tool calls as collapsible chips — folding the matching tool-result message
|
|
116
|
+
into each chip rather than showing raw tool rows.
|
|
117
|
+
- `app/components/ToolCall.vue` — a collapsible tool-call chip (icon, name,
|
|
118
|
+
status) whose body reveals the stringified input args and the tool output.
|
|
119
|
+
- `app/components/MessageReasoning.vue` — the collapsible "Thinking" reasoning
|
|
120
|
+
block (brain icon + caret), auto-expanded while reasoning streams.
|
|
121
|
+
- `app/utils/threads.ts` — server-driven thread helpers (`fetchThreads`,
|
|
122
|
+
`createThread`, `deleteThread`) plus the LangGraph SDK bootstrap.
|
|
123
|
+
|
|
124
|
+
The whole stream-driven UI runs client-side (wrapped in `<ClientOnly>`) since the
|
|
125
|
+
transport and SSE subscription are browser concerns.
|
|
126
|
+
|
|
127
|
+
## SDK docs
|
|
128
|
+
|
|
129
|
+
- [Vue SDK](https://www.npmjs.com/package/@langchain/vue): `useStream`,
|
|
130
|
+
`provideStream` / `useStreamContext`, and the selector composables
|
|
131
|
+
(`useMessages`, `useToolCalls`, `useValues`, …).
|
|
132
|
+
- [deepagents](https://www.npmjs.com/package/deepagents): the deep agent runtime,
|
|
133
|
+
subagents, and the `task` delegation tool.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import ChatApp from "./components/ChatApp.vue";
|
|
3
|
+
|
|
4
|
+
useHead({
|
|
5
|
+
title: "Nuxt Deep Agent",
|
|
6
|
+
meta: [
|
|
7
|
+
{
|
|
8
|
+
name: "description",
|
|
9
|
+
content:
|
|
10
|
+
"Deploy a LangChain deep agent with Nuxt: thread storage, history, " +
|
|
11
|
+
"and a subagent-aware chat UI powered by @langchain/vue.",
|
|
12
|
+
},
|
|
13
|
+
],
|
|
14
|
+
});
|
|
15
|
+
</script>
|
|
16
|
+
|
|
17
|
+
<template>
|
|
18
|
+
<ClientOnly>
|
|
19
|
+
<ChatApp />
|
|
20
|
+
<template #fallback>
|
|
21
|
+
<div class="app-shell">
|
|
22
|
+
<div class="empty-state center">Loading…</div>
|
|
23
|
+
</div>
|
|
24
|
+
</template>
|
|
25
|
+
</ClientOnly>
|
|
26
|
+
</template>
|