应用程序(App)
Represents an LLM-backed agentic application.
An App is the top-level container for an agentic system powered by LLMs. It bundles an application name together with the rootAgent that serves as the root of the agent tree, enabling coordination and communication across all agents in the hierarchy. It also carries application-wide configuration, such as plugins and resumabilityConfig, that the runner applies to every session it runs.
appName must start with a letter and may contain only letters, digits, underscores, and hyphens, and must not be the reserved value "user", which is reserved for end-user input. Construction throws IllegalArgumentException if appName does not meet these requirements.
构造函数(Constructors)
1.1.0 版本的构造函数(constructor)没有任何特殊功能(即没有实现任何特定的逻辑或方法)。 rootNode该构造函数仍然可见,因为 `javac` 会跳过那些被标记为“隐藏”的构造函数;因此,如果使用 1.1.0 版本的 Java 代码进行编程,程序会默认使用以 `Node` 为根对象的构造函数。
类型
属性(Properties)
这是一个可选的上下文缓存配置选项,适用于应用程序中的所有大型语言模型(LLM)代理。当…… null上下文缓存功能已被禁用。
可选的配置选项用于控制该应用程序会话的上下文压缩策略。当…… null没有进行任何压缩操作(即没有执行任何“compaction runs”)。
适用于整个应用程序(Application-wide) 插件(Plugin)该组件为整个系统提供共享的回调函数和服务。默认值为空列表。
可选的“可恢复性”配置已应用于应用程序的会话中。当……(具体条件或情况未在文档中明确说明)。 null因此,功能的可恢复性(即功能在出现问题后能够被重新启用)被禁用了。
函数
返回一个 Builder 使用该实例的属性进行初始化,主要适用于 Java 调用者。建议优先选择这种方式。 copy 来自 Java 的代码: copy 该函数会按位置获取所有属性的值;因此,每当有新属性被添加时,其函数签名(即函数的定义)就会发生变化。