Runner is the core of the execution engine: it coordinates the agent, tools,
and callbacks to respond to user input, while managing the flow of information,
state changes, and interactions with the model, tools, and storage. VeADK’s
execution engine is fully compatible with Google ADK’s Runner; see the
Google ADK runtime docs for its
full mechanics.
Multi-tenant isolation
For enterprise multi-tenant scenarios,Runner isolates data along three
dimensions — app_name, user_id, and session_id:
Minimal run
Runner.run() runs an agent directly, handling input and returning the final
text response — convenient for local testing:
run() is high-level. When the Runner has a short-term session configured, it
creates the session on demand. For finer-grained control over execution, use
run_async().Use Harness execution enhancements
VeADK 1.0.1 provides Harness plugins that attach toRunner to prepare context before each turn, compact large tool results, and check whether final answers are supported by tool results. The base plugins ship with VeADK. Install the harness extra when using the Headroom compaction provider:
Discover remote agents from AgentKit
When deploying a Harness service, enable AgentKit A2A Registry to discover matching remote agents from an agent center for each turn:REGISTRY_TOP_K limits the candidates retrieved per turn and defaults to 3. The runtime needs access to AgentKit A2A Registry. When a remote Agent Card declares authentication, it also needs the corresponding API key or Identity OpenAPI permissions. See Outbound authentication for OAuth2 remote calls.
Streaming events
Runner.run_async() returns an async generator that yields the events produced
during the agent’s run. Unlike run(), which only returns the final text,
iterating over events gives you the reasoning, tool calls and results, and
streaming increments — useful for building your own logic on top.
run_async() requires the session to exist beforehand. If you call it directly,
make sure the session for session_id has been created.Parsing events
Each event describes one step of the run. Its common fields:
Each
part in content.parts may be a different type; branch on it:
The event also offers helpers:
is_final_response() tells whether it is the
final reply, and get_function_calls() / get_function_responses() extract the
tool calls and results from the event.