SessionAdminController
@RestController public class SessionAdminController
io/agentscope/spring/boot/admin/controller/SessionAdminController.java:50–298会话管理台控制器,承载智能体的部署、调度与服务化运行。位于 io.agentscope.spring.boot.admin.controller 包。核心成员包括 listSessions、messages、stateDump、export、compact、abort。
Data-plane REST surface. Route prefix is derived from
agentscope.admin.base-path (default /v1/admin).
Verbs follow Google AIP-136 (resource:action) so OpenAPI generators and CLIs can map them to
idiomatic command names — e.g. POST /v1/admin/sessions/{id}:compact surfaces as
session compact <id> in a downstream CLI.
构造器摘要Constructor Summary
方法摘要Method Summary
构造器详情Constructor Detail
SessionAdminController
public SessionAdminController(SessionOperations ops, ObjectProvider<AgentStateStore> sessions, AdminAuditLogger audit, AdminProperties properties)
初始化 SessionAdminController 实例。
Creates a new instance.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
ops | SessionOperations | ops(类型 `SessionOperations`)。The ops. |
sessions | ObjectProvider<AgentStateStore> | 会话(类型 `ObjectProvider`)。The sessions. |
audit | AdminAuditLogger | audit(类型 `AdminAuditLogger`)。The audit. |
properties | AdminProperties | 属性(类型 `AdminProperties`)。The properties. |
io/agentscope/spring/boot/admin/controller/SessionAdminController.java:61–70方法详情Method Detail
listSessions
public Mono<List<String>> listSessions(String operator)
列出会话。
Lists the sessions.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
operator | String | operator(类型 `String`)。The operator. |
Mono<List<String>>io/agentscope/spring/boot/admin/controller/SessionAdminController.java:72–86messages
public Mono<List<MessageView>> messages(String sessionId, String operator)
执行消息相关操作。
Performs the messages operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
sessionId | String | 会话标识(类型 `String`)。The session id. |
operator | String | operator(类型 `String`)。The operator. |
Mono<List<MessageView>>io/agentscope/spring/boot/admin/controller/SessionAdminController.java:88–102stateDump
public Mono<String> stateDump(String sessionId, String operator)
执行 stateDump 方法。
Performs the state dump operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
sessionId | String | 会话标识(类型 `String`)。The session id. |
operator | String | operator(类型 `String`)。The operator. |
Mono<String>io/agentscope/spring/boot/admin/controller/SessionAdminController.java:104–120export
public Mono<ResponseEntity<String>> export(String sessionId, String operator)
执行 export 方法。
Performs the export operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
sessionId | String | 会话标识(类型 `String`)。The session id. |
operator | String | operator(类型 `String`)。The operator. |
Mono<ResponseEntity<String>>io/agentscope/spring/boot/admin/controller/SessionAdminController.java:122–144compact
public Mono<CompactResponse> compact(String sessionId, CompactRequest request, String operator, String token)
执行 compact 方法。
Performs the compact operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
sessionId | String | 会话标识(类型 `String`)。The session id. |
request | CompactRequest | 请求(类型 `CompactRequest`)。The request. |
operator | String | operator(类型 `String`)。The operator. |
token | String | 令牌(类型 `String`)。The token. |
Mono<CompactResponse>io/agentscope/spring/boot/admin/controller/SessionAdminController.java:146–163abort
public Mono<ResponseEntity<Void>> abort(String sessionId, String operator, String token)
执行中止相关操作。
Performs the abort operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
sessionId | String | 会话标识(类型 `String`)。The session id. |
operator | String | operator(类型 `String`)。The operator. |
token | String | 令牌(类型 `String`)。The token. |
Mono<ResponseEntity<Void>>io/agentscope/spring/boot/admin/controller/SessionAdminController.java:165–177undo
public Mono<SessionOperations.UndoResult> undo(String sessionId, String operator, String token)
执行 undo 方法。
Performs the undo operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
sessionId | String | 会话标识(类型 `String`)。The session id. |
operator | String | operator(类型 `String`)。The operator. |
token | String | 令牌(类型 `String`)。The token. |
Mono<SessionOperations.UndoResult>io/agentscope/spring/boot/admin/controller/SessionAdminController.java:179–197redo
public Mono<SessionOperations.UndoResult> redo(String sessionId, String operator, String token)
执行 redo 方法。
Performs the redo operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
sessionId | String | 会话标识(类型 `String`)。The session id. |
operator | String | operator(类型 `String`)。The operator. |
token | String | 令牌(类型 `String`)。The token. |
Mono<SessionOperations.UndoResult>io/agentscope/spring/boot/admin/controller/SessionAdminController.java:199–217plan
public Mono<PlanModeView> plan(String sessionId, String operator)
执行计划相关操作。
Performs the plan operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
sessionId | String | 会话标识(类型 `String`)。The session id. |
operator | String | operator(类型 `String`)。The operator. |
Mono<PlanModeView>io/agentscope/spring/boot/admin/controller/SessionAdminController.java:223–241enterPlanMode
public Mono<PlanModeView> enterPlanMode(String sessionId, String operator, String token)
执行 enterPlanMode 方法。
Performs the enter plan mode operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
sessionId | String | 会话标识(类型 `String`)。The session id. |
operator | String | operator(类型 `String`)。The operator. |
token | String | 令牌(类型 `String`)。The token. |
Mono<PlanModeView>io/agentscope/spring/boot/admin/controller/SessionAdminController.java:243–259exitPlanMode
public Mono<PlanModeView> exitPlanMode(String sessionId, String operator, String token)
执行 exitPlanMode 方法。
Performs the exit plan mode operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
sessionId | String | 会话标识(类型 `String`)。The session id. |
operator | String | operator(类型 `String`)。The operator. |
token | String | 令牌(类型 `String`)。The token. |
Mono<PlanModeView>io/agentscope/spring/boot/admin/controller/SessionAdminController.java:261–277agentTasks
public Mono<List<AgentTaskView>> agentTasks(String sessionId, String operator)
执行智能体任务相关操作。
Performs the agent tasks operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
sessionId | String | 会话标识(类型 `String`)。The session id. |
operator | String | operator(类型 `String`)。The operator. |
Mono<List<AgentTaskView>>io/agentscope/spring/boot/admin/controller/SessionAdminController.java:283–297