Changelog

Note

Current latest version: 2.0.0-RC1. See the GitHub release notes for the full release-by-release change list.

AgentScope Java 2.0 aims to preserve compatibility with 1.x where possible so that most users can upgrade smoothly. That said, 2.0 does introduce API-level changes. This page splits those changes into two sections:

  • Migration Guide — what changes against 1.x, in two tiers:

    • Part A · Required — your code will fail to compile or throw at runtime if you don’t migrate

    • Part B · Recommended — still works but @Deprecated(forRemoval = true); will be removed in the next minor

  • What’s New — net-new capabilities that don’t appear in the Migration Guide

Migration Guide

Part A — Required (compile errors or runtime exceptions if you don’t migrate)

Items in this section are removed, renamed, or have their semantics tightened. Code that worked on 1.x will not work as-is on 2.0.

A.1 Removed ReActAgent.Builder methods

Removed in 2.0

Replacement

.memory(Memory)

.session(Session).sessionKey(SessionKey)AgentState.getContext() holds the conversation; the configured Session saves/loads automatically on every call()

.statePersistence(StatePersistence)

Same — Session subsumes persistence

Detail → Context

A.2 Removed packages and classes

Removed in 2.0

Replacement

io.agentscope.core.session.SessionManager

Configure Session + SessionKey on the agent builder; persistence happens automatically

io.agentscope.core.pipeline.*Pipeline, Pipelines, SequentialPipeline, FanoutPipeline, MsgHub

Compose middleware + sub-agents + the event stream for multi-agent orchestration. See the subagent guide → Subagent

io.agentscope.core.model.tts.* (14 files, DashScope TTS / Realtime TTS / AudioPlayer, etc.)

Core no longer ships TTS. Integrate the upstream provider SDK directly if you need TTS

io.agentscope.core.hook.PendingToolRecoveryHook

Use Builder.enablePendingToolRecovery(boolean)

io.agentscope.core.hook.TTSHook

Removed alongside the TTS module

A.3 state package restructure (compile error)

v1

v2

AgentMetaState

AgentState

StateModule

removed — no longer a superclass for Memory, Toolkit, etc.

StatePersistence

removed — replaced by the Session abstraction

ToolkitState

Moved to io.agentscope.core.session.legacy.ToolkitState (kept for compatibility only — do not reference in new code)

(new)

Task, TaskContextState, ToolContextState, PlanModeContextState, ReadCacheEntry

Any code that imports AgentMetaState, StateModule, StatePersistence, or ToolkitState from io.agentscope.core.state will fail to compile. Detail → Context

A.4 Msg content validation is stricter (runtime exception)

Msg now validates content against role at construction time:

  • USER — only TextBlock / DataBlock / ImageBlock / AudioBlock / VideoBlock

  • SYSTEM — only TextBlock

  • ASSISTANT — unrestricted

Combinations that v1 tolerated (for example, a USER message carrying a ToolUseBlock) now throw at construction. Use the role-pinned subclasses UserMessage / AssistantMessage / SystemMessage / ToolResultMessage to make role/content compatibility obvious at the call site. Detail → Message & Event



What’s New

The capabilities below are additive in 2.0 — none of them break 1.x code. The Migration Guide above already covers the event system, message refactor, and middleware mechanism, so they are not repeated here.

Toolkit & Permission

Tool execution is the main extension surface in 2.0, and the permission system sits directly on its execution path — so we present them together.

  • Toolkit upgrades:

    • Unified base classes: ToolBase / AgentTool

    • Tool groups: ToolGroup / ToolGroupScope / MetaToolFactory — activate on demand; the reserved basic group is always on

    • Annotation-driven registration: ReflectiveFunctionTool + @Tool / @ToolParam; Toolkit#registerTool(Object) reflectively registers any annotated methods

    • Built-in task tool: io.agentscope.core.tool.builtin.TodoTools.todoWrite (pairs with TaskReminderMiddleware)

  • Permission system (new package io.agentscope.core.permission):

    • PermissionEngine, PermissionRule, PermissionMode (DEFAULT / ACCEPT_EDITS / EXPLORE / BYPASS / DONT_ASK), PermissionBehavior

    • Every tool call goes through PermissionEngine: allow / require user confirmation / deny. HITL decisions flow back as UserConfirmResultEvent.

Detail → Tool, Permission System

Model fault tolerance and credentials

  • New package io.agentscope.core.credential — 8 provider credential classes + ModelCard

  • ModelRegistry resolves models from "provider:model" strings (e.g. dashscope:qwen-max, openai:gpt-5)

  • Builder additions: .model(String), .maxRetries(int), .fallbackModel(Model) / .fallbackModel(String), .stopOnReject(boolean) — primary-model failure auto-retries and falls back

Detail → Model

Workspace (Harness module)

  • Workspace abstraction unifies local filesystem, Docker, and E2B cloud sandbox execution behind a single interface

  • Warm-up pool — pre-initialize execution environments in batches; useful for parallel RL rollouts

Detail → Workspace

Other new Builder methods

  • .enableTaskList(...) / .enableTaskList(boolean) — enable the built-in TodoTools

  • .permissionContext(PermissionContextState) — preload permission rules

  • ReActAgent.Builder.fromAgent(ReActAgent) — derive a new builder from an existing agent’s observable configuration (name, description, system prompt, model, maxIters, generateOptions, toolkit)

  • HarnessAgent.Builder.fromAgent(ReActAgent) — ReActAgent → HarnessAgent migration helper. Inherits the same 7 fields as ReActAgent.Builder.fromAgent plus every other observable configuration on ReActAgent: session / sessionKey, ModelConfig (maxRetries / fallbackModel), ReactConfig.stopOnReject, modelExecutionConfig / toolExecutionConfig / toolExecutionContext, structuredOutputReminder, enablePendingToolRecovery, checkRunning, permissionContext, middlewares, and hooks. The only flags not copied are enableMetaTool / enableTaskList — these are builder-time toolkit-mutation flags, and the toolkit copy already carries the tools they registered. Harness-only config (workspace / filesystem / subagents / skills / plan mode / disable* toggles) still has to be set explicitly. See javadoc for the full table.

  • 6 new getters on ReActAgent / parents to support the above migration: getModelExecutionConfig() / getToolExecutionConfig() / getToolExecutionContext() / isPendingToolRecoveryEnabled() / getPermissionContext() (on ReActAgent); getStructuredOutputReminder() (on StructuredOutputCapableAgent); isCheckRunning() (on AgentBase).

Detail → Agent