AbstractConstructor for BaseAgent
Optionaldescription?: stringOptionalsubOptionalbeforeOptionalafterThe agent's name. Agent name must be a valid identifier and unique within the agent tree. Agent name cannot be "user", since it's reserved for end-user's input.
Description about the agent's capability. The model uses this to determine whether to delegate control to the agent. One-line description is enough and preferred.
OptionalparentThe parent agent of this agent. Note that an agent can ONLY be added as sub-agent once. If you want to add one agent twice as sub-agent, consider to create two agent instances with identical config, but with different name and add them to the agent tree.
The sub-agents of this agent.
OptionalbeforeCallback or list of callbacks to be invoked before the agent run. When a list of callbacks is provided, the callbacks will be called in the order they are listed until a callback does not return undefined.
Args: callbackContext: The callback context.
Returns: Content | undefined: The content to return to the user. When the content is present, the agent run will be skipped and the provided content will be returned to user.
OptionalafterCallback or list of callbacks to be invoked after the agent run. When a list of callbacks is provided, the callbacks will be called in the order they are listed until a callback does not return undefined.
Args: callbackContext: The callback context.
Returns: Content | undefined: The content to return to the user. When the content is present, the provided content will be used as agent response and appended to event history as agent response.
The resolved beforeAgentCallback field as a list of SingleAgentCallback. This method is only for use by Agent Development Kit.
The resolved afterAgentCallback field as a list of SingleAgentCallback. This method is only for use by Agent Development Kit.
Entry method to run an agent via text-based conversation.
Entry method to run an agent via video/audio-based conversation.
ProtectedrunCore logic to run this agent via text-based conversation.
ProtectedrunCore logic to run this agent via video/audio-based conversation.
Base class for all agents in Agent Development Kit.