AgentScope 2.0: a leader agent that assigns work to a team
Added NewCopyable prompt below
Published Last verified Released
Our verdict
A solid pick if you want to build a multi-agent setup in Python rather than wire up coding CLIs: AgentScope 2.0 gives you a ReAct agent, tools (Python functions, MCP servers and skills), permission prompts, context compaction and sandboxed workspaces in one package, and its TeamPipeline is a clean leader-and-members pattern. The leader only sees each member's final reply, so its context stays small, and tasks for different members run concurrently. Limits: the pipeline module is marked experimental and its interfaces may change, the docs' examples default to Alibaba's DashScope (Qwen) models, so you will swap in another provider class if you use OpenAI, Anthropic or Ollama, and 1.x and 2.x APIs are not compatible, so check which docs you are reading.
- Who it's for
- Python developers building their own agent apps who want a lead agent to split work across specialist agents
- Leverage
- A leader that splits a task across specialists without their working steps flooding its context
- Effort
- Medium
- Date added
What it does
AgentScope (agentscope-ai/agentscope, Apache-2.0, Python 3.11+) is an agent framework first released on PyPI in February 2024; version 2.0 shipped on 25 May 2026. Its building blocks include a ReAct agent with interruption and resume, a toolkit over Python tools, MCP servers and skills, model classes for OpenAI, Anthropic, Gemini, DashScope, DeepSeek, Moonshot, xAI, Ollama and others, context compaction middleware, permission and human-in-the-loop controls, switchable long-term memory, and isolated workspaces (local, Docker, E2B, Daytona, Kubernetes and more). Its pipelines add multi-agent patterns: in TeamPipeline the leader assigns tasks to members through a TeamAssign tool call, each member works in its own context, and only its final reply comes back to the leader. Members never talk to each other directly. Newer additions include SOPs for multi-step tasks and realtime voice agents, both marked experimental.
How builders use it
- Install with uv pip install agentscope (Python 3.11+) and run the single-agent console example first to check your model credentials.
- Build a TeamPipeline: a leader with an empty Toolkit (the pipeline adds TeamAssign to it) and two or three members, each with a one-line description the leader uses to pick who does what.
- Give members tools from a LocalWorkspace (or a Docker or E2B workspace) so file and shell work stays in one folder.
- Swap DashScopeChatModel for the model class of the provider you use.
- Pin the agentscope version, since the pipeline API is experimental and may change.
What to expect
A working leader-and-team agent in about 60 lines of Python, run in a terminal console, that you can extend with your own tools and members.
Copy this: TeamPipeline: leader + researcher + coder (AgentScope 2.x, from the official docs)
# uv pip install agentscope (Python 3.11+, AgentScope 2.x)
import asyncio, os
from agentscope.agent import Agent
from agentscope.console import launch_console
from agentscope.credential import DashScopeCredential
from agentscope.model import DashScopeChatModel # swap for your provider's model class
from agentscope.pipeline import TeamMember, TeamPipeline
from agentscope.tool import Toolkit
from agentscope.workspace import LocalWorkspace
async def main() -> None:
async with LocalWorkspace(workdir="./workspace") as workspace:
model = DashScopeChatModel(
credential=DashScopeCredential(api_key=os.getenv("DASHSCOPE_API_KEY")),
model="qwen3.8-max",
)
# The leader needs a toolkit: the pipeline registers TeamAssign there
leader = Agent(name="Leader", system_prompt="You're a team leader named 'Leader'.",
model=model, toolkit=Toolkit())
researcher = Agent(name="Researcher", system_prompt="You're a researcher named 'Researcher'.",
model=model, toolkit=Toolkit(tools=await workspace.list_tools()), offloader=workspace)
coder = Agent(name="Coder", system_prompt="You're a programmer named 'Coder'.",
model=model, toolkit=Toolkit(tools=await workspace.list_tools()), offloader=workspace)
pipe = TeamPipeline(leader=leader, members=[
TeamMember(agent=researcher, description="Investigates a question and reports findings."),
TeamMember(agent=coder, description="Writes and runs code in the workspace."),
])
await launch_console(agent=pipe)
asyncio.run(main())Related discoveries
See the newest picks →- ToolMulti-Step Agent Setups
Hermes Agent: a free, self-hosted agent with skills, cron and a Kanban board
Nous Research's MIT-licensed agent that runs on your server, keeps memory and skills, runs scheduled jobs and coordinates work on a built-in Kanban board.
NewEffort: MediumPrompt#Local / BYO model#Open source
- ToolMulti-Step Agent Setups
OpenMausBot: run a team of A.I. agents from a chat app
An Apache-2.0 desktop chat app where each contact is a Claude Code, Codex or Grok agent with its own model, computer and connected apps.
Effort: MediumPrompt#Local / BYO model#Open source
- ToolMulti-Step Agent Setups
LangGraph
Low-level framework for stateful, controllable agent workflows.
Effort: High#Open source
- ToolMulti-Step Agent Setups
CrewAI
An open-source Python framework for role-based agent crews, plus Flows for step-by-step control.
Effort: Medium#Open source
Get the best new A.I. picks in your inbox
The best new agent workflows and tools we’ve vetted, with a clear verdict on each. Short, occasional, useful.