█

AI/TLDR

मुझे पिलाएं कॉफ़ी
मुझे एक कॉफ़ी पिलाएँ

AgentScope

प्रोडक्शन में चलने वाले मल्टी-एजेंट ऐप्स बनाने के लिए एक Python फ़्रेमवर्क

Multi-Agent Systemsओपन सोर्स
भाषा
Python
लाइसेंस
Apache-2.0
$uv pip install agentscope
संक्षेप में

AgentScope क्या है?

AgentScope प्रोडक्शन में चलने वाले मल्टी-एजेंट ऐप्स बनाने के लिए एक Python फ़्रेमवर्क. यह Agents & Automation टूल्स की Multi-Agent Systems श्रेणी में आता है; ओपन सोर्स है, Python में लिखा गया है और Apache-2.0 लाइसेंस के तहत है। शुरू करने के लिए: agentScope इंस्टॉल करें.

सारांश

AgentScope एक ओपन सोर्स Python फ़्रेमवर्क है, जिससे बड़े भाषा मॉडल (LLM) के ऊपर एजेंट और मल्टी-एजेंट ऐप्स बनाए जा सकते हैं। संस्करण 2.0 प्रोडक्शन इस्तेमाल पर केंद्रित है। इसके abstractions ऐसे डिज़ाइन किए गए हैं कि वे टूल इस्तेमाल करने वाले, लगातार सक्षम होते मॉडलों के साथ मिलकर काम करें, न कि उन्हें कठोर prompts और orchestration से बाँधें।

यह उन Python डेवलपर्स के लिए है जिन्हें एक ही chatbot loop से ज़्यादा चाहिए: ऐसे एजेंट्स की टीमें जो आपस में तालमेल बिठाएँ, टूल कॉल करें और कोड चलाएँ। यह फ़्रेमवर्क मॉडल की अपनी reasoning और tool-use क्षमताओं पर निर्भर करता है। यह एजेंट के reason-act loop को एक एकीकृत event stream के ज़रिए सामने लाता है, जिसे आप UI या human-in-the-loop चरण से जोड़ सकते हैं।

मल्टी-एजेंट सिस्टम के क्षेत्र में AgentScope वे ऑपरेशनल हिस्से जोड़ता है जिनकी प्रोडक्शन में लाने के लिए आपको ज़रूरत होती है: टूल्स पर बारीक नियंत्रण के लिए एक परमिशन सिस्टम, workspace sandboxes (local, Docker या E2B), composable middleware, और isolation के साथ एजेंट सर्व करने के लिए एक मल्टी-टेनेंसी, मल्टी-सेशन एजेंट सर्विस।

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

  • Event system: एक एकीकृत event bus जो एजेंट की reasoning और actions को frontend तक स्ट्रीम करता है और human-in-the-loop को सपोर्ट करता है
  • Permission system: बारीक, कॉन्फ़िगर करने योग्य नियंत्रण कि एजेंट कौन-से tools और resources इस्तेमाल कर सकता है
  • Workspace और sandbox सपोर्ट: tools और कोड को अलग-थलग (isolated) वातावरण में चलाने के लिए, local, Docker और E2B बैकएंड के साथ
  • Multi-tenancy और multi-session एजेंट सर्विस: tenants और sessions के बीच isolation के साथ प्रोडक्शन-स्तर की सर्विंग के लिए
  • Extensible middleware: एजेंट के reasoning-acting loop को कस्टमाइज़ और बढ़ाने के लिए composable hooks
  • Built-in toolkit: Bash, Grep, Glob, Read, Write और Edit जैसे file और shell tools, साथ ही worker agents को coordinate करने के लिए एक Agent Team फ़ीचर

शुरू करें

AgentScope के लिए Python 3.11 या उससे ऊपर का संस्करण ज़रूरी है। इसे PyPI से इंस्टॉल करें, फिर अपना पहला एजेंट बनाएँ और उसके events स्ट्रीम करें।

AgentScope इंस्टॉल करें

uv या pip के ज़रिए PyPI से पैकेज इंस्टॉल करें।

bashbash
uv pip install agentscope
# or
# pip install agentscope

अपने model credentials सेट करें

क्विकस्टार्ट में DashScope इस्तेमाल होता है, इसलिए वह API key export करें जिसे model client environment से पढ़ता है।

bashbash
export DASHSCOPE_API_KEY=your_api_key

एजेंट बनाएँ और चलाएँ

एक model और toolkit के साथ Agent बनाएँ, फिर reply_stream से मिलने वाले event stream पर iterate करें और एजेंट का आउटपुट हैंडल करें।

pythonpython
from agentscope.agent import Agent
from agentscope.tool import Toolkit, Bash, Grep, Glob, Read, Write, Edit
from agentscope.credential import DashScopeCredential
from agentscope.model import DashScopeChatModel
from agentscope.message import UserMsg
from agentscope.event import EventType

import os, asyncio

async def main() -> None:
    agent = Agent(
        name="Friday",
        system_prompt="You're a helpful assistant named Friday.",
        model=DashScopeChatModel(
            credential=DashScopeCredential(
              api_key=os.environ["DASHSCOPE_API_KEY"]
            ),
            model="qwen3.6-plus",
        ),
        toolkit=Toolkit(
            tools=[Bash(), Grep(), Glob(), Read(), Write(), Edit()]
        ),
    )

    async for evt in agent.reply_stream(UserMsg("Tony", "Hi, Friday!")):
        match evt.type:
            case EventType.TEXT_BLOCK_DELTA:
                ...
            # Handle other event types

asyncio.run(main())

कमांड और कोड प्रोजेक्ट के अपने दस्तावेज़ों से लिए गए हैं — हमेशा जांचें आधिकारिक repo ताज़ा जानकारी के लिए।

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

  • एजेंट्स की एक टीम बनाएँ, जहाँ एक leader built-in team tools के ज़रिए worker agents को spawn और coordinate करता है
  • एक मल्टी-टेनेंट, मल्टी-सेशन FastAPI सर्विस और पहले से बने web UI के ज़रिए कई users को एजेंट्स सर्व करें
  • एजेंट द्वारा बनाए गए कोड और tool calls को local, Docker या E2B sandboxes के अंदर सुरक्षित रूप से चलाएँ
  • एजेंट की reasoning और tool calls को frontend में स्ट्रीम करें, जिसमें human-in-the-loop approval परमिशन सिस्टम के नियंत्रण में हो

How AgentScope compares

AgentScope alongside other open-source multi-agent systems tools AI/TLDR tracks, ranked by GitHub stars.

टूलस्टारयह क्या करता है
Paperclip★ 119kएक सेल्फ-होस्टेड कंट्रोल प्लेन, जो AI एजेंट्स की टीम को कंपनी की तरह चलाता है, जिसमें ऑर्गनाइज़ेशन चार्ट, टास्क, बजट और अप्रूवल शामिल हैं
Ruflo★ 82.8kClaude Code और Codex के लिए एक एजेंट मेटा-हार्नेस
MetaGPT★ 71.6kएक multi-agent framework जो एक ही prompt से पूरी LLM-आधारित software company का काम करता है
AutoGen★ 62kऐसे multi-agent AI apps बनाएं जिनमें agents एक-दूसरे, tools और इंसानों के साथ बातचीत करें
CrewAI★ 61.4kRole-playing AI agents की टीमें बनाएं जो काम बांटें और एक लक्ष्य के लिए मिलकर काम करें
AgentScope★ 37.1kप्रोडक्शन में चलने वाले मल्टी-एजेंट ऐप्स बनाने के लिए एक Python फ़्रेमवर्क
OpenAI Agents SDK★ 31kMulti-agent workflows बनाने के लिए tools, handoffs और guardrails वाला हल्का Python SDK
A2A★ 26.8kअलग-अलग frameworks के बीच agent discovery और collaboration के लिए खुला Agent2Agent protocol