[KongchangAI]
· 3 min read· 1,519 words

AgentScope 2.0 Framework Deep Dive: From Toy to Industrial-Grade Agent Development

AgentScope 2.0 Framework Deep Dive: From Toy to Industrial-Grade Agent Development

AgentScope 2.0 is a breaking upgrade whose six improvements push agents toward industrial-grade production.

Alibaba Tongyi Lab's open-source AgentScope reaches 2.0 with breaking API changes—1.0 code cannot migrate directly. The release makes six systematic improvements for production: typed events, dangerous-instruction interception, human-in-the-loop, concurrency and context optimization, workspaces, and REST service hosting. The article also explains the ecosystem's layered architecture and the two main agent design paradigms, ReAct and Plan-and-Execute.

Alibaba Tongyi Lab's open-source AgentScope framework has reached version 2.0, marking a leap from a "toy" to an "industrial-grade product" compared to 1.0. According to hands-on testing shared by a Bilibili creator, 2.0 delivers significant improvements in both development experience and production readiness—so much so that it "can absolutely be put into real production use." Based on the core content of that tutorial, this article reviews AgentScope 2.0's key improvements, architecture design, and the two mainstream paradigms for building agents.

Breaking Upgrade: 1.0 Code Cannot Migrate Directly

AgentScope 2.0 is not a smooth iteration but a breaking change—the API has undergone major changes, and 1.0 code cannot run directly on 2.0. This means developers building agents today should adopt 2.0 directly rather than investing effort in 1.0.

According to the creator, version 1.0 was released last September and had limited usability at the time—more of an experimental product. 2.0 has a clear goal: improve the development experience and make agents easier to build and run in production environments.

Illustration of major API changes

Six Core Improvements: From Event System to Agent Service Hosting

AgentScope 2.0 introduces systematic upgrades across six areas, each targeting real pain points in production environments.

1. Typed Event System

Every operation in the framework—text output, thinking process, tool calls, tool results—is exposed as a typed event. This design allows developers to monitor and debug agent behavior with greater precision instead of facing a black box.

Typed Events are a design technique in event-driven architecture: every state change or action in the system is modeled as an object with an explicit type (schema), rather than loose string logs or unstructured callbacks. Each event type corresponds to a fixed set of fields, which consumers can use for pattern matching, serialization, and validation. In agent frameworks, typed events turn internal behaviors such as reasoning and tool calls into observable streaming data, which facilitates both real-time front-end rendering and log replay and fault localization. Compared with 1.0's reliance on hooks to assemble output, this design reduces coupling and makes event delivery more reliable in distributed deployments.

2. Execution Safety and Dangerous Instruction Interception

Large models are fundamentally probabilistic and cannot be guaranteed to be 100% correct. When a model hallucinates and requests execution of a dangerous instruction (such as deleting system files), direct execution by the agent could crash the system. 2.0 introduces a dangerous-instruction interception mechanism to ensure robust system operation.

3. Human-in-the-loop

Users can confirm or modify tool parameters during execution, and sensitive operations can be handed off to custom backends. The creator cites payments and transfers as examples: such operations must go through human review, otherwise a model error could cause real financial loss. The system pauses precisely at such points and waits for human confirmation before continuing.

Human-in-the-loop (HITL) refers to introducing human confirmation, correction, or takeover at key nodes of an automated workflow—a common safety mechanism in high-risk agent systems. In engineering terms, it typically relies on checkpointing and resumption: the framework suspends execution before invoking a sensitive tool, persists the current state, waits for a human to approve, modify parameters, or reject via an API or UI, and then resumes from the breakpoint. This is the same underlying capability as interruptible, resumable persistent sessions, used in two different ways—which also explains why 2.0 lists session persistence as a core feature of service hosting.

4. Execution Efficiency Optimization

Multi-tool, multi-step tasks are accelerated through concurrent execution; long conversations are automatically kept within the context window; large tool outputs no longer blow up the prompt; and transient model-provider failures fall back gracefully. These improvements directly boost stability and throughput in production.

5. Workspace System

This is a feature the creator calls "a big improvement": agents can be migrated from local to cloud or container environments without changing a single line of code. This solves the common "works locally, breaks in the cloud" environment-consistency problem.

Workspace system improvements

6. Agent Service Hosting

Host any agent via REST API, with support for multi-tenancy and concurrent sessions, built-in interruptible and resumable persistent sessions, plus scheduled tasks and rate management. Developers no longer need to build service scaffolding themselves, lowering the barrier from development to deployment.

Architecture Breakdown: An Ecosystem Composition, Not a Single Framework

AgentScope 2.0's architecture diagram looks complex but can be understood in layers. At the core is the middleware layer, which supports the application layer above and connects to the environment below, while integrating various model providers (such as GLM, DeepSeekAd, Gemini, Zhipu, OpenAI, Qwen, etc.) and supporting tools.

One clarification: not all components in the ecosystem are developed by Alibaba Tongyi Lab—only the core is their contribution, while the rest combines with external tools to form a complete ecosystem. This open composition approach is also why the framework can quickly cover multiple models and scenarios.

Agent architecture illustration

Agent Design Patterns: ReAct and Plan-and-Execute

Agents are complex software systems, and running them robustly requires following mature design paradigms. The creator highlights two patterns.

ReAct: Interleaving Reasoning and Acting

ReAct is not the front-end framework React but a portmanteau of Reasoning and Acting—an agent-building paradigm, not a specific framework. Its core idea mimics how humans solve problems: think first, then act, observe the result, and adjust the next round of thinking and action based on that result.

Take querying the latest AI news as an example: the model first thinks "I need to search for recent AI news," then calls a search tool, and observes the returned results; if the news is irrelevant, it reflects and refines the prompt, searches again, filters, observes again, and loops until requirements are met, finally organizing the output.

This "do one step, see the result, adjust the next step" loop is the most mainstream pattern for building agents today, and AgentScope itself is built on this paradigm.

ReAct loop example

ReAct was first proposed by Shunyu Yao et al. in a 2022 paper. Its full name is Reasoning and Acting, and its core is to interleave the model's reasoning traces (thought), tool-call actions (action), and environment observations (observation) into the same context, so the model decides the next step based on the latest observation. What distinguishes it from pure Chain-of-Thought is the introduction of an external feedback loop; what distinguishes it from pure tool calling is the explicit retention of the reasoning process. Frameworks like AgentScope typically implement this loop as a state machine of "model output parsing—tool dispatch—result backfill," with termination determined by the model giving a final answer or reaching a step limit.

Plan-and-Execute: Plan First, Execute Later

Unlike ReAct's interleaved execution, Plan-and-Execute (PE) has two distinct phases. In the planning phase, a powerful LLM fully analyzes the task and produces a detailed multi-step action plan; this plan is complete before execution begins and is static. In the execution phase, the pre-defined plan is followed step by step, invoking tools such as search engines, code interpreters, and APIs to complete each step.

Only after the entire plan is executed or a major obstacle is encountered might the planning process restart. This pattern suits scenarios with clear task boundaries and pre-determinable steps, whereas ReAct is better for exploratory tasks requiring dynamic adjustment.

Plan-and-Execute draws on task decomposition and planning research and was also advanced by early implementations such as BabyAGI and the LangChain Plan-and-Execute Agent. It decouples "figuring out what to do" from "doing it": the planner (usually a stronger, more expensive model) produces a list of steps in one pass, and the executor (which can use a lighter model) invokes tools step by step. Different models can be chosen to balance cost and quality. The trade-off is a static plan with weak adaptability to surprises during execution, so in practice it is often paired with replan triggers—for example, reverting to the planning phase when a step fails repeatedly or observations deviate too far from expectations.

Practical Significance

From the creator's experience, AgentScope 2.0 has clearly shifted toward industrial-grade production. The event system, safety interception, human-in-the-loop, concurrency optimization, workspace isolation, and service hosting together cover the full agent lifecycle from development and debugging to deployment and operations. For teams evaluating multi-agent frameworks, version 2.0 deserves serious consideration as a production candidate.

One-line Summary

AgentScope 2.0 is a breaking upgrade whose six improvements push agents toward industrial-grade production.

Paragraph Summary

Alibaba Tongyi Lab's open-source AgentScope has reached version 2.0 with breaking API changes—1.0 code cannot migrate directly, so developers should adopt the new version. 2.0 makes six systematic improvements around production pain points: a typed event system, dangerous-instruction interception, human-in-the-loop, concurrency and context optimization, a workspace system, and REST service hosting. Architecturally, AgentScope's core is only part of a broader ecosystem, with model providers and tools integrated through open composition—not all developed by Tongyi Lab. The article also covers two mainstream agent design paradigms: ReAct emphasizes an interleaved reasoning-acting loop for exploratory tasks needing dynamic adjustment, while Plan-and-Execute plans statically first and then executes strictly for scenarios with fixed steps. Overall, 2.0 covers the full lifecycle from development and debugging to deployment and operations.

#AgentScope 2.0#multi-agent framework#ReAct#Plan-and-Execute#human-in-the-loop#Alibaba Tongyi Lab
Share:

Related articles