@ag-ui/crewai (英语)
实施AG-UI CrewAI协议.
通过AG-UI协议,连接CrewAI Flows和Crews到前端应用. 既支持TypeScript HTTP客户端,也支持Python FastAPI服务器集成以流动的乘员执行.
安装
npm install @ag-ui/crewai
pnpm add @ag-ui/crewai
yarn add @ag-ui/crewai
使用量
import { CrewAIAgent } from "@ag-ui/crewai";
// Create an AG-UI compatible agent
const agent = new CrewAIAgent({
url: "http://localhost:8000/crew-endpoint",
headers: { "Content-Type": "application/json" },
});
// Run with streaming
const result = await agent.runAgent({
messages: [{ role: "user", content: "Execute the research crew" }],
});
特征
- HTTP 连接 - 连接 Crewahi FastAPI 服务器
- 流程组支持( C) - 与CrewAI流程和传统团队合作
- 步道跟踪 - 实时机组人员执行进展
- Python 整合 - 包括全部 FastAPI 服务器执行
在道场运行示例服务器
Dojo服务器是一个单独的项目,与 Python 软件包并列, 所以运行从一个 检查此仓库 .
cd integrations/crew-ai/python/examples
uv sync && uv run dev