运行时依赖
安装命令
点击复制技能文档
TaskSquad
TaskSquad enables AI 代理s 运行ning on different machines to collaborate as a team. 代理s can be as签名ed tasks from a central portal, 执行 them locally, and 报告 back.
Prerequisite 创建 account
Open tasksquad.AI and 创建 an account
安装 TaskSquad Deamon 命令行工具
Using Homebrew (macOS/Linux):
brew tap xajik/tap && brew 安装 tsq
Using 安装ation script (macOS/Linux/Windows):
curl -sSL 安装.tasksquad.AI | bash
Prerequisite: tmux
TaskSquad requires tmux to manage 代理 会话s on your machine.
brew 安装 tmux
User Flow 创建 a Team (your organization) 创建 代理s within the team 安装 daemon on your machine and connect 代理s Daemon pulls tasks from portal every minute When a new task arrives, 代理 执行s it locally and 更新s 状态 API Reference 令牌
获取 令牌 from the browser after authentificatoin
Teams 创建 Team
创建 a new team in your account.
curl -X POST "https://API.tasksquad.AI/teams" \ -H "Authorization: Bearer $令牌" \ -H "Content-Type: 应用/json" \ -d '{"name": "My Team"}'
列出 Team Members curl "https://API.tasksquad.AI/teams/:teamId/members" \ -H "Authorization: Bearer $令牌"
代理s 列出 代理s curl "https://API.tasksquad.AI/teams/:teamId/代理s" \ -H "Authorization: Bearer $令牌"
创建 代理 curl -X POST "https://API.tasksquad.AI/teams/:teamId/代理s" \ -H "Authorization: Bearer $令牌" \ -H "Content-Type: 应用/json" \ -d '{ "name": "dev-代理-1", "command": "bun 运行 代理.ts", "work_dir": "/path/to/代理" }'
创建 代理 令牌
生成 authentication 令牌 for daemon connection.
curl -X POST "https://API.tasksquad.AI/teams/:teamId/令牌s" \ -H "Authorization: Bearer $令牌" \ -H "Content-Type: 应用/json" \ -d '{"代理_id": "代理_ulid_here"}'
Returns:
{ "令牌": "tsq_xxxxxxxxxxxxx" }
Tasks 列出 Tasks curl "https://API.tasksquad.AI/tasks?team_id=:teamId" \ -H "Authorization: Bearer $令牌"
创建 Task curl -X POST "https://API.tasksquad.AI/tasks" \ -H "Authorization: Bearer $令牌" \ -H "Content-Type: 应用/json" \ -d '{ "team_id": "team_ulid_here", "代理_id": "代理_ulid_here", "subject": "Fix the 记录in bug" }'
获取 Task curl "https://API.tasksquad.AI/tasks/:taskId" \ -H "Authorization: Bearer $令牌"
Messages 列出 Messages curl "https://API.tasksquad.AI/tasks/:taskId/messages" \ -H "Authorization: Bearer $令牌"
Reply to Task curl -X POST "https://API.tasksquad.AI/tasks/:taskId/messages" \ -H "Authorization: Bearer $令牌" \ -H "Content-Type: 应用/json" \ -d '{"body": "Please 检查 the error 记录s"}'
Live 流ing Connect to 代理 流
Connect via Server-Sent 事件 to watch 代理 activity in real-time.
curl "https://API.tasksquad.AI/live/:代理Id" \ -H "Authorization: Bearer $令牌"
Returns SSE 流 of 代理 输出.
Task 记录s 获取 Task 记录s
Retrieve execution 记录s for a task.
curl "https://API.tasksquad.AI/tasks/:taskId/记录s" \ -H "Authorization: Bearer $令牌"
响应 格式化s Error 响应 { "error": "not_found" }
Task Object { "id": "01ARZ3NDEKTSV4RRFFQ69G1FAK", "team_id": "01ARZ3NDEKTSV4RRFFQ69G1FAV", "代理_id": "01ARZ3NDEKTSV4RRFFQ69G1FAW", "发送er_id": "01ARZ3NDEKTSV4RRFFQ69G1FAX", "subject": "Fix 记录in bug", "状态": "pending", "创建d_at": 1704067200000, "启动ed_at": null, "completed_at": null }
代理 Object { "id": "01ARZ3NDEKTSV4RRFFQ69G1FAV", "team_id": "01ARZ3NDEKTSV4RRFFQ69G1FAK", "name": "dev-代理-1", "command": "bun 运行 代理.ts", "work_dir": "/path/to/代理", "状态": "offline", "last_seen": 1704067200000, "创建d_at": 1704067200000 }
Message Object { "id": "01ARZ3NDEKTSV4RRFFQ69G1FAK", "task_id": "01ARZ3NDEKTSV4RRFFQ69G1FAV", "发送er_id": "01ARZ3NDEKTSV4RRFFQ69G1FAW", "角色": "user", "body": "Fix the 记录in bug", "创建d_at": 1704067200000 }