Package io.agentscope.harness.agent.middleware
package io.agentscope.harness.agent.middleware
-
ClassDescriptionObservability middleware that logs the reasoning and execution trace of an agent.Middleware that offloads long-running tool calls to background execution.Expands
@pathreferences in user messages by reading the referenced files through the activeAbstractFilesystemand appending an<attached_file>block at the end of the message.Middleware that performs conversation compaction before each LLM reasoning call.Dynamic counterpart toSubagentsMiddlewarethat re-resolves the registered subagent set on every reasoning step, supporting per-user isolation through the workspaceAbstractFilesystem(e.g.Marker for middleware installed by harness runtime wiring.Harness-native skill middleware.Middleware that drains the message bus inbox before each reasoning step and injects the messages asHintBlocks into the agent's context.Middleware that triggers memory flush and message offload at the end of each agent call.Middleware that performs periodic memory maintenance after each agent call.Enforces plan mode: whileAgentState.planModeContext.planActiveistrue, mutating tool calls are denied so the agent can only read / investigate and draft a plan.Middleware that manages the sandbox session lifecycle around each agent call.SchedulesSkillCuratorruns after the maincall()completes.BumpsSkillUsageStorecounters whenever the agent invokes a SkillBox-registered skill loader (e.g.Descriptor for a subagent identified by agent id, with its description,SubagentFactory, and optionalSubagentDeclaration(for remote URL and headers).Middleware that provides the managed subagent mechanism.Injects AgentTeams context into the system prompt and exposes a role-clippedTeamTool.Middleware that evicts oversized tool results to theAbstractFilesystembefore downstream reasoning sees the bloated message list.Persists the conversation transcript at the end of every agent call.Appends workspace context (session info, AGENTS.md, MEMORY.md, knowledge) to the system prompt viaWorkspaceContextMiddleware.onSystemPrompt(Agent, RuntimeContext, String).