AS AgentScopeAPI 手册 / API Reference

ThreadSession

public static class ThreadSession
源码Source io/agentscope/spring/boot/agui/common/ThreadSessionManager.java:362–426

会话线程会话,承载智能体的部署、调度与服务化运行。位于 io.agentscope.spring.boot.agui.common 包。核心成员包括 getUserId、getThreadId、getAgentId、getAgent、getCreatedAt、getLastAccess。

Represents a thread session with its agent and metadata.

方法摘要Method Summary

方法Method说明Description
public String getUserId()
获取用户标识。
Returns the user id.
public String getThreadId()
获取会话线程标识。
Returns the thread id.
public String getAgentId()
获取智能体标识。
Returns the agent id.
public Agent getAgent()
获取智能体。
Returns the agent.
public Instant getCreatedAt()
获取已创建 At。
Returns the created at.
public Instant getLastAccess()
获取最后访问。
Returns the last access.
public String getName()
获取名称。
Returns the name.
public void setName(String name)
设置名称。
Sets the name.
public boolean isArchived()
判断是否 `isArchived`。
Returns whether the archived.
public void setArchived(boolean archived)
设置 `setArchived`。
Sets the archived.
public void updateLastAccess()
更新最后访问。
Updates the last access.

方法详情Method Detail

getUserId

public String getUserId()

获取用户标识。

Returns the user id.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/spring/boot/agui/common/ThreadSessionManager.java:383–385

getThreadId

public String getThreadId()

获取会话线程标识。

Returns the thread id.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/spring/boot/agui/common/ThreadSessionManager.java:387–389

getAgentId

public String getAgentId()

获取智能体标识。

Returns the agent id.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/spring/boot/agui/common/ThreadSessionManager.java:391–393

getAgent

public Agent getAgent()

获取智能体。

Returns the agent.

返回Returns Agent
返回智能体。Returns agent.
源码Source io/agentscope/spring/boot/agui/common/ThreadSessionManager.java:395–397

getCreatedAt

public Instant getCreatedAt()

获取已创建 At。

Returns the created at.

返回Returns Instant
返回Instant。Returns instant.
源码Source io/agentscope/spring/boot/agui/common/ThreadSessionManager.java:399–401

getLastAccess

public Instant getLastAccess()

获取最后访问。

Returns the last access.

返回Returns Instant
返回Instant。Returns instant.
源码Source io/agentscope/spring/boot/agui/common/ThreadSessionManager.java:403–405

getName

public String getName()

获取名称。

Returns the name.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/spring/boot/agui/common/ThreadSessionManager.java:407–409

setName

public void setName(String name)

设置名称。

Sets the name.

参数Parameters
名称Name类型Type说明Description
nameString名称(类型 `String`)。The name.
源码Source io/agentscope/spring/boot/agui/common/ThreadSessionManager.java:411–413

isArchived

public boolean isArchived()

判断是否 isArchived。

Returns whether the archived.

返回Returns boolean
返回布尔值,表示判断结果。Returns a boolean result.
源码Source io/agentscope/spring/boot/agui/common/ThreadSessionManager.java:415–417

setArchived

public void setArchived(boolean archived)

设置 setArchived。

Sets the archived.

参数Parameters
名称Name类型Type说明Description
archivedbooleanarchived(类型 `boolean`)。The archived.
源码Source io/agentscope/spring/boot/agui/common/ThreadSessionManager.java:419–421

updateLastAccess

public void updateLastAccess()

更新最后访问。

Updates the last access.

源码Source io/agentscope/spring/boot/agui/common/ThreadSessionManager.java:423–425
基于官方固定版本源码静态生成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.