AS AgentScopeAPI 手册 / API Reference

WorkbenchCatalog

public final class WorkbenchCatalog
源码Source io/agentscope/examples/copilotkit/a2ui/WorkbenchCatalog.java:32–256

Workbench 目录,把智能体接入外部消息渠道与企业平台。位于 io.agentscope.examples.copilotkit.a2ui 包。核心成员包括 isKnownComponent、grammar、inlineCatalogSchema、CATALOG_ID、VERSION、BASIC_COMPONENTS。

The A2UI component catalog this example advertises to the model.

It is the basic A2UI v0.9 catalog plus four workbench-specific components. The very same catalog id and component names are implemented on the browser side in frontend/src/a2ui/workbenchCatalog.tsx via createCatalog(...), so anything the model emits here has a matching React renderer.

字段摘要Field Summary

字段Field类型Type说明Description
CATALOG_ID
staticfinal
String
目录标识字段。
Catalog id shared with the browser catalog; goes into every `createSurface`.
VERSION
staticfinal
String
版本字段。
A2UI wire version implemented by both sides.
BASIC_COMPONENTS
staticfinal
Set<String>
基础 COMPONENTS字段。
Basic catalog components the A2UI renderer ships out of the box.
CUSTOM_COMPONENTS
staticfinal
Set<String>
自定义 COMPONENTS字段。
Workbench components implemented only by this example.

方法摘要Method Summary

方法Method说明Description
public static boolean isKnownComponent(String component)
static
判断是否 `isKnownComponent`。
Returns whether the known component.
public static String grammar(Set<String> clientComponents)
static
设置该参数。
Compact grammar handed to the LLM.
public static Map<String, Object> inlineCatalogSchema(Set<String> clientComponents)
static
设置该参数。
The custom half of the catalog in A2UI v0.9 inline-catalog form.

字段详情Field Detail

CATALOG_ID

public static final String CATALOG_ID
staticfinal

目录标识字段。声明为 public static final String CATALOG_ID。

Catalog id shared with the browser catalog; goes into every createSurface.

源码Source io/agentscope/examples/copilotkit/a2ui/WorkbenchCatalog.java:35

VERSION

public static final String VERSION
staticfinal

版本字段。声明为 public static final String VERSION。

A2UI wire version implemented by both sides.

源码Source io/agentscope/examples/copilotkit/a2ui/WorkbenchCatalog.java:38

BASIC_COMPONENTS

public static final Set<String> BASIC_COMPONENTS
staticfinal

基础 COMPONENTS字段。声明为 public static final Set BASIC_COMPONENTS。

Basic catalog components the A2UI renderer ships out of the box.

源码Source io/agentscope/examples/copilotkit/a2ui/WorkbenchCatalog.java:46–47

CUSTOM_COMPONENTS

public static final Set<String> CUSTOM_COMPONENTS
staticfinal

自定义 COMPONENTS字段。声明为 public static final Set CUSTOM_COMPONENTS。

Workbench components implemented only by this example.

源码Source io/agentscope/examples/copilotkit/a2ui/WorkbenchCatalog.java:50–51

方法详情Method Detail

isKnownComponent

public static boolean isKnownComponent(String component)
static

判断是否 isKnownComponent。

Returns whether the known component.

参数Parameters
名称Name类型Type说明Description
componentStringcomponent(类型 `String`)。The component.
返回Returns boolean
返回布尔值,表示判断结果。Returns a boolean result.
源码Source io/agentscope/examples/copilotkit/a2ui/WorkbenchCatalog.java:55–57

grammar

public static String grammar(Set<String> clientComponents)
static

设置该参数。

Compact grammar handed to the LLM.

参数Parameters
名称Name类型Type说明Description
clientComponentsSet<String>客户端 Components(类型 `Set`)。custom components the browser can render; empty advertises all of them
返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/examples/copilotkit/a2ui/WorkbenchCatalog.java:97–101

inlineCatalogSchema

public static Map<String, Object> inlineCatalogSchema(Set<String> clientComponents)
static

设置该参数。

The custom half of the catalog in A2UI v0.9 inline-catalog form.

参数Parameters
名称Name类型Type说明Description
clientComponentsSet<String>客户端 Components(类型 `Set`)。custom components the browser can render; empty includes all of them
返回Returns Map<String, Object>
返回映射。Returns map.
源码Source io/agentscope/examples/copilotkit/a2ui/WorkbenchCatalog.java:169–228
基于官方固定版本源码静态生成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.