.agents/skills/adk-architecture/references/interfaces/agent.md
The Agent (represented by BaseAgent in code) is a public interface in ADK that serves as a blueprint defining identity, instructions, and tools for an agentic entity. It inherits from BaseNode and can be part of a larger workflow or act as a standalone agent.
before_agent_callback and after_agent_callback for intercepting lifecycle events.[!IMPORTANT] Since agents now extend
BaseNode, the originalrun_asyncentrance method is considered deprecated. Developers should rely on the newrunmethod fromBaseNodeto execute agents as workflow nodes.
run (Preferred Entrance)The method inherited from BaseNode to execute the agent.
run_async (Deprecated)Legacy entry method to run an agent via text-based conversation.
Arguments:
parent_context: InvocationContext, the invocation context of the parent agent.Yields:
Event: The events generated by the agent.run_liveEntry method to run an agent via video/audio-based conversation.
Arguments:
parent_context: InvocationContext, the invocation context of the parent agent.Yields:
Event: The events generated by the agent.from_configClass method to create an agent from a configuration object.