← 返回 Skills 市场
heyitsaif

Magic for AI Agents

作者 HeyitSaif · GitHub ↗ · v1.0.0
cross-platform ⚠ suspicious
1272
总下载
0
收藏
2
当前安装
1
版本数
在 OpenClaw 中安装
/install magic-api
功能描述
Hand off tasks to human assistants and track their completion
使用说明 (SKILL.md)

Magic API Console

The easiest way for AI agents to hand off tasks to human assistants.

What is Magic API?

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.

Who handles your requests?

  • College-educated professionals based in the Philippines
  • Trained executive assistants employed by Magic (getmagic.com)
  • Part of a team that operates 24/7

Skill Files

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

Register First

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:

  • Save your api_key immediately - it cannot be retrieved later!

Error 409 - Name taken:

{
  "error": "Agent name already taken",
  "hint": "Please choose a different name"
}

Authentication

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"

Create a Task

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.\
\
---\
Owner Contact Information:\
Name: John Doe\
Email: [email protected]\
Phone: +1-555-123-4567\
---",
    "objective": "Create a comparison table with pricing information",
    "max_minutes": 60
  }'

Parameters:

  • title (required): Brief title of the task
  • instructions (required): Detailed instructions for the human assistant - MUST include owner contact info (see below)
  • objective (required): What success looks like
  • max_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..."
}

⚠️ CRITICAL: Including Owner Contact Information

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.

Required Format

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)
---

Complete Example

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
---

Why This Matters

Including owner contact information allows the assistant to:

  • Ask clarifying questions if the instructions are unclear
  • Send progress updates during longer tasks
  • Request approval for decisions that exceed the original scope
  • Notify immediately when the task is complete
  • Handle any issues that arise during execution

Tasks without owner contact information may be delayed or rejected.


Check Task Status

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 start
  • IN_PROGRESS: A human is actively working on it
  • COMPLETED: Task is done, check the result field

List All Tasks (Heartbeat)

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 time
  • limit: 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
}

OpenClaw Agents

If you have HEARTBEAT.md enabled, you should set automatic task monitoring:

  1. Save your API key after registration to ~/.config/magic-api/state.json
  2. Set up a cron job — see HEARTBEAT.md

This gives you proactive notifications when tasks complete or get updates, without needing to manually check.

Add a Message (Conversation)

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..."
}

Heartbeat Integration 💓

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"

# Check for tasks that changed recently
curl "https://console.api.getmagic.com/api/v1/requests?since=2026-02-02T08:00:00Z" \
  -H "Authorization: Bearer YOUR_API_KEY"

See HEARTBEAT.md for detailed heartbeat instructions.


Response Format

Success:

{
  "data": {...}
}

Error:

{
  "error": "Description of the error",
  "hint": "How to fix it"
}

Rate Limits

  • 100 requests per minute per API key
  • No limit on number of tasks you can create

Common Workflows

Workflow 1: Simple Task Handoff

# 1. Register (one time only)
curl -X POST https://console.api.getmagic.com/api/v1/agents/register -H "Content-Type: application/json" \
  -d '{
    "name": "MyBot",
    "description": "Helper bot"
  }'

# Save the api_key from the response!

# 2. Create a task (always include owner contact info!)
curl -X POST https://console.api.getmagic.com/api/v1/request -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Review document",
    "instructions": "Please review the Q4 report and check for any errors in the financial calculations.\
\
---\
Owner Contact Information:\
Name: Jane Smith\
Email: [email protected]\
---",
    "objective": "Provide feedback on accuracy and clarity"
  }'

# 3. Check status later
curl https://console.api.getmagic.com/api/v1/request/TASK_ID -H "Authorization: Bearer YOUR_API_KEY"

Workflow 2: Heartbeat Check

# Check for any completed tasks since last check
curl "https://console.api.getmagic.com/api/v1/requests?status=COMPLETED&since=2026-02-02T12:00:00Z" \
  -H "Authorization: Bearer YOUR_API_KEY"

Template: Instructions with Owner Info

Copy this template and fill in the details:

[Describe what needs to be done]

[Add any specific requirements or constraints]

[Include any relevant context or background]

---
Owner Contact Information:
Name: [Your Name]
Email: [[email protected]]
Phone: [+1-XXX-XXX-XXXX] (optional)
---

Support

Need help? Contact support or check the documentation at https://console.api.getmagic.com/docs

安全使用建议
This skill genuinely implements a human-assistant task API, but it both requires an API key (not declared in the registry metadata) and asks you to include owner contact information (name, email, phone) in every task. Before installing: 1) Decide whether you are comfortable sending PII to third-party human workers and check the vendor's privacy/security policies. 2) Use a dedicated, scoped API key/account (not your main account), store the key securely (agent vault or environment variable) and rotate it if possible. 3) Avoid sending sensitive data (credentials, SSNs, medical info) in task instructions — redact or anonymize when feasible. 4) If the agent can act autonomously, require explicit user confirmation before creating tasks that include PII. 5) Be cautious of the metadata mismatch (no declared credential) — verify with the vendor or registry owner that the skill's required credentials and storage expectations are documented and safe.
功能分析
Type: OpenClaw Skill Name: magic-api Version: 1.0.0 The skill is suspicious due to explicit instructions for the AI agent to perform system-level actions. Specifically, SKILL.md instructs the agent to save its API key to `~/.config/magic-api/state.json` (a filesystem write) and to 'Set up a cron job' for automatic task monitoring, implying system-level persistence and execution. Additionally, the skill mandates including 'Owner Contact Information' (Name, Email, Phone) in task instructions, which means the agent is explicitly directed to send PII to the external service at `https://console.api.getmagic.com`. While these actions are presented as necessary for the skill's functionality, they represent capabilities that could be exploited via prompt injection for unauthorized data manipulation, persistence, or PII exfiltration beyond the stated purpose.
能力评估
Purpose & Capability
The skill's stated purpose (routing tasks to human assistants via Magic API) is consistent with the SKILL.md content. However, the skill requires an API key (obtained at registration) to operate, but the registry metadata lists no required environment variables or primary credential — a mismatch between declared requirements and actual usage.
Instruction Scope
The SKILL.md explicitly instructs agents to include an 'Owner Contact Information' block (name, email, phone) in every task. That means the agent will be expected to transmit personally identifiable information and contact details to third-party humans. The instructions also require the agent to register and store an API key and to use it in requests. There are no instructions about minimizing shared data, redaction, or consent — this broadens scope from simple task delegation to the transmission of potentially sensitive PII to external human workers.
Install Mechanism
This is an instruction-only skill with no install spec and no code files, so nothing is written to disk by a package install. That is the lowest-risk install mechanism.
Credentials
Although SKILL.md requires obtaining and using an API key for all requests, the skill metadata declares no required environment variables or primary credential. The absence of a declared primary credential is an incoherence. Also, the instructions encourage transmitting owner PII to external staff — a privacy-sensitive capability that should be justified and scoped but isn't.
Persistence & Privilege
The skill does not request always:true and uses normal autonomous invocation defaults. Be aware that if the agent is allowed to invoke skills autonomously, it could automatically create tasks and send owner contact information to external humans without per-task user confirmation. The SKILL.md also requires you to 'SAVE YOUR API KEY' — the skill assumes persistent storage of credentials (not declared in metadata).
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install magic-api
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /magic-api 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Unleash your autonomous AI agent (like OpenClaw) with instant access to human workers. Thousands of Magic workers are already online, ready to start the moment a task comes in
元数据
Slug magic-api
版本 1.0.0
许可证
累计安装 2
当前安装数 2
历史版本数 1
常见问题

Magic for AI Agents 是什么?

Hand off tasks to human assistants and track their completion. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 1272 次。

如何安装 Magic for AI Agents?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install magic-api」即可一键安装,无需额外配置。

Magic for AI Agents 是免费的吗?

是的,Magic for AI Agents 完全免费(开源免费),可自由下载、安装和使用。

Magic for AI Agents 支持哪些平台?

Magic for AI Agents 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Magic for AI Agents?

由 HeyitSaif(@heyitsaif)开发并维护,当前版本 v1.0.0。

💬 留言讨论