agent-info
GitHub查询当前用户可访问的所有员工(Agent)列表,支持按名称或类型过滤。返回包含 agentId、名称及类型的 JSON,用于代码生成中获取真实 agentId 或响应用户对可用员工的查询。
Trigger Scenarios
Install
npx skills add dtyq/magic --skill agent-info -g -y
SKILL.md
Frontmatter
{
"name": "agent-info",
"name-cn": "员工信息查询",
"description": "Query the list of all agents (employees) available to the current user. Use when generating code that requires a real agentId, or when the user asks \"which agents\/employees do I have\".",
"description-cn": "查询当前用户可用的所有员工(Agent)列表。当需要生成包含 agentId 的代码、或用户询问\"我有哪些员工\"时使用。"
}
List Available Agents
Query all agents accessible to the current user. Returns each agent's code (agentId), name, description and type.
Core Capabilities
- Get all available agents for the user (including built-in, custom, and public)
- Support fuzzy filtering by name
- The returned
codefield is the agentId, usable directly increateTopicAndSendand similar APIs
Quick Start
Typical Workflow
1. Query all agents (list.py)
↓ Get code / name / type
2. Use code directly as agentId in code generation
Available Scripts
list.py - List Agents
Query all agents available to the current user.
SYNOPSIS
python scripts/list.py [OPTIONS]
OPTIONS
| Option | Type | Required | Description |
|---|---|---|---|
--name-filter <keyword> |
string | No | Fuzzy filter by agent name (case-insensitive) |
--type-filter <type> |
string | No | Filter by type: official / custom / public |
OUTPUT
On success, returns JSON:
{
"total": 5,
"agents": [
{
"code": "SMA-xxxx",
"name": "Data Analyst",
"description": "Professional data analysis assistant",
"type": "custom"
}
]
}
codeis the agentId, pass directly towindow.Magic.project.createTopicAndSend(msg, {agentId: code})typevalues: official (built-in), custom (user-created), public (team/public shared)
EXAMPLES
# 查询全部员工
python scripts/list.py
# 按名称过滤
python scripts/list.py --name-filter "数据分析"
# 按类型过滤
python scripts/list.py --type-filter custom
Use Cases
1. Get real agentId for micro-app code generation
Before generating micro-app code that dispatches tasks to agents, run the script to get the agent list, then use the real code in generated code:
python scripts/list.py --name-filter "researcher"
Use the returned code directly:
const { topicId } = await window.Magic.project.createTopicAndSend(
message,
{ agentId: "SMA-xxxx" } // real code from list.py
);
2. User asks about available agents
When user asks "what agents do I have" or "show me available agents", run the script to get the full list.
Version History
- 41d7ef4 Current 2026-07-25 09:28


