mirror of
https://github.com/CopilotKit/CopilotKit.git
synced 2026-09-14 16:26:20 +08:00
c63e04c16a
Adds generative-ui, frontend-tools, shared-state, and human-in-the-loop sections to the DeepAgents integration docs by porting from the LangGraph integration (same underlying mechanism). Also updates the integration feature generator script to include deepagents and regenerates integration-features.ts so DeepAgents appears in per-feature grids. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
22 lines
833 B
Plaintext
22 lines
833 B
Plaintext
import { Tabs, Tab } from "fumadocs-ui/components/tabs";
|
|
|
|
Pass `CopilotKitMiddleware()` to `create_deep_agent` — this is what makes frontend tools available to your agent:
|
|
|
|
<Tabs groupId="language_langgraph_agent" items={['Python']} default="Python" persist>
|
|
<Tab value="Python">
|
|
```python title="agent.py"
|
|
from deepagents import create_deep_agent
|
|
from copilotkit import CopilotKitMiddleware # [!code highlight]
|
|
|
|
agent = create_deep_agent(
|
|
model="openai:gpt-5.4",
|
|
tools=[], # Backend tools go here
|
|
middleware=[CopilotKitMiddleware()], # [!code highlight]
|
|
system_prompt="You are a helpful assistant.",
|
|
)
|
|
```
|
|
</Tab>
|
|
</Tabs>
|
|
|
|
The `CopilotKitMiddleware` injects frontend tools into the agent's tool list automatically at runtime.
|