AS AgentScopeAPI 手册 / API Reference

TeamContext

@JsonIgnoreProperties(ignoreUnknown = true) public record TeamContext( String teamName, String namespace, String objective, String myRole, boolean isLead, List<MemberSnapshot> members, List<String> availableActions, RecoveryContext recoveryContext)
源码Source io/agentscope/harness/agent/team/TeamContext.java:22–69

承载团队上下文数据的记录类型。位于 io.agentscope.harness.agent.team 包。核心成员包括 teamName、namespace、objective、myRole、isLead、members。

Runtime context injected into a teammate session (mirrors Go TeamContext).

记录组件摘要Record Component Summary

组件Component类型Type说明Description
teamNameString
执行团队名称相关操作。
Performs the team name operation.
namespaceString
执行命名空间相关操作。
Performs the namespace operation.
objectiveString
执行 `objective` 方法。
Performs the objective operation.
myRoleString
执行my 角色相关操作。
Performs the my role operation.
isLeadboolean
判断是否 `isLead`。
Returns whether the lead.
membersList<MemberSnapshot>
执行成员相关操作。
Performs the members operation.
availableActionsList<String>
执行 `availableActions` 方法。
Performs the available actions operation.
recoveryContextRecoveryContext
执行 `recoveryContext` 方法。
Performs the recovery context operation.

嵌套类摘要Nested Class Summary

类Class类型Kind说明Description
MemberSnapshot记录record
承载成员快照数据的记录类型。
Roster snapshot embedded in TeamContext (not the full store member row).
RecoveryContext记录record
承载 Recovery 上下文数据的记录类型。
Injected when a member session is recovering after a crash/reschedule.
CompletedTask记录record
承载已完成任务数据的记录类型。
A record in io.agentscope.harness.agent.team that carries data used when components supports discovery, delegation and collaboration between agents.
InterruptedTask记录record
承载 Interrupted 任务数据的记录类型。
A record in io.agentscope.harness.agent.team that carries data used when components supports discovery, delegation and collaboration between agents.
RecentMessage记录record
承载 Recent 消息数据的记录类型。
A record in io.agentscope.harness.agent.team that carries data used when components supports discovery, delegation and collaboration between agents.

构造器摘要Constructor Summary

构造器Constructor说明Description
public TeamContext(String teamName, String namespace, String objective, String myRole, boolean isLead, List<MemberSnapshot> members, List<String> availableActions)
初始化 `TeamContext` 实例。
Creates a new instance.

方法摘要Method Summary

方法Method说明Description
public String resolvedNamespace()
返回已解析命名空间。
Returns the resolved namespace.

记录组件详情Record Component Detail

teamName

String teamName

执行团队名称相关操作。

Performs the team name operation.

源码Source io/agentscope/harness/agent/team/TeamContext.java:22–69

namespace

String namespace

执行命名空间相关操作。

Performs the namespace operation.

源码Source io/agentscope/harness/agent/team/TeamContext.java:22–69

objective

String objective

执行 objective 方法。

Performs the objective operation.

源码Source io/agentscope/harness/agent/team/TeamContext.java:22–69

myRole

String myRole

执行my 角色相关操作。

Performs the my role operation.

源码Source io/agentscope/harness/agent/team/TeamContext.java:22–69

isLead

boolean isLead

判断是否 isLead。

Returns whether the lead.

源码Source io/agentscope/harness/agent/team/TeamContext.java:22–69

members

List<MemberSnapshot> members

执行成员相关操作。

Performs the members operation.

源码Source io/agentscope/harness/agent/team/TeamContext.java:22–69

availableActions

List<String> availableActions

执行 availableActions 方法。

Performs the available actions operation.

源码Source io/agentscope/harness/agent/team/TeamContext.java:22–69

recoveryContext

RecoveryContext recoveryContext

执行 recoveryContext 方法。

Performs the recovery context operation.

源码Source io/agentscope/harness/agent/team/TeamContext.java:22–69

构造器详情Constructor Detail

TeamContext

public TeamContext(String teamName, String namespace, String objective, String myRole, boolean isLead, List<MemberSnapshot> members, List<String> availableActions)

初始化 TeamContext 实例。

Creates a new instance.

参数Parameters
名称Name类型Type说明Description
teamNameString团队名称(类型 `String`)。The team name.
namespaceString命名空间(类型 `String`)。The namespace.
objectiveStringobjective(类型 `String`)。The objective.
myRoleStringmy 角色(类型 `String`)。The my role.
isLeadboolean是 Lead(类型 `boolean`)。The is lead.
membersList<MemberSnapshot>成员(类型 `List`)。The members.
availableActionsList<String>可用 Actions(类型 `List`)。The available actions.
源码Source io/agentscope/harness/agent/team/TeamContext.java:33–42

方法详情Method Detail

resolvedNamespace

public String resolvedNamespace()

返回已解析命名空间。

Returns the resolved namespace.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/harness/agent/team/TeamContext.java:66–68

嵌套类详情Nested Class Detail

MemberSnapshot

@JsonIgnoreProperties(ignoreUnknown = true) public record MemberSnapshot(String name, String agentRef, String status)

承载成员快照数据的记录类型。位于 io.agentscope.harness.agent.team 包。核心成员包括 name、agentRef、status。

Roster snapshot embedded in TeamContext (not the full store member row).

RecoveryContext

@JsonIgnoreProperties(ignoreUnknown = true) public record RecoveryContext( String previousSessionId, int restartCount, List<CompletedTask> completedTasks, InterruptedTask interruptedTask, List<RecentMessage> recentMessages)

承载 Recovery 上下文数据的记录类型。位于 io.agentscope.harness.agent.team 包。核心成员包括 previousSessionId、restartCount、completedTasks、interruptedTask、recentMessages。

Injected when a member session is recovering after a crash/reschedule.

CompletedTask

@JsonIgnoreProperties(ignoreUnknown = true) public record CompletedTask(String id, String subject, String result)

承载已完成任务数据的记录类型。位于 io.agentscope.harness.agent.team 包。核心成员包括 id、subject、result。

A record in io.agentscope.harness.agent.team that carries data used when components supports discovery, delegation and collaboration between agents. Declared in io.agentscope.harness.agent.team.

InterruptedTask

@JsonIgnoreProperties(ignoreUnknown = true) public record InterruptedTask(String id, String subject, String note)

承载 Interrupted 任务数据的记录类型。位于 io.agentscope.harness.agent.team 包。核心成员包括 id、subject、note。

A record in io.agentscope.harness.agent.team that carries data used when components supports discovery, delegation and collaboration between agents. Declared in io.agentscope.harness.agent.team.

RecentMessage

@JsonIgnoreProperties(ignoreUnknown = true) public record RecentMessage(String from, String content, String timestamp)

承载 Recent 消息数据的记录类型。位于 io.agentscope.harness.agent.team 包。核心成员包括 from、content、timestamp。

A record in io.agentscope.harness.agent.team that carries data used when components supports discovery, delegation and collaboration between agents. Declared in io.agentscope.harness.agent.team.

基于官方固定版本源码静态生成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.