.agents/skills/adk-architecture/references/interfaces/base-agent.md
BaseAgent is the base class for all agents in the ADK. Developers subclass BaseAgent to create custom agentic entities. It inherits from BaseNode and provides the core structure and lifecycle management for agents.
[!IMPORTANT] Since agents now extend
BaseNode, the originalrun_asyncentrance method is considered deprecated. Developers should rely on the newrunmethod fromBaseNodeand use_run_implas the primary override point for custom logic.
When creating a custom agent by subclassing BaseAgent, you should focus on the following:
_run_impl (Preferred Override Point)Core logic to run the agent as a workflow node.
Arguments:
ctx: Context, the node execution context.node_input: Any, the input to the node.Yields:
The following methods were used for text and live conversations but are being superseded by the node-based execution model:
_run_async_impl: Core logic for text-based conversation._run_live_impl: Core logic for live conversation.name: The agent's name. Must be a valid Python identifier and unique within the agent tree. Cannot be "user".description: A description of the agent's capability, used by the model for delegation choices.sub_agents: A list of child agents to support hierarchical delegation.