मुख्य सामग्री पर जाएँ
Skillpedia
एजेंट7.3k · #13288

swarms

यह क्या करती है

यह स्किल एजेंट को AI एजेंट के लिए Swarms फ़्रेमवर्क से कोड लिखना सिखाती है। यह उन डेवलपर्स के लिए है जो Python में एजेंट, टूल और कई-एजेंट वर्कफ़्लो बनाते हैं।

कब इस्तेमाल करें

  • ✓जब आप Swarms से Python में AI एजेंट बनाना चाहते हैं।
  • ✓जब आप चाहते हैं कि कई एजेंट एक तय वर्कफ़्लो में मिलकर काम करें।
  • ✓जब आपके Swarms कोड में कुछ टूट गया है और आप उसकी समीक्षा या सुधार चाहते हैं।

Skill का लिंक

https://github.com/kyegomez/swarms/blob/master/SKILL.md

इसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।

कैसे इस्तेमाल करें

सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/kyegomez/swarms/blob/master/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

AI से क्या माँगें: उदाहरण

“Python में तीन Swarms एजेंट की एक टीम बनाइए, जो रिसर्च करे, एक छोटी रिपोर्ट लिखे और फिर उसकी समीक्षा करे।”

हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।

यह कैसे काम करती है

एजेंट फ़्रेमवर्क की Agent क्लास और उसके तैयार टीम ढाँचे इस्तेमाल करता है, और फ़्रेमवर्क के नियमों व उदाहरणों का पालन करता है। जब कोई विवरण इंस्टॉल वर्शन से न मिले, तो वह ताज़ा डॉक्स जाँचता है।

तकनीकी सामग्री (मूल SKILL.md)

लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।

Swarms

Swarms is a multi-agent orchestration framework. Everything is built from one primitive — Agent — which multi-agent structures compose. This document is verified against swarms v14.0.0.

Live documentation

This skill can lag the library. When a signature here disagrees with the installed version, check the current docs:

  • Docs MCP server, no key: https://docs.swarms.world/mcp (claude mcp add --transport http swarms-docs https://docs.swarms.world/mcp)
  • Marketplace MCP server, Swarms API key for calls: https://swarms.world/mcp
  • Plain-text docs: llms.txt (index), llms-full.txt (every page)

Golden rules

  1. Import from the top level: from swarms import Agent, never from swarms.structs.agent import Agent. The one common exception is PlannerWorkerSwarm (see below).
  2. Every agent needs a unique agent_name — memory files and swarm routing key on it.
  3. Default to max_loops=1. Use a specific integer for production. Use "auto" only for genuinely open-ended work.
  4. Pass tools=None, not tools=[]. An empty list breaks schema generation.
  5. Check examples/ — 586 runnable examples live there. One is probably close to what you need.
  6. Never set streaming_on=True and streaming_callback together. Pick one.

Setup

pip install -U swarms

Set the key for whichever provider you use — any LiteLLM model string works:

export OPENAI_API_KEY="sk-..."
export ANTHROPIC_API_KEY="sk-ant-..."
export GROQ_API_KEY="..."
export WORKSPACE_DIR="agent_workspace"   # where agent state and memory land

Part 1 — The Agent

from swarms import Agent

agent = Agent(
    agent_name="Analyst",
    agent_description="Analyzes market data and produces summaries.",
    system_prompt="You are a precise financial analyst.",
    model_name="gpt-5.4",
    max_loops=1,
)

result = agent.run("Summarize the state of the semiconductor market.")

Agent.__init__ accepts 90+ parameters. These are the ones that matter:

Parameter Type Default Purpose
agent_name str "swarm-worker-01" Unique identity; keys memory + routing
agent_description str generic How orchestrators decide to route to it
system_prompt str built-in Persona and instructions
model_name str "gpt-5.4" Any LiteLLM model string
max_loops int | "auto" 1 Iterations, or autonomous mode
tools list[Callable] None Python functions the agent may call
temperature float 0.5 Sampling temperature
max_tokens int model max Output cap per call
top_p float None Nucleus sampling
context_length int None Token budget; triggers compression at 90%
output_type str "str-all-except-first" Return shape — see below
streaming_on bool False Stream tokens to stdout
streaming_callback Callable None Stream tokens to your function
interactive bool False REPL — prompts the user each loop
verbose bool False Debug logging
print_on bool True Print the final output
autosave bool False Persist agent state after each run
retry_attempts int 3 LLM call retries
reasoning_effort str None minimal/low/medium/high/xhigh/ultra/max/none
thinking_tokens int 1024 Extended thinking budget (Claude)
mcp_url / mcp_urls str / list[str] None MCP servers to load tools from
handoffs list[Agent] None Agents this one may delegate to
persistent_memory bool False Read/write MEMORY.md across restarts
context_compression bool True Auto-summarize near the context limit
plan_enabled bool False Plan before executing
mode str "standard" "standard", "fast", "interactive"
fallback_models list[str] None Models to try if the primary fails

output_type options: "str", "list", "dict", "json", "yaml", "final", "last", "all", "str-all-except-first", "dict-all-except-first", "dict-final", "list-final".

Running

agent.run(task="...")                          # standard
agent.run(task="...", img="chart.png")         # one
अक्सर पूछे जाने वाले सवाल

क्या मुझे Python का विशेषज्ञ होना चाहिए?

थोड़ी Python जानकारी मदद करती है, क्योंकि कोड Python में है। ज़्यादातर कोडिंग एजेंट करता है।

क्या कोड नवीनतम लाइब्रेरी वर्शन से मेल खाएगा?

स्किल कहती है कि लाइब्रेरी गाइड से तेज़ी से बदल सकती है, इसलिए विवरण अलग हों तो एजेंट ताज़ा डॉक्स जाँचे।

क्या यह अकेले एजेंट को भी कवर करती है?

हाँ। हर टीम एक बुनियादी एजेंट प्रकार से बनती है, इसलिए वही विचार एक एजेंट पर भी लागू होते हैं।

जानकारी

लेखक का मूल विवरण

Build agents and multi-agent systems with the Swarms framework — the Agent class, tools, autonomous loops, memory, and the 15+ multi-agent architectures (SequentialWorkflow, ConcurrentWorkflow, GraphWorkflow, HierarchicalSwarm, SwarmRouter, and more). Use whenever writing, reviewing, or debugging code that imports `swarms`.

repo: kyegomez/swarms

लोकप्रियता

GitHub स्टार
7.3k
रैंकिंग में स्थान
#13288
लाइसेंस
Apache-2.0
अपडेट की गई
2/11/2026

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

मिलती-जुलती skills