SessionLifecycleConfig
@JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonIgnoreProperties(ignoreUnknown = true) public class SessionLifecycleConfig
io/agentscope/builder/runtime/config/SessionLifecycleConfig.java:42–178会话生命周期配置,保存相关配置项。位于 io.agentscope.builder.runtime.config 包。核心成员包括 getReset、setReset、getMaintenance、setMaintenance。
Optional session block in agentscope.json controlling session lifecycle and
maintenance.
Example
`"session": {
"reset": { "dailyAt": "04:00", "idleMinutes": 360 },
"maintenance": { "mode": "prune", "pruneAfter": "7d", "maxEntries": 1000 }
}
`
Mirrors OpenClaw's session-level config. Mapped at runtime to:
-
SessionMaintenanceConfigfor prune/cap policy -
A scheduled task (
SessionLifecycleScheduler) that triggers reset events
嵌套类摘要Nested Class Summary
| 类Class | 类型Kind | 说明Description |
|---|---|---|
ResetConfig | 类class | 重置配置,保存相关配置项。 A class in io.agentscope.builder.runtime.config that deploys, schedules and serves agents. |
MaintenanceConfig | 类class | 维护配置,保存相关配置项。 A class in io.agentscope.builder.runtime.config that deploys, schedules and serves agents. |
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public ResetConfig getReset() | 获取重置。 Returns the reset. |
public void setReset(ResetConfig reset) | 设置重置。 Sets the reset. |
public MaintenanceConfig getMaintenance() | 获取维护。 Returns the maintenance. |
public void setMaintenance(MaintenanceConfig maintenance) | 设置维护。 Sets the maintenance. |
方法详情Method Detail
getReset
public ResetConfig getReset()
获取重置。
Returns the reset.
ResetConfigio/agentscope/builder/runtime/config/SessionLifecycleConfig.java:52–54setReset
public void setReset(ResetConfig reset)
设置重置。
Sets the reset.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
reset | ResetConfig | 重置(类型 `ResetConfig`)。The reset. |
io/agentscope/builder/runtime/config/SessionLifecycleConfig.java:56–58getMaintenance
public MaintenanceConfig getMaintenance()
获取维护。
Returns the maintenance.
MaintenanceConfigio/agentscope/builder/runtime/config/SessionLifecycleConfig.java:60–62setMaintenance
public void setMaintenance(MaintenanceConfig maintenance)
设置维护。
Sets the maintenance.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
maintenance | MaintenanceConfig | 维护(类型 `MaintenanceConfig`)。The maintenance. |
io/agentscope/builder/runtime/config/SessionLifecycleConfig.java:64–66嵌套类详情Nested Class Detail
ResetConfig
@JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonIgnoreProperties(ignoreUnknown = true) public static class ResetConfig重置配置,保存相关配置项。位于 io.agentscope.builder.runtime.config 包。核心成员包括 getDailyAt、setDailyAt、getIdleMinutes、setIdleMinutes。
A class in io.agentscope.builder.runtime.config that deploys, schedules and serves agents. Declared in io.agentscope.builder.runtime.config.
MaintenanceConfig
@JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonIgnoreProperties(ignoreUnknown = true) public static class MaintenanceConfig维护配置,保存相关配置项。位于 io.agentscope.builder.runtime.config 包。核心成员包括 getMode、setMode、getPruneAfter、setPruneAfter、getMaxEntries、setMaxEntries。
A class in io.agentscope.builder.runtime.config that deploys, schedules and serves agents. Declared in io.agentscope.builder.runtime.config.