AS AgentScopeAPI 手册 / API Reference

ServiceComponentManager

public static class ServiceComponentManager
源码Source io/agentscope/runtime/app/AgentApp.java:578–615

服务 Component 管理器,承载智能体的部署、调度与服务化运行。位于 io.agentscope.runtime.app 包。核心成员包括 getStateService、setStateService、getSessionHistoryService、setSessionHistoryService、getMemoryService、setMemoryService。

A class in io.agentscope.runtime.app that deploys, schedules and serves agents. Declared in io.agentscope.runtime.app.

方法摘要Method Summary

方法Method说明Description
public StateService getStateService()
获取状态服务。
Returns the state service.
public void setStateService(StateService stateService)
设置状态服务。
Sets the state service.
public SessionHistoryService getSessionHistoryService()
获取会话历史服务。
Returns the session history service.
public void setSessionHistoryService(SessionHistoryService sessionHistoryService)
设置会话历史服务。
Sets the session history service.
public MemoryService getMemoryService()
获取记忆服务。
Returns the memory service.
public void setMemoryService(MemoryService memoryService)
设置记忆服务。
Sets the memory service.
public SandboxService getSandboxService()
获取沙箱服务。
Returns the sandbox service.
public void setSandboxService(SandboxService sandboxService)
设置沙箱服务。
Sets the sandbox service.

方法详情Method Detail

getStateService

public StateService getStateService()

获取状态服务。

Returns the state service.

返回Returns StateService
返回StateService。Returns state service.
源码Source io/agentscope/runtime/app/AgentApp.java:584–586

setStateService

public void setStateService(StateService stateService)

设置状态服务。

Sets the state service.

参数Parameters
名称Name类型Type说明Description
stateServiceStateService状态服务(类型 `StateService`)。The state service.
源码Source io/agentscope/runtime/app/AgentApp.java:588–590

getSessionHistoryService

public SessionHistoryService getSessionHistoryService()

获取会话历史服务。

Returns the session history service.

返回Returns SessionHistoryService
返回SessionHistoryService。Returns session history service.
源码Source io/agentscope/runtime/app/AgentApp.java:592–594

setSessionHistoryService

public void setSessionHistoryService(SessionHistoryService sessionHistoryService)

设置会话历史服务。

Sets the session history service.

参数Parameters
名称Name类型Type说明Description
sessionHistoryServiceSessionHistoryService会话历史服务(类型 `SessionHistoryService`)。The session history service.
源码Source io/agentscope/runtime/app/AgentApp.java:596–598

getMemoryService

public MemoryService getMemoryService()

获取记忆服务。

Returns the memory service.

返回Returns MemoryService
返回MemoryService。Returns memory service.
源码Source io/agentscope/runtime/app/AgentApp.java:600–602

setMemoryService

public void setMemoryService(MemoryService memoryService)

设置记忆服务。

Sets the memory service.

参数Parameters
名称Name类型Type说明Description
memoryServiceMemoryService记忆服务(类型 `MemoryService`)。The memory service.
源码Source io/agentscope/runtime/app/AgentApp.java:604–606

getSandboxService

public SandboxService getSandboxService()

获取沙箱服务。

Returns the sandbox service.

返回Returns SandboxService
返回SandboxService。Returns sandbox service.
源码Source io/agentscope/runtime/app/AgentApp.java:608–610

setSandboxService

public void setSandboxService(SandboxService sandboxService)

设置沙箱服务。

Sets the sandbox service.

参数Parameters
名称Name类型Type说明Description
sandboxServiceSandboxService沙箱服务(类型 `SandboxService`)。The sandbox service.
源码Source io/agentscope/runtime/app/AgentApp.java:612–614
基于官方固定版本源码静态生成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.