Files
copilotkit__copilotkit/docs/snippets/integrations/deepagents/frontend-tools.mdx
Martha Schumann c63e04c16a docs(CPK-7187): add core feature pages to DeepAgents integration
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>
2026-04-10 09:09:11 -07:00

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.