Hand off tasks to human assistants and track their completion
数据来源:ClawHub。 在 ClawSkills 查看
选择你使用的 Agent
方法一:命令行安装(推荐)
推荐(无需提前安装 clawhub)
npx clawhub@latest --dir ~/.claude/skills install magic-api或使用 clawhub CLI(需提前安装)
clawhub --dir ~/.claude/skills install magic-api⚠️ 需要 Node.js 18+,没有 Node?请使用下方方法二直接下载 ZIP。 安装 Node.js →
方法二:手动下载安装(无需 Node)
下载 ZIP,解压后将文件夹放到以下路径,重启 Agent 即可:
安装路径
~/.claude/skills/magic-api/💡解压后将文件夹放到上方路径,重启 Agent 即可生效
--- name: magic api console version: 1.2.1 description: Hand off tasks to human assistants and track their completion homepage: https://console.api.getmagic.com ---
The easiest way for AI agents to hand off tasks to human assistants.
Magic API connects you (an AI assistant) with a human virtual executive assistant. When you send a request to Magic API, a real person receives it and works on the task for you.
| File | URL | |------|-----| | SKILL.md (this file) | https://console.api.getmagic.com/skill.md | | HEARTBEAT.md | https://console.api.getmagic.com/heartbeat.md |
Base URL: https://console.api.getmagic.com/api/v1
Every agent needs to register once to get an API key:
curl -X POST https://console.api.getmagic.com/api/v1/agents/register \
-H "Content-Type: application/json" \
-d '{
"name": "YourAgentName",
"description": "What you do"
}'
Response:
{
"api_key": "magic_xxx",
"agent": {
"name": "YourAgentName",
"description": "What you do",
"created_at": "2026-02-02T..."
},
"important": "⚠️ SAVE YOUR API KEY! You need it for all requests."
}
⚠️ Prerequisites:
api_key immediately - it cannot be retrieved later!Error 409 - Name taken:
{
"error": "Agent name already taken",
"hint": "Please choose a different name"
}
---
All requests after registration require your API key:
curl https://console.api.getmagic.com/api/v1/requests \
-H "Authorization: Bearer YOUR_API_KEY"
Or use the x-api-key header:
curl https://console.api.getmagic.com/api/v1/requests \
-H "x-api-key: YOUR_API_KEY"
---
Hand off a task to a human assistant:
curl -X POST https://console.api.getmagic.com/api/v1/request \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"title": "Research competitor pricing",
"instructions": "Please research our top 3 competitors and document their pricing tiers.\n\n---\nOwner Contact Information:\nName: John Doe\nEmail: [email protected]\nPhone: +1-555-123-4567\n---",
"objective": "Create a comparison table with pricing information",
"max_minutes": 60
}'
Parameters:
title (required): Brief title of the taskinstructions (required): Detailed instructions for the human assistant - MUST include owner contact info (see below)objective (required): What success looks likemax_minutes (optional): Maximum time for task (default: 60)relaxed (optional): Whether timing is flexible (default: true)Response:
{
"id": "uuid",
"title": "Research competitor pricing",
"instructions": "Please research...",
"objective": "Create a comparison table...",
"max_minutes": 60,
"relaxed": true,
"created_at": "2026-02-02T...",
"updated_at": "2026-02-02T..."
}
---
You MUST include the task owner's contact information in your instructions!
The human assistant needs to know who to contact for questions, clarifications, or updates. Without this information, the assistant cannot effectively complete the task.
Always include this block at the END of your instructions:
---
Owner Contact Information:
Name: [First Name] [Last Name]
Email: [[email protected]]
Phone: [+1-555-123-4567] (if available)
---
Here's a properly formatted instructions field:
Please book a flight from NYC to LA for next Tuesday.
Requirements:
- Departing in the morning (before 11am)
- Returning Friday evening (after 5pm)
- Budget: $500 maximum
- Prefer direct flights if available
- Economy class is fine
Please send confirmation details once booked.
---
Owner Contact Information:
Name: Jane Smith
Email: [email protected]
Phone: +1-555-987-6543
---
Including owner contact information allows the assistant to:
Tasks without owner contact information may be delayed or rejected.
---
Get the status of a specific task:
curl https://console.api.getmagic.com/api/v1/request/TASK_ID \
-H "Authorization: Bearer YOUR_API_KEY"
Response:
{
"id": "uuid",
"title": "Research competitor pricing",
"status": "COMPLETED",
"result": "Comparison table created: [link to document]",
"created_at": "2026-02-02T...",
"completed_at": "2026-02-02T..."
}
Task Statuses:
PENDING: Task is waiting for a human to startIN_PROGRESS: A human is actively working on itCOMPLETED: Task is done, check the result field---
Get all your tasks and their statuses:
# Get all tasks
curl "https://console.api.getmagic.com/api/v1/requests" \
-H "Authorization: Bearer YOUR_API_KEY"
# Get only pending and in-progress tasks
curl "https://console.api.getmagic.com/api/v1/requests?status=PENDING,IN_PROGRESS" \
-H "Authorization: Bearer YOUR_API_KEY"
# Get tasks updated since a specific time
curl "https://console.api.getmagic.com/api/v1/requests?since=2026-02-02T12:00:00Z" \
-H "Authorization: Bearer YOUR_API_KEY"
# Limit results
curl "https://console.api.getmagic.com/api/v1/requests?limit=10" \
-H "Authorization: Bearer YOUR_API_KEY"
Query Parameters:
status: Comma-separated list (e.g., "PENDING,IN_PROGRESS,COMPLETED")since: ISO timestamp - only return tasks created/updated after this timelimit: Maximum results (default: 50, max: 100)Response:
{
"requests": [
{
"id": "uuid",
"title": "Research competitor pricing",
"status": "COMPLETED",
"result": "Comparison table created",
"created_at": "2026-02-02T...",
"updated_at": "2026-02-02T...",
"completed_at": "2026-02-02T..."
},
{
"id": "uuid2",
"title": "Schedule meeting",
"status": "PENDING",
"result": null,
"created_at": "2026-02-02T...",
"updated_at": "2026-02-02T...",
"completed_at": null
}
],
"count": 2
}
---
If you have HEARTBEAT.md enabled, you should set automatic task monitoring:
~/.config/magic-api/state.jsonThis gives you proactive notifications when tasks complete or get updates, without needing to manually check.
Add a message to a task conversation (ask questions, provide updates):
curl -X POST https://console.api.getmagic.com/api/v1/conversation \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"request_id": "TASK_ID",
"content": "Quick question: should I include international competitors?"
}'
Response:
{
"id": "uuid",
"content": "Quick question: should I include international competitors?",
"created_at": "2026-02-02T...",
"updated_at": "2026-02-02T..."
}
---
Check periodically for task updates:
# Check for completed tasks
curl "https://console.api.getmagic.com/api/v1/requests?status=COMPLETED&limit=10" \
-H "Authorization: Bearer YOUR_API_KEY"
...安装 Magic for AI Agents 后,可以对 AI 说这些话来触发它
Help me get started with Magic for AI Agents
Explains what Magic for AI Agents does, walks through the setup, and runs a quick demo based on your current project
Use Magic for AI Agents to hand off tasks to human assistants and track their completion
Invokes Magic for AI Agents with the right parameters and returns the result directly in the conversation
What can I do with Magic for AI Agents in my developer & devops workflow?
Lists the top use cases for Magic for AI Agents, with example commands for each scenario
将技能文件夹放到 ~/.claude/skills/magic-api/ 目录(个人级,所有项目可用),或 .claude/skills/magic-api/(项目级)。重启 AI 客户端后,用 /magic-api 主动调用,或让 AI 根据上下文自动发现并使用。
Magic for AI Agents 支持 Claude、Cursor、OpenClaw,可与这些 AI 平台无缝集成,扩展其能力。
Magic for AI Agents 可免费安装使用。请查阅仓库了解许可证信息。
Hand off tasks to human assistants and track their completion
Magic for AI Agents 属于「Developer & DevOps」分类,该分类的技能帮助 AI 智能体在此领域执行专业任务。
Automate my developer & devops tasks using Magic for AI Agents
Identifies repetitive steps in your workflow and sets up Magic for AI Agents to handle them automatically