AS AgentScopeAPI 手册 / API Reference

SessionLifecycleConfig

@JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonIgnoreProperties(ignoreUnknown = true) public class SessionLifecycleConfig
源码Source 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:

  • SessionMaintenanceConfig for 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.

返回Returns ResetConfig
返回ResetConfig。Returns reset config.
源码Source io/agentscope/builder/runtime/config/SessionLifecycleConfig.java:52–54

setReset

public void setReset(ResetConfig reset)

设置重置。

Sets the reset.

参数Parameters
名称Name类型Type说明Description
resetResetConfig重置(类型 `ResetConfig`)。The reset.
源码Source io/agentscope/builder/runtime/config/SessionLifecycleConfig.java:56–58

getMaintenance

public MaintenanceConfig getMaintenance()

获取维护。

Returns the maintenance.

返回Returns MaintenanceConfig
返回MaintenanceConfig。Returns maintenance config.
源码Source io/agentscope/builder/runtime/config/SessionLifecycleConfig.java:60–62

setMaintenance

public void setMaintenance(MaintenanceConfig maintenance)

设置维护。

Sets the maintenance.

参数Parameters
名称Name类型Type说明Description
maintenanceMaintenanceConfig维护(类型 `MaintenanceConfig`)。The maintenance.
源码Source 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.

基于官方固定版本源码静态生成Generated from pinned official sources · Python 2.0.11 · Java 2.0.4
签名与文档为静态抽取;如有疑问请以源码为准。Signatures and docs are extracted statically; verify against the source when in doubt.