single-agent
Guide one Swarms Agent, its memory, skills, marketplace, prompt caching, and support objects.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- single-agent
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- description
- Guide one Swarms Agent, its memory, skills, marketplace, prompt caching, and support objects.
- disable-model-invocation
- true
02 资源文件 4
- 参考文档references/api-reference.md4.2 KB
- 参考文档references/troubleshooting.md1.6 KB
- 参考文档references/workflows.md2.7 KB
- 脚本scripts/agent_smoke.py2.4 KB
03 SKILL.md 正文
Single Agent
Use this sub-skill when the user wants to create, configure, inspect, or debug one Swarms Agent and the objects that travel with it.
Owns these workflows
- Build a new
Agentwith the right model, loop count, tools, and output type. - Attach skills from a
skills_dirand decide when to load them statically or dynamically. - Turn on or tune memory, context compression, fallback models, streaming, prompt caching, and multimodal input.
- Load or publish marketplace prompts.
- Work with the support objects that make a single agent usable:
Conversation,Artifact,SkillsManager,ContextCompressor,LLMManager, andAgentMarketplaceHandler.
Does not own
- CLI command parsing or YAML/markdown file loaders; use
cli-loadersfor those. - Tool schema conversion, BaseTool, or MCP server/client details; use
tools-mcp. - Multi-agent orchestration, routing, debate, group chat, or swarm planning; use
multi-agent-workflows.
Read this sub-skill when the request mentions
Agent,run,run_stream,max_loops,interactive,autosave, oroutput_type.skills_dir,SkillsManager,persistent_memory,context_compression, orWORKSPACE_DIR.marketplace_prompt_id,SWARMS_API_KEY, or prompt marketplace workflows.prompt_caching,cache_config, model fallback, or provider-specific parameter behavior.Conversation,Artifact,add_memory, or state save/load issues.
Working shape
- Decide whether the task is a minimal agent, a skills-enabled agent, a memory-backed agent, or a provider-specific live run.
- Check the user’s model, key, and workspace assumptions before recommending runtime settings.
- Prefer a minimal offline smoke check first; only move to live provider execution if the user has keys and wants a real model call.
- Use the bundled references for constructor knobs, workflow examples, and failure recovery.
What to read next
references/api-reference.mdfor the confirmedAgentsignature and the main support-object APIs.references/workflows.mdfor common single-agent recipes.references/troubleshooting.mdfor workspace, key, fallback, and marketplace failures.scripts/agent_smoke.pyfor a local offline import and support-object check.
Typical user questions this sub-skill should answer
- How do I create one agent that remembers state across runs?
- How do I load a skill folder or choose relevant skills for a task?
- Why is my agent not writing memory files where I expect?
- Why did a prompt-caching or provider call fail even though the agent built successfully?
- How do I attach a marketplace prompt without hand-editing the system prompt?
Route boundaries
- If the task starts with a command such as
swarms agentorswarms setup-check, route tocli-loaders. - If the user is really asking for a workflow of multiple agents, route to
multi-agent-workflows. - If the user is mainly converting functions to tools or attaching MCP, route to
tools-mcp.
Acceptance checklist
- The response should name the relevant
Agentfields and support objects. - The answer should mention any required env vars or workspace assumptions.
- The answer should give a concrete recovery path for missing keys, missing workspace, or invalid skill directories.
- If live execution is requested, the answer should say which provider credentials are required before a model call can succeed.
04 同仓库更多 Skills
passnet-triton-opt
Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.
passnet-solve
END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.
passnet-skill
PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.
passnet-pattern-fusion
Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.
passnet-orchestrate
Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.
passnet-feedback
Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).