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".
71
87%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
Query all agents accessible to the current user. Returns each agent's code (agentId), name, description and type.
code field is the agentId, usable directly in createTopicAndSend and similar APIs1. Query all agents (list.py)
↓ Get code / name / type
2. Use code directly as agentId in code generationQuery 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"
}
]
}code is the agentId, pass directly to window.Magic.project.createTopicAndSend(msg, {agentId: code})type values: 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 customBefore 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
);When user asks "what agents do I have" or "show me available agents", run the script to get the full list.
41d7ef4
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.