@copilotkit/runtime
Version:
<img src="https://github.com/user-attachments/assets/0a6b64d9-e193-4940-a3f6-60334ac34084" alt="banner" style="border-radius: 12px; border: 2px solid #d6d4fa;" />
46 lines (33 loc) • 1.12 kB
Markdown
CrewAI Flows — wired via the bare `HttpAgent` from `@ag-ui/client`. No dedicated wrapper.
```bash
pnpm add @ag-ui/client
```
```typescript
import {
CopilotRuntime,
createCopilotRuntimeHandler,
} from "@copilotkit/runtime/v2";
import { HttpAgent } from "@ag-ui/client";
const runtime = new CopilotRuntime({
agents: {
default: new HttpAgent({
url: process.env.CREWAI_FLOWS_URL ?? "http://localhost:8000/",
}),
},
});
const handler = createCopilotRuntimeHandler({
runtime,
basePath: "/api/copilotkit",
});
export default { fetch: handler };
```
Flows is the event-driven pipeline product. For multi-agent Crews orchestration, use
`CrewAIAgent` from `@ag-ui/crewai` instead — see [crewai-crews.md](crewai-crews.md).
Your CrewAI Flows server must speak AG-UI over HTTP. If you control the server, use the
official CrewAI Python AG-UI adapter. `HttpAgent` is a thin bridge — any server that
emits AG-UI events at the URL works.
Source: `docs/content/docs/integrations/crewai-flows/quickstart.mdx`.