AS AgentScopeAPI 手册 / API Reference

TeamWakeups

public final class TeamWakeups
源码Source io/agentscope/harness/agent/team/TeamWakeups.java:27–56

团队 Wakeups,支持智能体之间的发现、委派与协作。位于 io.agentscope.harness.agent.team 包。核心成员包括 register、wake。

Bridge from TeamClient implementations to whatever runtime owns teammate sessions.

A TeamClient knows member names (lead, w1) but not runtime session ids, so it cannot wake a teammate on its own. The middleware that hosts the teammate registers a Hook here; clients then notify members without depending on the middleware package.

嵌套类摘要Nested Class Summary

类Class类型Kind说明Description
Hook接口interface
定义钩子契约的接口。
Wakes a teammate, optionally injecting `notice` into its next turn.

方法摘要Method Summary

方法Method说明Description
public static void register(Hook hook)
static
设置注册。
Registers the process-wide wakeup hook.
public static boolean wake(String teamName, String memberName, String notice)
static
执行 `wake` 方法。
Wakes `memberName`; returns `false` when no hook or no live session.

方法详情Method Detail

register

public static void register(Hook hook)
static

设置注册。

Registers the process-wide wakeup hook.

参数Parameters
名称Name类型Type说明Description
hookHook钩子(类型 `Hook`)。The hook.
源码Source io/agentscope/harness/agent/team/TeamWakeups.java:40–42

wake

public static boolean wake(String teamName, String memberName, String notice)
static

执行 wake 方法。

Wakes memberName; returns false when no hook or no live session.

参数Parameters
名称Name类型Type说明Description
teamNameString团队名称(类型 `String`)。The team name.
memberNameString成员名称(类型 `String`)。The member name.
noticeStringnotice(类型 `String`)。The notice.
返回Returns boolean
返回布尔值,表示判断结果。Returns a boolean result.
源码Source io/agentscope/harness/agent/team/TeamWakeups.java:45–55

嵌套类详情Nested Class Detail

Hook

@FunctionalInterface public interface Hook

定义钩子契约的接口。位于 io.agentscope.harness.agent.team 包。核心成员包括 wake。

Wakes a teammate, optionally injecting notice into its next turn.

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