You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs(CPK-7187): address Christian Bromann feedback on Deep Agents docs
- Fix Deep Agents icon (was identical to LangGraph icon) with official OSS mark
- Rename "LangSmith" tabs to "Deep Agent" throughout quickstart
- Add TypeScript agent tabs (createAgent + langgraph.json) to quickstart Steps 1-3
- Add Annotation deprecation callout on in-app-agent-read TypeScript tab
- Add "Vite + Direct Connection" alternative quickstart section using
add_langgraph_fastapi_endpoint with langgraph.json http field
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
npx @langchain/langgraph-cli dev --port 8123 --no-browser
316
381
```
@@ -353,3 +418,135 @@ Before you begin, you'll need the following:
353
418
</Tabs>
354
419
</Step>
355
420
</Steps>
421
+
422
+
---
423
+
424
+
## Alternative: Vite + Direct Connection
425
+
426
+
This approach eliminates the Next.js API proxy entirely. Instead, you extend your LangGraph deployment with a built-in CopilotKit-compatible endpoint and point your frontend straight at it — no intermediate runtime layer needed.
427
+
428
+
<Steps>
429
+
<Step>
430
+
### Add the CopilotKit HTTP endpoint to your agent
431
+
432
+
Add `ag-ui-langgraph` to your agent's dependencies:
433
+
434
+
```bash
435
+
uv add ag-ui-langgraph
436
+
```
437
+
438
+
Then extend `main.py` to expose a CopilotKit-compatible HTTP endpoint alongside the agent:
439
+
440
+
```python title="main.py"
441
+
from fastapi import FastAPI
442
+
from deepagents import create_deep_agent
443
+
from copilotkit import CopilotKitMiddleware, LangGraphAGUIAgent
444
+
from ag_ui_langgraph import add_langgraph_fastapi_endpoint
445
+
from langgraph.checkpoint.memory import MemorySaver
446
+
447
+
defget_weather(location: str):
448
+
"""Get weather for a location"""
449
+
returnf"The weather in {location} is sunny."
450
+
451
+
agent = create_deep_agent(
452
+
model="openai:gpt-4o",
453
+
tools=[get_weather],
454
+
middleware=[CopilotKitMiddleware()],
455
+
system_prompt="You are a helpful research assistant.",
456
+
checkpointer=MemorySaver()
457
+
)
458
+
459
+
app = FastAPI()
460
+
461
+
add_langgraph_fastapi_endpoint(
462
+
app=app,
463
+
agent=LangGraphAGUIAgent(
464
+
name="sample_agent",
465
+
description="A helpful research assistant.",
466
+
graph=agent,
467
+
),
468
+
path="/",
469
+
)
470
+
```
471
+
472
+
Update `langgraph.json` to expose the custom HTTP app when running `langgraph dev`:
Copy file name to clipboardExpand all lines: docs/content/docs/integrations/deepagents/shared-state/in-app-agent-read.mdx
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -65,6 +65,10 @@ state updates, you can reflect these updates natively in your application.
65
65
```
66
66
</Tab>
67
67
<Tabvalue="TypeScript">
68
+
<Callouttype="warn"title="Annotation is the legacy TypeScript API">
69
+
LangGraph now recommends [`StateSchema`](https://langchain-ai.github.io/langgraphjs/) over `Annotation` for new TypeScript projects. Full `StateSchema` support in `@copilotkit/sdk-js` is tracked in a follow-up issue. The example below uses the current API.
0 commit comments