类的用途(Uses of the Class)
com.google.adk.agents.BaseAgent
Packages that use BaseAgent
Package
Description
-
**用途:** BaseAgent 在……里面;处于……状态 com.example.a2a_basic
Constructors in com.example.a2a_basic with parameters of type BaseAgent -
**用途:** BaseAgent 在……里面;处于……状态 com.google.adk.a2a.agent
Subclasses of BaseAgent in com.google.adk.a2a.agentMethod parameters in com.google.adk.a2a.agent with type arguments of type BaseAgentModifier and TypeMethodDescription -
**用途:** BaseAgent 在……里面;处于……状态 com.google.adk.a2a.executor
Methods in com.google.adk.a2a.executor with parameters of type BaseAgentModifier and TypeMethodDescription -
**用途:** BaseAgent 在……里面;处于……状态 com.google.adk.agents
Subclasses of BaseAgent in com.google.adk.agentsModifier and TypeClassDescriptionclass这个基于大型语言模型(LLM)的智能代理。class一个代理程序,它会按顺序循环执行其下属的子代理程序。final class这是一个只读代理(read-only agent),它用于替代那些不支持代理功能的工作流节点(non-agent workflow nodes)。这样一来,当应用程序(app)、运行器(runner)或调用组件(invocation)执行相关节点时,读取该代理中代码的操作仍能正常进行。class这是一个 shell 代理程序,它能够以并行方式、并在隔离的环境中运行其下属代理程序(即子代理)。class一种将执行计划任务委托给其他系统的代理(agent)。Plannerstrategy.class一个依次运行其子代理的代理程序。Fields in com.google.adk.agents with type parameters of type BaseAgentModifier and TypeFieldDescriptionprotected com.google.common.collect.ImmutableList<BaseAgent> BaseAgent.Builder.subAgentsMethods in com.google.adk.agents that return BaseAgentModifier and TypeMethodDescriptionInvocationContext.agent()返回正在被调用的代理(agent)。abstract BaseAgentBaseAgent.Builder.build()根据名称查找可用的代理。static BaseAgentBaseAgent.fromConfig(BaseAgentConfig config, String configAbsPath) 根据一个配置对象创建一个新的代理实例。static BaseAgentConfigAgentUtils.fromConfig(String configPath) 从 YAML 配置文件路径中加载代理程序。BaseAgent.parentAgent()从代理树中检索父代理。BaseAgent.rootAgent()通过向上遍历父代理链,返回该代理的根代理。Methods in com.google.adk.agents that return types with arguments of type BaseAgentModifier and TypeMethodDescriptioncom.google.common.collect.ImmutableList<BaseAgent> PlannerAction.RunAgents.agents()返回该值的值。agents“record component”(记录组件)。com.google.common.collect.ImmutableList<BaseAgent> PlanningContext.availableAgents()返回可供规划者选择的子代理(sub-agents)。根据名称查找某个代理(该代理本身或其子代理)。BaseAgent.findSubAgent(String name) 通过名称递归地搜索子代理(sub-agent)。static com.google.common.collect.ImmutableList<BaseAgent> ConfigAgentUtils.resolveSubAgents(List<BaseAgentConfig.AgentRefConfig> subAgentConfigs, String configAbsPath) 将子代理(subagent)的配置信息转换为实际的 BaseAgent 实例。BaseAgent.subAgents()Methods in com.google.adk.agents with parameters of type BaseAgentModifier and TypeMethodDescription用于指定被调用的代理(agent)。返回该数据集的“模式”(即数据集中各类别出现的频率)。agent在这种情况下,它作为工作流(workflow)中的一个节点来运行;如果没有工作流,则该节点为空。protected voidBaseAgent.parentAgent(BaseAgent parentAgent) 用于设置父代理(即负责管理其他代理的代理)。Method parameters in com.google.adk.agents with type arguments of type BaseAgentModifier and TypeMethodDescriptionConstructors in com.google.adk.agents with parameters of type BaseAgentConstructor parameters in com.google.adk.agents with type arguments of type BaseAgentModifierConstructorDescriptionBaseAgent(String name, @Nullable String description, @Nullable List<? extends BaseAgent> subAgents, @Nullable List<? extends Callbacks.BeforeAgentCallback> beforeAgentCallback, @Nullable List<? extends Callbacks.AfterAgentCallback> afterAgentCallback) 创建一个新的 BaseAgent。PlanningContext(InvocationContext invocationContext, com.google.common.collect.ImmutableList<BaseAgent> availableAgents) 创建一个……的实例。RunAgents记录类(Record Class)。 -
**用途:** BaseAgent 在……里面;处于……状态 com.google.adk.apps
Methods in com.google.adk.apps that return BaseAgentMethods in com.google.adk.apps with parameters of type BaseAgentModifier and TypeMethodDescription用于设置根代理(root agent),或在需要时清除该根代理。null. -
**用途:** BaseAgent 在……里面;处于……状态 com.google.adk.maven
Methods in com.google.adk.maven that return BaseAgent -
**用途:** BaseAgent 在……里面;处于……状态 com.google.adk.plugins
Methods in com.google.adk.plugins with parameters of type BaseAgentModifier and TypeMethodDescriptionio.reactivex.rxjava3.core.Maybe<com.google.genai.types.Content> DebugLoggingPlugin.afterAgentCallback(BaseAgent agent, CallbackContext callbackContext) io.reactivex.rxjava3.core.Maybe<com.google.genai.types.Content> LoggingPlugin.afterAgentCallback(BaseAgent agent, CallbackContext callbackContext) default io.reactivex.rxjava3.core.Maybe<com.google.genai.types.Content> Plugin.afterAgentCallback(BaseAgent agent, CallbackContext callbackContext) 在代理程序的主要逻辑执行完成后,会触发该回调函数。io.reactivex.rxjava3.core.Maybe<com.google.genai.types.Content> PluginManager.afterAgentCallback(BaseAgent agent, CallbackContext callbackContext) io.reactivex.rxjava3.core.Maybe<com.google.genai.types.Content> DebugLoggingPlugin.beforeAgentCallback(BaseAgent agent, CallbackContext callbackContext) io.reactivex.rxjava3.core.Maybe<com.google.genai.types.Content> LoggingPlugin.beforeAgentCallback(BaseAgent agent, CallbackContext callbackContext) default io.reactivex.rxjava3.core.Maybe<com.google.genai.types.Content> Plugin.beforeAgentCallback(BaseAgent agent, CallbackContext callbackContext) 回调函数在代理程序的主要逻辑被执行之前被调用。io.reactivex.rxjava3.core.Maybe<com.google.genai.types.Content> PluginManager.beforeAgentCallback(BaseAgent agent, CallbackContext callbackContext) io.reactivex.rxjava3.core.Maybe<com.google.genai.types.Content> SaveFilesAsArtifactsPlugin.beforeAgentCallback(BaseAgent agent, CallbackContext callbackContext) 该功能用于报告从用户消息中保存的版本信息;这些版本信息是在第一个代理程序开始运行时被记录下来的。需要注意的是:插件无法直接为用户自己的事件添加额外的操作(即无法修改用户事件的处理流程)。 -
**用途:** BaseAgent 在……里面;处于……状态 com.google.adk.plugins.agentanalytics
Methods in com.google.adk.plugins.agentanalytics with parameters of type BaseAgentModifier and TypeMethodDescriptionio.reactivex.rxjava3.core.Maybe<com.google.genai.types.Content> BigQueryAgentAnalyticsPlugin.afterAgentCallback(BaseAgent agent, CallbackContext callbackContext) io.reactivex.rxjava3.core.Maybe<com.google.genai.types.Content> BigQueryAgentAnalyticsPlugin.beforeAgentCallback(BaseAgent agent, CallbackContext callbackContext) -
**用途:** BaseAgent 在……里面;处于……状态 com.google.adk.runner
Methods in com.google.adk.runner that return BaseAgentMethods in com.google.adk.runner with parameters of type BaseAgentConstructors in com.google.adk.runner with parameters of type BaseAgentModifierConstructorDescriptionFirestoreDatabaseRunner(BaseAgent baseAgent, com.google.cloud.firestore.Firestore firestore) FirestoreDatabaseRunner 的构造函数FirestoreDatabaseRunner(BaseAgent baseAgent, String appName, com.google.cloud.firestore.Firestore firestore) 用于 FirestoreDatabaseRunner 的构造函数,该构造函数接受一个参数appName。FirestoreDatabaseRunner(BaseAgent baseAgent, String appName, List<BasePlugin> plugins, com.google.cloud.firestore.Firestore firestore) 用于创建 FirestoreDatabaseRunner 的构造函数,该构造函数接受一个父级 Runner 对象作为参数。InMemoryRunner(BaseAgent agent) InMemoryRunner(BaseAgent agent, String appName) InMemoryRunner(BaseAgent agent, String appName, List<? extends Plugin> plugins) Runner(BaseAgent agent, String appName, BaseArtifactService artifactService, BaseSessionService sessionService) 已弃用(Deprecated)。Runner(BaseAgent agent, String appName, BaseArtifactService artifactService, BaseSessionService sessionService, @Nullable BaseMemoryService memoryService) 已弃用(Deprecated)。使用Runner.Builder相反。Runner(BaseAgent agent, String appName, BaseArtifactService artifactService, BaseSessionService sessionService, @Nullable BaseMemoryService memoryService, List<? extends Plugin> plugins) 已弃用(Deprecated)。使用Runner.Builder相反。protectedRunner(BaseAgent agent, String appName, BaseArtifactService artifactService, BaseSessionService sessionService, @Nullable BaseMemoryService memoryService, List<? extends Plugin> plugins, @Nullable EventsCompactionConfig eventsCompactionConfig, @Nullable ContextCacheConfig contextCacheConfig) 已弃用(Deprecated)。使用Runner.Builder相反。protectedRunner(BaseAgent agent, String appName, BaseArtifactService artifactService, BaseSessionService sessionService, @Nullable BaseMemoryService memoryService, List<? extends Plugin> plugins, @Nullable EventsCompactionConfig eventsCompactionConfig, @Nullable ContextCacheConfig contextCacheConfig, @Nullable ResumabilityConfig resumabilityConfig) 已弃用(Deprecated)。使用Runner.Builder相反。 -
**用途:** BaseAgent 在……里面;处于……状态 com.google.adk.telemetry
Methods in com.google.adk.telemetry with parameters of type BaseAgentModifier and TypeMethodDescriptionInstrumentation.recordAgentInvocation(InvocationContext ctx, BaseAgent agent) 已弃用(Deprecated)。请改用那些明确指定了父上下文的版本。Instrumentation.recordAgentInvocation(InvocationContext ctx, BaseAgent agent, io.opentelemetry.context.Context parentContext) 创建一个……Instrumentation.AgentInvocation用于记录代理调用遥测数据的上下文环境,其中包含一个明确的父上下文(parent context)。Instrumentation.recordToolExecution(BaseTool tool, BaseAgent agent, Map<String, Object> functionArgs) 创建一个 `ToolExecution` 上下文对象,用于记录工具执行过程中的相关数据(即“遥测信息”)。Instrumentation.recordToolExecution(BaseTool tool, BaseAgent agent, Map<String, Object> functionArgs, io.opentelemetry.context.Context parentContext) 创建一个Instrumentation.ToolExecution用于记录工具执行情况的遥测数据(telemetry)的上下文环境;该上下文环境具有明确的“父上下文”(parent context)。Constructors in com.google.adk.telemetry with parameters of type BaseAgentModifierConstructorDescriptionAgentInvocation(InvocationContext ctx, BaseAgent agent, io.opentelemetry.context.Context parentContext) 构建一个新的……AgentInvocation遥测范围(Telemetry Scope)。ToolExecution(BaseTool tool, BaseAgent agent, Map<String, Object> functionArgs, io.opentelemetry.context.Context parentContext) 构建一个新的……ToolExecution遥测范围(Telemetry Scope)。 -
**用途:** BaseAgent 在……里面;处于……状态 com.google.adk.tools
Methods in com.google.adk.tools that return BaseAgentMethods in com.google.adk.tools with parameters of type BaseAgentConstructors in com.google.adk.tools with parameters of type BaseAgent -
**用途:** BaseAgent 在……里面;处于……状态 com.google.adk.tutorials
Fields in com.google.adk.tutorials declared as BaseAgentModifier and TypeFieldDescriptionstatic final BaseAgentCityTimeWeather.ROOT_AGENTstatic final BaseAgentLiveAudioSingleAgent.WEATHER_AGENT -
**用途:** BaseAgent 在……里面;处于……状态 com.google.adk.utils
Methods in com.google.adk.utils that return types with arguments of type BaseAgentModifier and TypeMethodDescriptionAdkComponentProvider.getAgentClasses()返回一个需要注册的代理类(agent classes)的列表。CoreAdkComponentProvider.getAgentClasses()ComponentRegistry.resolveAgentClass(String agentClassName) 根据配置文件中提供的代理类名称,加载相应的代理类。ComponentRegistry.resolveAgentInstance(String name) 从注册表中检索相应的代理实例。 -
**用途:** BaseAgent 在……里面;处于……状态 com.google.adk.web
Methods in com.google.adk.web that return BaseAgentModifier and TypeMethodDescription加载指定代理名称对应的 BaseAgent 实例。Methods in com.google.adk.web with parameters of type BaseAgentModifier and TypeMethodDescriptionAgentGraphGenerator.getAgentGraphDotSource(BaseAgent rootAgent, List<List<String>> highlightPairs) 生成代理图(agent graph)的 DOT 格式源代码字符串。static void用于启动服务器。agents除非另有说明,否则使用地址 127.0.0.1。server.address该值已被设置为指定的值。Constructors in com.google.adk.web with parameters of type BaseAgent
Runner.Builder相反。