包package
io.agentscope.harness.agent.middlewareio.agentscope.harness.agent.middleware
package io.agentscope.harness.agent.middleware
io.agentscope.harness.agent.middleware 属于运行时与部署,服务化、调度、控制面与 Web 应用。 该包共收录 20 个公开类型。
io.agentscope.harness.agent.middleware belongs to the Runtime & deployment layer and contains 20 public types.
接口Interfaces
| 类型Type | 种类Kind | 说明Description |
|---|---|---|
HarnessRuntimeMiddleware | 接口interface | 定义 Harness 运行时中间件契约的接口。 Marker for middleware installed by harness runtime wiring. |
类Classes
| 类型Type | 种类Kind | 说明Description |
|---|---|---|
AgentTraceMiddleware | 类class | 智能体追踪中间件,在智能体执行流程中提供横切扩展。 Observability middleware that logs the reasoning and execution trace of an agent. |
AsyncToolMiddleware | 类class | 异步工具中间件,在智能体执行流程中提供横切扩展。 Middleware that offloads long-running tool calls to background execution. |
AtPathExpansionMiddleware | 类class | At 路径 Expansion 中间件,在智能体执行流程中提供横切扩展。 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. |
CompactionMiddleware | 类class | 压缩中间件,在智能体执行流程中提供横切扩展。 Middleware that performs conversation compaction before each LLM reasoning call. |
DynamicSubagentsMiddleware | 类class | Dynamic Subagents 中间件,在智能体执行流程中提供横切扩展。 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. |
HarnessSkillMiddleware | 类class | Harness 技能中间件,在智能体执行流程中提供横切扩展。 Harness-native skill middleware. |
InboxMiddleware | 类class | 收件箱中间件,在智能体执行流程中提供横切扩展。 Middleware that drains the message bus inbox before each reasoning step and injects the messages
as `HintBlock`s into the agent's context. |
MemoryFlushMiddleware | 类class | 记忆刷新中间件,在智能体执行流程中提供横切扩展。 Middleware that triggers memory flush and message offload at the end of each agent call. |
MemoryMaintenanceMiddleware | 类class | 记忆维护中间件,在智能体执行流程中提供横切扩展。 Middleware that performs periodic memory maintenance after each agent call. |
PlanModeMiddleware | 类class | 计划模式中间件,在智能体执行流程中提供横切扩展。 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. |
SandboxLifecycleMiddleware | 类class | 沙箱生命周期中间件,在智能体执行流程中提供横切扩展。 Middleware that manages the sandbox session lifecycle around each agent call. |
SkillCuratorMiddleware | 类class | 技能 Curator 中间件,在智能体执行流程中提供横切扩展。 Schedules `SkillCurator` runs after the main `call()` completes. |
SkillUsageMiddleware | 类class | 技能用量中间件,在智能体执行流程中提供横切扩展。 Bumps `SkillUsageStore` counters whenever the agent invokes a SkillBox-registered skill
loader (e.g. |
SubagentsMiddleware | 类class | Subagents 中间件,在智能体执行流程中提供横切扩展。 Middleware that provides the managed subagent mechanism. |
TeamsMiddleware | 类class | Teams 中间件,在智能体执行流程中提供横切扩展。 Injects AgentTeams context into the system prompt and exposes a role-clipped `TeamTool`. |
ToolResultEvictionMiddleware | 类class | 工具结果淘汰中间件,在智能体执行流程中提供横切扩展。 Middleware that evicts oversized tool results to the `AbstractFilesystem` before
downstream reasoning sees the bloated message list. |
TranscriptMiddleware | 类class | Transcript 中间件,在智能体执行流程中提供横切扩展。 Persists the conversation transcript at the end of every agent call. |
WorkspaceContextMiddleware | 类class | 工作区上下文中间件,在智能体执行流程中提供横切扩展。 Appends workspace context (session info, AGENTS.md, MEMORY.md, knowledge) to the
system prompt via `#onSystemPrompt(Agent, RuntimeContext, String)`. |
记录Records
| 类型Type | 种类Kind | 说明Description |
|---|---|---|
SubagentEntry | 记录record | 承载子智能体条目数据的记录类型。 Descriptor for a subagent identified by agent id, with its description,
`SubagentFactory`, and optional `SubagentDeclaration` (for
remote URL and headers). |