AgentScope
Type: full-code · Vendor: Alibaba ModelScope · Language: Python · License: Apache-2.0 · Status: active · Status in practice: emerging
Provide a production-ready agent framework with built-in ReAct agent, MsgHub for multi-agent message routing, MCP/A2A integration, real-time steering via hooks, structured output, and short/long-term memory.
Description. AgentScope is Alibaba ModelScope's Apache-2.0 Python framework billed as 'Build and run agents you can see, understand and trust.' It ships a ReActAgent out of the box (sync/async tools, streaming, hooks, structured output, configurable long-term memory), a Toolkit registry, MCP client transports (stdio / SSE / streamable HTTP), an MsgHub for multi-agent message routing, and OpenTelemetry-based observability for local, serverless, or Kubernetes deployment.
Agent loop shape. ReAct loop wrapped with hook points. A ReActAgent assembles formatted prompt + memory + registered tool schemas, the model emits reasoning plus tool calls or a final reply, tools are dispatched through a Toolkit (in-process functions or MCP-backed via stdio/HTTP/SSE clients), and results are appended to memory. Hooks fire pre/post each step, enabling interrupts and structured-output validation. Multi-agent topologies are expressed by chaining agents through an MsgHub that routes messages.
Primary use cases
- ReAct-style single-agent assistants with tool use
- multi-agent orchestration via MsgHub message routing
- MCP-integrated agents over stdio / SSE / streamable HTTP
- human-in-the-loop steering through real-time user interrupts
- OTel-instrumented production deployment
Key concepts
- ReActAgent → react (docs) — Out-of-the-box ReAct agent supporting sync/async tools, streaming responses, hooks, structured output, and configurable long-term memory.
- Toolkit → tool-use (docs) — Registry that registers tool functions for an agent; tools can be backed by MCP clients.
- MCP clients → mcp (docs) — HttpStatefulClient / StdIOStatefulClient / HttpStatelessClient transports; stateless clients create per-call sessions.
- MsgHub → orchestrator-workers — Message hub for flexible multi-agent orchestration and workflows.
- Long-term memory modes → cross-session-memory — agent_control / static_control / both — determine whether the agent self-manages memory or runtime auto-records.
- OTel observability — Built-in OpenTelemetry instrumentation for local, serverless, or Kubernetes deployment.
Patterns this full-code implements —
- ★★ReAct
ReActAgent is shipped as a top-level class; users register tools on a Toolkit and pass it to the agent.
- ★★Tool Use
Tools are registered on a Toolkit instance via register_tool_function(); supports sync and async tools.
- ★★Model Context Protocol
Stateful and stateless MCP clients for HTTP / streamable HTTP / SSE / stdio transports; register an entire server or individual functions.
- ★★Human-in-the-Loop
Hooks expose pre/post step points and the ReActAgent supports real-time steering with user interrupts.
- ★★Orchestrator-Workers
MsgHub routes messages between multiple agents for flexible multi-agent orchestration.
- ★★Structured Output
ReActAgent supports structured output as a documented capability of the agent.
- ★★Cross-Session Memory
long_term_memory_mode = agent_control | static_control | both — the agent persists memory across sessions either by self-management or runtime auto-record.
- ★Browser Agent
AgentScope ships a Browser-use Agent example linked from the README; not a first-class core abstraction.
- ★★Agentic RAG
RAG and Long-Term Memory are shipped as functionality examples linked from the README; no first-class RAG-Agent class documented in the quickstart.
- ★★Supervisor
The Meta Planner Agent example documents a planner that decomposes complex tasks and orchestrates sub-agents — AgentScope's closest analogue to a built-in supervisor.
- ★★Plan-and-Execute
Planning is listed among built-in capabilities; a Plan example and a Meta Planner Agent example ship from the README.
- ★Conversational Multi-Agent
Multi-agent message routing via MsgHub structurally resembles conversational multi-agent systems; AgentScope does not adopt the AutoGen ConversableAgent vocabulary. No verbatim upstream quote uses th…
- ·Debate
Multi-agent debate is shipped as a workflow example simulating a multi-turn discussion between several solvers and an aggregator.
- ★Agent-as-Tool Embedding
Agent-as-Tool is a documented multi-agent abstraction: agents can be registered as tools callable by other agents via the Toolkit class.
Neighbourhood
Click any neighbour to follow the lineage. Scroll to zoom, drag to pan.