All Classes and Interfaces

Class
Description
Base class for visibility filters that should ONLY constrain agent-authored skills.
Abstract base implementation of Sandbox with the 4-branch workspace start logic.
Abstract filesystem API for agents: list, read, write, edit, grep, glob, upload, download.
Filesystem abstraction that adds shell command execution (sandbox or remote host).
Tool that generates a new subagent spec from a natural-language description and either persists it to subagents/<name>.md (where DynamicSubagentsMiddleware will pick it up on the next reasoning step) or returns the markdown for human review.
Minimal HTTP client for the internal AgentScope task protocol (POST/GET /tasks/...).
RemoteSubagentTransport backed by the Agent Protocol HTTP client.
Simple subagent tool for agent-internal use.
Loads SubagentDeclaration instances from Markdown files with YAML front matter placed in the subagents/ directory of a workspace.
Observability middleware that logs the reasoning and execution trace of an agent.
Visible only when the agent-created skill's name is in the allow-list.
A single artifact delivery request issued by the deliver_artifact tool.
SPI for delivering artifacts produced by an agent (typically inside a sandbox) to a destination outside the agent filesystem — the host, a project artifact store, an object store, WebDAV, etc.
Agent-callable deliver_artifact tool: downloads a file from the agent filesystem (e.g. a sandbox workspace) and delegates the transport to a configured ArtifactDeliveryTarget.
Middleware that offloads long-running tool calls to background execution.
Tracks the lifecycle of an async tool execution that has been offloaded to the background.
Registry for tracking async tool executions that have been offloaded to the background.
Expands @path references in user messages by reading the referenced files through the active AbstractFilesystem and appending an <attached_file> block at the end of the message.
Wraps a CompletableFuture to track background subagent task execution with status, result, error, and lifecycle metadata.
Filesystem wrapper that substitutes a fixed RuntimeContext on every delegated call, ignoring whatever RC the caller supplies.
Abstract interface for a namespace-based key-value store.
Declares a host directory (or file on Kubernetes) bind-mounted into the sandbox workspace at the map key path under WorkspaceSpec.getRoot().
A single entry read from a MessageBus queue or log.
Percentage-based rollout for agent-authored skills.
Channel adapter — ingests inbound messages from one messaging platform (or a programmatic caller), routes them through ChannelRouter to resolve the target agent and session, and delegates execution to Gateway.
One routing rule that maps a set of inbound-message conditions to a target agentId.
Per-channel routing configuration: default agent fallback, DM session scope, and ordered binding rules evaluated by ChannelRouter.
 
Constructs a Channel instance from the resolved routing config and provider-specific properties.
Registry and lifecycle manager for Channel adapters.
Resolves the target agentId and stable MsgContext for an InboundMessage by evaluating ChannelBinding rules in deterministic priority order.
Inputs available to a ChannelRuntimeContextResolver when resolving caller context for a Gateway turn.
Resolves a caller-provided RuntimeContext for a Channel / Gateway turn.
Default Channel implementation for direct Chat UI interactions: no external transport, no webhook, no websocket — the caller submits a ChatUiRequest programmatically and receives the agent reply reactively.
Request object for ChatUiChannel.
Configuration for conversation compaction (summarization).
 
Configuration for aggregate tool-result pruning.
 
Configuration for the lightweight argument-truncation pass that runs before summarization.
 
Middleware that performs conversation compaction before each LLM reasoning call.
Routes file operations to different AbstractFilesystem stores by path prefix.
Chains multiple SkillVisibilityFilters with AND semantics: the output is the intersection of every filter's output, applied in order.
Algorithm
Pure agent factory and invoker — knows how to create agents from registered factories and invoke them with a prompt.
Layout entry that creates a directory, optionally with nested child entries.
One-stop configuration for distributed and persistent storage components.
Builder for composing a DistributedStore from individual components.
A distributed store composed from individually specified components.
Controls how DM (PeerKind.DIRECT) session keys are scoped.
Sandbox filesystem spec for Docker store.
Docker Sandbox that runs commands in a container.
SandboxClient implementation for the Docker sandbox store.
Configuration options for the Docker sandbox client.
Serializable state for a Docker-backed Sandbox.
Dynamic counterpart to SubagentsMiddleware that re-resolves the registered subagent set on every reasoning step, supporting per-user isolation through the workspace AbstractFilesystem (e.g.
Result of a file edit (string replacement) operation.
Filter that admits a skill only when its sidecar's environments list contains the configured environment (prod, staging, …).
Result of a sandbox command execution.
Result of code/shell execution.
Data structure for storing file contents with metadata.
Result of a single file download operation.
Layout entry that creates a file with inline text content.
Structured file listing info.
File system tools backed by a AbstractFilesystem, exposing read/write/edit/grep/glob operations as agent-callable tools.
TranscriptStore backed by a local / NAS filesystem directory.
Shared utility functions for filesystem implementations.
Result of a single file upload operation.
Gateway-style entrypoint: route inbound turns by MsgContext, and bind the primary HarnessAgent for announce delivery.
Multi-agent + channel routing bootstrap.
 
Layout entry that clones a Git repository into the sandbox workspace.
Result from abstract filesystem glob operations.
A single match from a grep search.
Result from abstract filesystem grep operations.
HarnessAgent is the user-facing harness API that wraps a ReActAgent with workspace / filesystem / sandbox / subagent / skill / plan-mode / MCP orchestration.
Builder for HarnessAgent.
Default Gateway implementation.
Harness platform / orchestration tool names that ToolFilter must not strip via an allow list.
Marker for middleware installed by harness runtime wiring.
Registers Jackson polymorphic subtypes for SandboxState.
Per-call wrapper around an AgentSkill carrying harness-only metadata that does not belong on the core data type.
Harness-native skill middleware.
Normalized inbound message produced by a Channel adapter before routing.
 
Middleware that drains the message bus inbox before each reasoning step and injects the messages as HintBlocks into the agent's context.
Thread-safe in-memory implementation of BaseStore.
Default single-process SubagentRegistry.
Controls how agent state is isolated and shared across calls.
Optional marker for AgentSkillRepository implementations that can supply a SkillResources accessor in addition to the in-memory AgentSkill.resources map.
Single-replica HITL gate.
 
Layout entry that recursively copies a directory from the host filesystem into the sandbox workspace.
Layout entry that copies a single file from the host filesystem into the sandbox workspace.
AbstractFilesystem implementation that reads and writes files on the local disk.
Specification for the local filesystem mode (with shell execution).
Filesystem with unrestricted local shell command execution.
Path-resolution policy mode for host-rooted filesystems (LocalFilesystem and friends).
JVM-local PeriodicGate backed by a process-wide ConcurrentHashMap and CAS updates.
Snapshot that persists workspace archives as tar files on the local filesystem.
Process-local fair per-key mutual exclusion for gateway turns.
Snapshot spec that creates LocalSandboxSnapshot instances stored in a local directory.
TeamClient backed by BaseStore CAS (Claude file-lock equivalent).
Result from abstract filesystem ls (directory listing) operations.
Materialises non-workspace skill resources (Layer 1 / Layer 2 / marketplace) to <wsRoot>/.skills-cache/<source-ns>/<skill-name>/ so that: shell-mode HarnessAgents (sandbox or Local-with-shell) can execute the staged scripts via absolute paths sandbox projection (which includes .skills-cache in DEFAULT_WORKSPACE_PROJECTION_ROOTS) hydrates the staged content into the sandbox at start time
Pairs a skill with the repository that produced it.
Outcome of staging one skill.
Skill staged under .skills-cache/<sourceNs>/<skillName>/.
No staging applied — skill source has no shell-reachable representation.
Skill comes from WorkspaceSkillRepository (already in workspace/skills/).
A connection failure whose public message never contains endpoint credentials.
One MCP server entry under mcpServers.<name> in tools.json.
Registers MCP servers declared under mcpServers in workspace/tools.json into a Toolkit.
Receives the terminal result of an MCP server registration attempt.
Terminal result of registering one MCP server entry.
Terminal status of an MCP server registration attempt.
Tracks in-flight fire-and-forget memory background tasks (flush, maintenance) so HarnessAgent.close() can wait for them to quiesce before releasing resources.
Unified configuration for the long-term memory pipeline (flush + consolidation + maintenance).
 
Strategy for the per-call flush hook.
Trigger policy for MemoryFlushMiddleware.
LLM-based consolidation of daily memory ledgers into the curated MEMORY.md.
Manages memory flush operations: extracting long-term memories from a conversation window and appending them to today's daily memory ledger.
Middleware that triggers memory flush and message offload at the end of each agent call.
Tool for reading specific lines from memory files, typically used after MemorySearchTool to fetch surrounding context.
Middleware that performs periodic memory maintenance after each agent call.
Dedicated tool for persisting user memories to both MEMORY.md and today's daily ledger (memory/YYYY-MM-DD.md).
Tool for searching through persisted memories (MEMORY.md and memory/*.md files).
Live message transport for coordinating work across sessions and processes.
Routing context for inbound turns (direct API, channel adapter, group/room/thread).
Factory that produces a namespace tuple for BaseStore operations at call time.
No-op snapshot that does not persist anything.
Snapshot spec that creates NoopSandboxSnapshot instances.
Pushes SkillCandidate metadata to an external system (Slack webhook, ticket service, Nacos config item, …).
Multi-replica gate.
TranscriptStore that writes immutable segment objects through AbstractFilesystem (S3/OSS/NAS/sandbox backends that implement upload).
Delivery target for outbound (proactive) messages.
A buffered proactive outbound message delivered to ChatUiChannel by the gateway.
A layered filesystem that overlays a user-specific "upper" layer on top of a shared "lower" layer, providing copy-on-write semantics.
Immutable allow-list of host directories that LocalFsMode.ROOTED accepts for absolute paths.
Identifies the conversation peer: who or what is being messaged (a user DM, a channel, a group, or a thread).
Classification of the conversation peer, used for session key construction and DM-scope resolution.
Coordinates periodic background work across callers (and optionally across nodes) using a minimum-gap throttle.
SandboxBackedFilesystem that holds a fixed Sandbox reference for the lifetime of the instance.
Coordinates plan mode for a single agent.
Enforces plan mode: while AgentState.planModeContext.planActive is true, mutating tool calls are denied so the agent can only read / investigate and draft a plan.
The three model-facing tools that drive plan mode, all backed by a shared PlanModeManager.
plan_enter: enter read-only plan mode.
plan_exit: request approval, then leave plan mode for BUILD.
plan_write: create / overwrite the plan markdown file.
Overlay variant that routes writes to the project directory for non-workspace paths, while keeping workspace metadata (memory, sessions, skills, etc.) in the upper (workspace) layer.
Convenience tool that lets the agent propose a brand-new skill in one call: name + description + body + optional scripts.
Result from abstract filesystem read operations.
Always returns SkillPromotionGate.PromotionDecision.Defer — promotion can only happen via an explicit HarnessAgent.promoteSkill(...) call from outside the gate.
Stable Protocol DTO for remote subagent event streaming.
Policy for resolving a remote subagent's tool-confirmation (HITL) requests when the parent cannot forward the decision to an interactive human within this call.
User decision for a remote pending tool confirmation.
Bidirectional mapping between internal AgentEvents and stable RemoteAgentEvent wire DTOs.
Stable wire event types for remote subagent streaming over Agent Protocol.
AbstractFilesystem backed by a BaseStore (persistent, cross-thread).
Specification for the non-sandbox "composite" filesystem mode.
A single remote tool call awaiting user confirmation (HITL).
Snapshot backed by a RemoteSnapshotClient (e.g.
User-implemented interface for uploading and downloading snapshot archives to/from remote storage (e.g.
Snapshot spec that creates RemoteSandboxSnapshot instances backed by a RemoteSnapshotClient.
How much of a remote subagent's event stream the caller wants, sent as context.detail.
Placeholder Agent for remote subagents.
Transport abstraction for remote subagent execution (Agent Protocol today; A2A later).
Context sent with a remote task submission (permissions, streaming preferences, parent identity).
 
Remote endpoint identity: base URL plus optional auth/routing headers.
Status snapshot returned by the remote task HTTP API (GET /tasks/{taskId}).
Prefix-routed filesystem that preserves shell execution on the primary sandbox backend.
Output of ChannelRouter.resolveRoute(io.agentscope.harness.agent.gateway.channel.ChannelConfig, io.agentscope.harness.agent.gateway.channel.InboundMessage): the resolved agent id, the MsgContext to pass to Gateway.run(io.agentscope.harness.agent.gateway.MsgContext, java.util.List<io.agentscope.core.message.Msg>), a diagnostic matchedBy label indicating which binding tier (or fallback) produced the result, and the OutboundAddress for delivering replies back to the originating channel/peer.
An active sandbox with a fully isolated workspace.
Result of acquiring a Sandbox from SandboxManager.
Marks a filesystem that can have its backing Sandbox injected at runtime.
A BaseSandboxFilesystem that delegates execution to a live Sandbox.
Factory for creating and resuming Sandbox instances.
Base class for sandbox client configuration options.
Immutable configuration for sandbox behavior.
 
Error codes for sandbox operations, used in SandboxException and its subclasses.
Base exception for all sandbox operations.
Thrown when a sandbox command exits with a non-zero exit code.
Thrown when a sandbox command times out.
Thrown when sandbox configuration is invalid or missing (e.g. no client configured).
Thrown for general sandbox runtime failures not covered by a more specific subclass.
Thrown when a snapshot operation (persist or restore) fails.
Thrown when the workspace backend fails to start.
Thrown when the workspace backend fails to stop.
Pluggable concurrency guard for sandbox execution slots.
Singleton no-op implementation.
Declarative sandbox filesystem configuration.
Optional capability for Sandbox backends that support native (non-exec) file transfer, e.g. a dedicated HTTP upload/download API exposed by the sandbox runtime.
Immutable key that uniquely identifies a sandbox state slot for a given IsolationScope.
A handle that represents a held execution right on a sandbox isolation slot.
Singleton no-op implementation.
Middleware that manages the sandbox session lifecycle around each agent call.
Manages the lifecycle of Sandbox instances for the current call.
Represents a persisted snapshot of a sandbox workspace.
Factory that creates SandboxSnapshot instances for a given session ID.
Serializable state of a sandbox, persisted by SessionSandboxStateStore so a sandbox can be resumed across calls.
Routing identity for ChatUiChannel requests.
Base class for all session tree entries (pi-mono-inspired JSONL session model).
Non-destructive compaction marker.
A message entry wrapping a conversation turn (user/assistant/system), or a placeholder when the message had no renderable text/tool blocks (e.g. image-only).
Holds the text of a compaction summary (the condensed version of compacted messages).
Structured tool-result record, paired with SessionEntry.ToolUseEntry via toolCallId.
Structured tool-call record.
Evaluates whether a session is still "fresh" or should be reset.
Deterministic session-ID derivation.
Sandbox state store backed by the generic AgentScope AgentStateStore abstraction.
Tool for searching past session transcripts and viewing session history.
Independent writer for the session transcript JSONL (.jsonl / .log.jsonl).
Manages an append-only JSONL session tree (pi-mono-inspired).
Per-key mutual exclusion for gateway turns (user/channel inbound runs and subagent notification).
Shell execution tool backed by a AbstractSandboxFilesystem.
Resolves the absolute filesRoot path emitted in <available_skills> and load_skill_through_path responses, given a skill's MarketplaceStager.StageResult and the current shell mode.
 
Append-only audit log for the skill self-learning loop.
A single audit row.
Material handed to a SkillPromotionGate when a draft skill is being considered for promotion.
 
Immutable snapshot of the skills visible to a single onSystemPrompt pass.
Background skill maintenance orchestrator.
 
 
Configuration knobs for SkillCurator.
 
 
Schedules SkillCurator runs after the main call() completes.
Persistent state for SkillCurator — kept in skills/.curator_state.json.
The harness-native load_skill_through_path AgentTool.
Configuration for SkillManageTool.
 
Agent-callable tool that lets a ReActAgent create, edit, patch, and archive skills in its workspace.
Orchestrates the promotion pipeline: locate draft → run security scan → call gate → physically move _drafts/<name>/ to skills/<name>/ → update sidecar.
 
 
Decides whether a draft skill is allowed to be promoted into the live skills directory.
Final outcome of a gate review.
 
 
 
Renders the harness <available_skills> system-prompt block from a SkillCatalog.
Lazy resource accessor for a single skill.
Aggregates the singleton SkillLoadTool and the SkillPromptBuilder.
Static-analysis scanner for SKILL.md and skill support files.
 
 
 
 
Where the skill came from.
 
Bumps SkillUsageStore counters whenever the agent invokes a SkillBox-registered skill loader (e.g.
Per-skill operational telemetry plus enterprise-staging audit fields.
 
Sidecar telemetry store for per-skill usage and provenance.
Runtime gate that decides which skills are exposed to the model on a per-call basis.
Distributed SubagentRegistry backed by a BaseStore.
A single item retrieved from a BaseStore.
Declares a subagent: its identity, workspace resolution strategy, and optional capability allowlist.
 
Whether a declaration can be used as a top-level primary agent, only as a delegated subagent, or both.
Descriptor for a subagent identified by agent id, with its description, SubagentFactory, and optional SubagentDeclaration (for remote URL and headers).
Creates a new subagent instance for a single spawn or session.
Bridge between AgentSpawnTool and the gateway layer.
Result of exposing a subagent to the user.
Rebuilds a subagent Agent instance from its type id.
Durable, recovery-oriented descriptor of an exposed subagent.
Durable registry of exposed subagents, keyed by subagentId.
Middleware that provides the managed subagent mechanism.
LLM-driven generator for SubagentDeclaration markdown specs.
Pair of the raw markdown and the parsed SubagentDeclaration.
Snapshot of a terminal-state subagent task awaiting (or undergoing) push delivery to the parent agent's reasoning loop.
Persistent metadata for a background subagent task, stored as JSON in the workspace under agents/<parentAgentId>/tasks/<parentSessionId>.json.
Repository for managing background subagent tasks, scoped by session.
Callback invoked when a background task reaches a terminal state (COMPLETED or FAILED).
Discriminated union describing how a background subagent task should execute.
Adopts an already-running CompletableFuture as a tracked background task.
In-process execution via Supplier.
Remote HTTP task execution.
Lifecycle status of a background subagent task.
Unified tool for background task lifecycle management.
Client for AgentTeams coordination (Claude-parity task board + mailbox).
Optimistic-lock / ownership conflict on the team task board.
Runtime context injected into a teammate session (mirrors Go TeamContext).
 
 
Roster snapshot embedded in TeamContext (not the full store member row).
 
Injected when a member session is recovering after a crash/reschedule.
Spec for creating a local or CP-backed team.
Lightweight team record.
Team member roster entry.
Member seed for team creation.
Team mailbox message.
Injects AgentTeams context into the system prompt and exposes a role-clipped TeamTool.
Shared team task board item.
Unified AgentTeams tool.
Bridge from TeamClient implementations to whatever runtime owns teammate sessions.
Wakes a teammate, optionally injecting notice into its next turn.
Utility class for estimating token count in messages.
Applies the allow / deny lists from workspace/tools.json (or Managed Agents toolset export) against a Toolkit.
Configuration for per-tool-result eviction of oversized outputs.
Middleware that evicts oversized tool results to the AbstractFilesystem before downstream reasoning sees the bloated message list.
Workspace-level tool configuration loaded from workspace/tools.json.
Loads workspace/tools.json into a ToolsConfig.
Persists the conversation transcript at the end of every agent call.
Identifies a session transcript in a multi-tenant layout: {tenant}/{agentId}/{sessionId}/....
Narrow append-oriented store for session transcripts.
Metadata for one immutable segment.
Thrown when a session turn gate cannot be acquired because another turn holds the lock.
A handle representing an acquired session turn slot.
Tool that blocks until async results arrive, either for a specific task barrier or (legacy) until any message appears in the session inbox.
Per-process dispatcher that wakes idle sessions when background work completes.
Thin interface for the two gateway operations the dispatcher needs.
Builtin web tools (web_fetch, web_search) for Managed Agents / Harness.
 
 
Securely extracts tar archives into a target directory.
Path constants for the workspace directory structure.
Appends workspace context (session info, AGENTS.md, MEMORY.md, knowledge) to the system prompt via WorkspaceContextMiddleware.onSystemPrompt(Agent, RuntimeContext, String).
Base class for entries in a WorkspaceSpec.
Best-effort SQLite index for the local workspace.
Stateless accessor for workspace content using a two-layer read architecture.
MessageBus implementation backed by AbstractFilesystem.
Controls how a declared subagent's runtime workspace root is determined.
Helpers for BindMountEntry handling.
Normalizes file paths to workspace-relative form by stripping the active mode's workspace prefix.
Builds a deterministic archive payload for workspace projection entries.
Projection result used at sandbox start.
Layout entry that projects selected files/directories from host workspace into sandbox workspace when the Sandbox starts.
AgentSkillRepository backed by an AbstractFilesystem, with lazy resource access via LazyResourceCapable.
Describes the desired initial state of a sandbox workspace: root path, materialized file/directory entries, and per-exec environment variables.
Applies a WorkspaceSpec to a target directory by materializing declared entries (files, directories, local copies).
Workspace-backed TaskRepository that uses WorkspaceManager as the authoritative truth source for task state, while maintaining in-memory BackgroundTask handles as a local performance overlay for tasks running on the current node.
Result of a file write operation.