flutter_adk library

Flutter-facing ADK facade package.

This library re-exports the Web-safe ADK runtime surface from package:adk_dart/adk_core.dart, plugin platform utilities, and ready-to-use Flutter UI widgets and controllers.

Classes

ActivityEvent
Generic activity or status event.
AdkAbortController
Controller used by callers to cancel an ADK invocation.
AdkAbortSignal
Read-only cancellation signal propagated through an invocation.
AdkAgentHierarchyBadge
A breadcrumb / badge widget displaying the active agent in a multi-agent hierarchy.
AdkAgentLogEntry
Represents a single I/O log entry recorded during agent execution.
AdkAgentLoggerController
A reactive controller for buffering, filtering, searching, and exporting AI Agent I/O logs and telemetry.
AdkAgentLoggerView
A developer logger widget for inspecting input, output, tool calls, and state changes of ADK agents in real-time.
AdkAgentManagementView
A turnkey administrative dashboard and inspector widget for managing, observing, and toggling AI agents.
AdkAgentManagerController
A centralized reactive controller for managing, toggling, observing, and hot-swapping multiple AI agents.
AdkAgentMetadata
Rich metadata, configuration, and state descriptor for an ADK agent in the management registry.
AdkAgentMetrics
Execution telemetry and performance metrics for a managed agent.
AdkAgentPersonaSelector
A responsive Grid / Carousel card selector for picking from multiple AI agent personas.
AdkAttachment
Represents a media or document attachment in AdkChatMessage.
AdkAudioWaveVisualizer
An animated audio waveform visualizer that reacts to audio streaming.
AdkBottomSheetChat
A modal bottom sheet widget hosting an interactive ADK chat interface.
AdkChatController
State controller that manages conversation events, streaming responses, and message history for ADK agents in Flutter.
AdkChatMessage
A structured chat message displayed in the ADK Flutter chat UI.
AdkChatThemeData
Theming configuration for ADK Flutter UI components and chat views.
AdkChatView
A complete, turnkey and highly customizable Chat UI widget for interacting with ADK agents.
AdkConfirmationBanner
A Human-in-the-Loop (HITL) confirmation banner displayed inline when an agent requests user permission before executing an action.
AdkCustomStorage
Adapter allowing developers to construct an AdkKeyValueStorage from simple callbacks without subclassing.
AdkDevStudioView
A developer studio widget replicating the capabilities of adk web directly inside Flutter.
AdkEventStreamBuilder
A reactive widget builder that listens to an ADK Stream<adk.Event> and updates the UI as events and state changes arrive.
AdkFloatingChatButton
A floating action button (FAB) that opens an AdkChatView in a modal bottom sheet.
AdkFormField
Data model representing a single field in an AdkSmartFormView.
AdkInlineAction
Data model representing a quick inline action in AdkInlineAssistantBar.
AdkInlineAssistantBar
An inline Copilot toolbar placed above or below text inputs to run one-click AI refinements.
AdkKeyValueStorage
A lightweight key-value storage interface for ADK Flutter apps.
AdkMemoryStorage
In-memory implementation of AdkKeyValueStorage.
AdkMessageBubble
A customizable message bubble widget representing user, model, tool, or system messages.
AdkMetricRecord
One ADK metric sample.
AdkMetricsRecorder
Sink for ADK metric samples.
AdkPersona
Data model representing an AI Agent Persona.
AdkPromptSuggestion
A rich prompt suggestion chip model for AdkPromptSuggestionsBar.
AdkPromptSuggestionsBar
A horizontal scrollable bar of suggestion chips that users can tap to quickly send prompts.
AdkReasoningExpander
A collapsible/expandable accordion widget designed for displaying AI reasoning / thinking steps.
AdkSessionController
A reactive controller for managing conversation sessions, history lists, and storage synchronization.
AdkSessionDrawer
A sidebar drawer widget displaying the user's past conversation sessions.
AdkSessionInfo
Metadata model representing a chat or multi-agent conversation session.
AdkSmartFormController
A reactive controller for managing conversational form fields, auto-extraction, validation, and submission.
AdkSmartFormView
A turnkey conversational smart form view where an AI agent auto-populates form fields through dialogue.
AdkSplitPaneView
A multi-pane split layout widget tailored for Web, Desktop, and Tablet AI development and monitoring.
AdkStorageSessionService
A adk.BaseSessionService implementation backed by an AdkKeyValueStorage.
AdkStructuredDataView
A widget for displaying structured output data (JSON / Map / List) with formatted syntax styling, copy-to-clipboard, and key-value inspectability.
AdkTheme
An InheritedWidget that provides AdkChatThemeData down the widget tree.
AdkTokenUsage
Model representing token consumption metrics and latency.
AdkTokenUsageBadge
A compact chip badge widget displaying token usage metrics (prompt, candidate, and total tokens).
AdkToolCallCard
An expandable card widget displaying tool execution arguments, progress, and results.
AdkToolCallInfo
A structured model representing an executed or active tool call turn.
AdkToolInspectorView
A developer inspector widget displaying all tools registered to an agent, their descriptions, and their parameter schemas.
AdkTypingIndicator
An animated typing / thinking indicator displayed while an agent generates responses.
AdkVoiceController
A reactive controller for managing real-time voice input/output state, audio levels, and live turns.
AdkVoiceMicButton
A voice microphone action button for triggering real-time speech / Gemini Live interactions.
AdkVoiceState
State model for AdkVoiceMicButton and AdkAudioWaveVisualizer.
AdkWorkflowController
A reactive controller for orchestrating and observing ADK 2.0 Workflows and multi-agent pipelines.
AdkWorkflowProgressIndicator
A horizontal or vertical timeline progress indicator for ADK 2.0 Workflows.
AdkWorkflowStep
A structured model representing a single step in a multi-agent workflow.
AgentNode
Node that wraps an ADK BaseAgent.
AgentTool
Tool adapter that executes another agent as a tool call.
AnthropicLlm
Anthropic Claude adapter for ADK model requests.
AnthropicRestHttpTransport
Default HTTP-backed transport for the Anthropic Messages API.
AnthropicRestTransport
Transport abstraction for Anthropic Messages API calls.
App
App container describing root agent, plugins, and runtime options.
ArtifactVersion
Metadata describing one persisted artifact version.
BaseAgent
Base class for all agent implementations.
BaseAgentState
Generic mutable state holder for agent-local state.
BaseArtifactService
Base contract for artifact persistence services.
BaseLlm
Base interface for model adapters used by the runner.
BaseMemoryService
Base contract for memory ingestion and search implementations.
BaseNode
Base class for node-based workflow units.
BasePlugin
Base class for ADK runtime plugins.
BaseSessionService
Contract for session lifecycle and event persistence operations.
BaseTelemetryService
Contract for telemetry trace/span lifecycle services.
BaseTool
Base contract for one callable tool exposed to the model runtime.
BranchPath
Hierarchical path representation for dynamic execution branches.
CallCodeEvent
Request to execute code.
CodeResultEvent
Result of code execution.
Content
One conversation turn consisting of a role and Part list.
ContentEvent
User-visible text content.
Context
Mutable context for a single agent invocation.
DynamicJson
Helpers for tolerant JSON encode/decode behavior.
Edge
Directed workflow edge.
ErrorEvent
Runtime error event.
Event
One runtime event emitted during an invocation.
EventActions
Mutable action payload attached to one event.
EventCompaction
Compaction summary metadata attached to an event.
EventsCompactionConfig
Configuration for event compaction behavior.
FileData
File reference payload attached to a Part.
FinishedEvent
Final response marker.
FinishTaskTool
Tool that validates final task output and signals completion.
FlutterAdk
Provides the Flutter-facing entry point for ADK platform features.
Frontmatter
L1 skill metadata parsed from SKILL.md frontmatter.
FunctionCall
Function-call payload emitted by model responses.
FunctionCallingConfig
Function-calling configuration attached to tool settings.
FunctionDeclaration
Function-calling declaration exposed to the model.
FunctionNode
Function-backed workflow node.
FunctionResponse
Function-response payload sent back to the model.
FunctionTool
Wraps a Dart callable as a runtime tool.
Gemini
Google Gemini model adapter with REST, interactions, and live support.
GemmaLlm
Gemma model adapter implemented on top of Gemini transport behavior.
GenerateContentConfig
Generation configuration for text/content model calls.
GetSessionConfig
Options for narrowing session retrieval results.
GetUserChoiceTool
Long-running function tool that prompts user to select from a list of options.
GoogleSearchTool
Tool wrapper for Google Search grounding.
HttpOptions
HTTP configuration for model API requests.
HttpRetryOptions
Retry policy for HTTP model requests.
InlineData
Inline binary payload attached to a Part.
InMemoryAdkMetricsRecorder
Metrics recorder that stores samples in memory for tests and adapters.
InMemoryArtifactService
Artifact service backed by process-local memory maps.
InMemoryMemoryService
Memory service backed by process-local event collections.
InMemoryRunner
Runner wired with in-memory session and artifact services.
InMemorySessionService
Session service backed by process-local maps.
InMemorySkillBuilder
Builder for one in-memory skill.
InMemorySkillData
Complete in-memory payload for one skill source entry.
InMemorySkillSource
In-memory SkillSource implementation.
InMemorySkillSourceBuilder
Builder for InMemorySkillSource.
InMemoryTelemetryService
In-memory telemetry implementation for local development and tests.
InvocationContext
Mutable invocation context shared across agent execution steps.
InvocationPlan
One invocation strategy used to call flexible user functions.
JoinNode
Node that passes through aggregated predecessor inputs.
ListSessionsResponse
Response model for session list operations.
ListSkillsTool
Tool to list all locally available skills.
LiteLlm
OpenAI-compatible adapter that targets LiteLLM providers.
LiveActivityEnd
Marker indicating the end of a live activity segment.
LiveActivityStart
Marker indicating the start of a live activity segment.
LiveConnectConfig
Realtime connection configuration for live model sessions.
LiveRequest
A single queued live request payload.
LiveRequestQueue
In-memory FIFO queue for live requests.
LiveSkillGcsStore
Web stub for live GCS-backed skill storage.
LlmAgent
Core LLM agent that drives model and tool orchestration flows.
LlmCapabilities
Resolved capabilities for an LLM instance.
LLMRegistry
Registry that maps model patterns to concrete LLM adapters.
LlmRequest
Full model request payload used by LLM adapters.
LlmResponse
Normalized model response emitted by LLM adapters.
LlmToolConfig
Tool-level configuration wrapper for model requests.
LoadMcpResourceTool
Tool that injects MCP resource contents into pending LLM requests.
LoadSkillResourceTool
Tool to load a resource from a skill bundle.
LoadSkillTool
Tool to load a skill's main instructions.
LocalSkillSource
Filesystem-backed SkillSource, unsupported on Web.
LoopAgent
Workflow agent that iterates through sub-agents repeatedly.
LoopAgentState
Serialized resumability state for LoopAgent.
ManagedAgent
An agent backed by the Managed Agents API (interactions.create).
McpBaseTool
Lightweight MCP tool descriptor used by McpTool.
McpResourceContent
Content returned by resources/read.
McpSessionManager
Central registry and transport manager for MCP sessions.
McpTool
Auth-aware MCP tool wrapper that delegates calls through McpSessionManager.
McpToolset
Toolset that exposes tools and resources from one MCP connection.
MemoryEntry
One memory item with content and optional metadata.
Node
Node designed for subclassing.
NodeInfo
Workflow node metadata attached to an Event.
NodePathBuilder
Represents a path to a node in a hierarchical workflow.
NodeState
Mutable state for one workflow node.
NodeTool
A tool wrapper that executes a BaseNode (e.g. a workflow function node or tool node) as a standard ADK BaseTool.
NoopAdkMetricsRecorder
Metrics recorder that intentionally drops all samples.
ParallelAgent
Workflow agent that runs sub-agents concurrently.
ParallelWorker
Node that runs a wrapped child node for every input item in parallel.
Part
One multimodal content part within a Content turn.
PluginManager
Coordinates plugin registration and callback dispatching.
PreciseTimestamp
Utilities for preserving microsecond precision timestamps.
ReflectAndRetryModelPlugin
Provides self-healing, concurrent-safe error recovery for model failures.
ReflectAndRetryToolPlugin
Plugin that provides reflection guidance and bounded retries for tool errors.
RemoteMcpServer
A remote MCP server executed server-side by the Managed Agents API.
ReplayManager
ReplayManager - unified orchestrator for event rehydration, interception, and sequence barriers.
ReplaySequenceBarrier
Chronological barrier used to coordinate deterministic replay ordering.
RequestInput
Data used to request additional user input from a workflow or agent.
RequestInputTool
Long-running tool that requests human input before execution continues.
Resources
L3 skill resources loaded from references/assets/scripts directories.
ResumabilityConfig
Resumability settings for an app.
RunConfig
Configuration object controlling one agent run behavior.
Runner
Coordinates session lifecycle, plugins, and agent execution.
RunSkillScriptTool
Tool to execute scripts from a skill bundle.
Script
Wrapper for script content.
SearchMemoryResponse
Response model returned by memory search operations.
SearchSkillsTool
Tool to search a configured skill registry for relevant skills.
SequentialAgent
Workflow agent that runs sub-agents one-by-one.
SequentialAgentState
Serialized resumability state for SequentialAgent.
Session
A conversational session containing state and event history.
SessionStateDelta
Split representation of app, user, and session-scoped state entries.
SingleTurnAgentTool
Tool adapter for a sub-agent configured with mode: 'single_turn'.
Skill
Complete skill representation with metadata, instructions, and resources.
SkillDescriptor
Minimal shape shared by all skill descriptors.
SkillGcsStore
Web stub for GCS-backed skill storage.
SkillRegistry
In-memory registry for named Skill objects.
SkillSource
Asynchronous source interface for skill metadata, instructions, resources.
SkillToolset
Toolset exposing skill-discovery, loading, and script-execution tools.
StdioConnectionParams
Process launch options for an MCP stdio server.
StorageEventV1
Event row model for schema v1.
StorageMetadataV1
Key-value metadata row model for schema v1.
StorageSessionV1
Session row model for schema v1.
StreamableHTTPConnectionParams
Connection options for an MCP server that supports Streamable HTTP.
StructuredEvent
Base class for typed structured events.
TaskAgentTool
Tool adapter for a sub-agent configured with mode: 'task'.
TaskRequest
A request to delegate work to a task agent.
TaskResult
Result returned by a task agent after completion.
TelemetryLogRecord
One log entry recorded under a telemetry span.
TelemetrySpan
Span model representing one traced operation.
ThoughtEvent
Reasoning text emitted by the model.
ToolCallEvent
Request to execute a tool.
ToolConfirmationEvent
Request for user confirmation of tool calls.
ToolDeclaration
Tool declaration payload sent to model backends.
ToolFailureResponse
Structured tool failure payload returned by reflect-and-retry flows.
ToolNode
Node that wraps an ADK BaseTool.
ToolResultEvent
Result returned by a tool.
ToolThreadPoolConfig
Thread-pool configuration for concurrent tool execution.
UrlContextTool
Built-in URL context retrieval tool for supported Gemini models.
VertexAiRagResource
Vertex AI RAG resource reference.
VertexAiRagRetrieval
Retrieval tool that integrates with Vertex AI RAG.
VertexAiRagStore
Store-level RAG query configuration used by VertexAiRagRetrieval.
VertexAiSearchConfig
Retrieval configuration used by VertexAiSearchTool.
VertexAiSearchDataStoreSpec
One Vertex AI Search data store reference.
VertexAiSearchTool
Built-in retrieval tool wrapper for Vertex AI Search.
VertexRagRetrievalTool
Server-side Vertex AI RAG retrieval tool.
VoiceActivity
Voice activity event payload received from Live bidirectional stream.
Workflow
Node-based workflow agent.
WorkflowContext
Shared runtime context passed to workflow nodes.
WorkflowResult
Execution result from Workflow.runWorkflow.

Enums

AdkAgentStatus
Operational lifecycle status of a managed agent.
AdkLogCategory
Category filter options for AdkAgentLogEntry.
AdkMessageRole
The sender role of a chat message.
AdkStepStatus
Execution status for a workflow pipeline step.
AdkToolStatus
Status of an agent tool execution turn.
AdkVoiceStatus
Operational status of an interactive voice input session.
EventType
Categories emitted by toStructuredEvents.
FunctionCallingConfigMode
Function-calling modes recognized by model providers.
FunctionResponseScheduling
Controls when a function response should be scheduled and delivered during Live mode.
NodeStatus
Runtime status for a workflow node.
StreamingMode
Streaming transport mode used by a run.
ToolErrorType
Semantic tool error types aligned with OpenTelemetry error attributes.
ToolExecutionMode
Execution mode used when a model requests multiple tools in one turn.
TrackingScope
Scope used to track per-tool retry counts.
VoiceActivityType
Type of voice activity detected on the audio channel.

Constants

DEFAULT_ROUTE → const String
Default route value used by routed workflow edges.
defaultMaxKeyLength → const int
Default max key length used by storage schemas.
defaultMaxVarcharLength → const int
Default max varchar length used by storage schemas.
defaultSkillSystemInstruction → const String
Default system instruction injected when skill tools are enabled.
finishTaskSuccessResult → const String
Success result returned by FinishTaskTool.run.
finishTaskToolName → const String
Function name used by task agents to signal completion.
genAiAgentInvocationDurationMetric → const String
Metric name for agent invocation durations.
genAiAgentRequestSizeMetric → const String
Metric name for agent request sizes.
genAiAgentResponseSizeMetric → const String
Metric name for agent response sizes.
genAiToolExecutionDurationMetric → const String
Metric name for tool execution durations.
genAiToolRequestSizeMetric → const String
Metric name for tool request sizes.
genAiToolResponseSizeMetric → const String
Metric name for tool response sizes.
getUserChoiceFunctionName → const String
globalScopeKey → const String
Global scope key used when failure counters are shared process-wide.
listSkillsToolName → const String
Tool name constant for ListSkillsTool.
loadSkillResourceToolName → const String
Tool name constant for LoadSkillResourceTool.
loadSkillToolName → const String
Tool name constant for LoadSkillTool.
mcpReservedToolNames → const Set<String>
Reserved tool names that cannot be overridden by external MCP tools.
reflectAndRetryResponseType → const String
Response type emitted when this plugin handles a tool failure.
reservedToolCallErrorType → const String
runSkillScriptToolName → const String
Tool name constant for RunSkillScriptTool.
searchSkillsToolName → const String
Tool name constant for SearchSkillsTool.
START → const String
Sentinel node name used for workflow start edges.

Properties

adkMetricsRecorder AdkMetricsRecorder
The process-wide metrics recorder used by ADK helpers.
no setter
getUserChoice GetUserChoiceTool
Global singleton instance of GetUserChoiceTool.
final
Backward-compatible alias for googleSearch.
final
googleSearch GoogleSearchTool
Shared singleton instance of GoogleSearchTool.
final
requestInput RequestInputTool
Default request-input tool instance.
final
urlContext UrlContextTool
Shared URL context tool instance.
final

Functions

applyRewinds(List<Event> events) List<Event>
Returns events with rewound invocations removed.
buildNode(Object nodeLike, {String? name, String description = '', List<String>? dependsOn, bool? rerunOnResume, bool? waitForOutput, RetryConfig? retryConfig, Duration? timeout}) BaseNode
Converts a workflow-compatible object into a BaseNode.
buildSkillSystemInstruction({String? prefix, Set<String>? allowedTools, String? skillsFolder, bool scriptExecutionEnabled = true}) String
Builds the system instruction for skill tools.
contentSizeBytes(Content? content) int
Returns the UTF-8 and inline-data byte size of content.
createRequestInputEvent(RequestInput requestInput, {String invocationId = '', String author = '', String? role}) Event
Creates a long-running function-call event for requestInput.
createRequestInputResponse(String interruptId, Map<String, dynamic> response) Part
Creates a function-response part for a request-input interrupt.
decodeEventData(Map<String, Object?> eventData, {String? id, String? invocationId, double? timestamp}) Event
Decodes v1 event_data payload into runtime Event.
decodeModel<T>(Object? data, T fromJson(Map<String, Object?> json)) → T?
Decodes data into a model using fromJson.
encodeEventData(Event event) Map<String, Object?>
Encodes runtime event into v1 event_data payload.
eventActionsFromJson(Map<String, Object?> json) EventActions
Deserializes json into EventActions.
eventActionsToJson(EventActions actions) Map<String, Object?>
Serializes actions into a JSON-compatible map.
eventNodeInfoFromJson(Map<String, Object?> json) NodeInfo
Deserializes json into workflow NodeInfo.
eventNodeInfoToJson(NodeInfo nodeInfo, {bool snakeCase = false}) Map<String, Object?>
Serializes nodeInfo into a JSON-compatible map.
extractStateDelta(Map<String, Object?>? state) SessionStateDelta
Splits a mixed state map into app, user, and session deltas.
formatSkillsAsXml(List<SkillDescriptor> skills) String
Renders a skill summary list as XML text for model prompts.
getRequestInputInterruptIds(Event event) List<String>
Returns request-input interrupt ids contained in event.
getTime() double
Returns the current time in seconds since the Unix epoch.
getUtcNow() DateTime
Returns the current UTC time derived from getTime.
hasRequestInputFunctionCall(Event event) bool
Whether event contains a request-input function call.
listSkillsInDir(String skillsBasePath) Map<String, Frontmatter>
Returns no directory-backed skills on Web.
listSkillsInGcsDir(String bucketName, {String skillsBasePath = '', Object? storageStore}) Future<Map<String, Frontmatter>>
Throws because GCS-backed skill loading is unsupported on Web.
loadSkillFromDir(String skillDirPath) Skill
Throws because directory-based skill loading is unsupported on Web.
loadSkillFromGcsDir(String bucketName, String skillId, {String skillsBasePath = '', Object? storageStore}) Future<Skill>
Throws because GCS-backed skill loading is unsupported on Web.
loadSkillFromZipBytes(List<int> zipBytes) Skill
Loads a Skill from ZIP bytes containing a root-level SKILL.md.
newAdkId({String prefix = ''}) String
Returns a new identifier prefixed by prefix.
newUuid() String
Returns a new unique identifier string.
node(WorkflowFunction function, {required String name, String description = '', List<String>? dependsOn, bool rerunOnResume = false, RetryConfig? retryConfig, Duration? timeout}) FunctionNode
Convenience wrapper matching Python's node(...) helper.
parallelWorker(Object nodeLike, {int? maxConcurrency, int? maxParallelWorkers, RetryConfig? retryConfig, Duration? timeout}) ParallelWorker
Wraps nodeLike in a ParallelWorker.
readSkillProperties(String skillDirPath) Frontmatter
Throws because skill-property file loading is unsupported on Web.
recordAgentInvocationDuration(String agentName, Duration duration, {Object? error, AdkMetricsRecorder? recorder}) → void
Records the duration of an agent invocation.
recordAgentRequestSize(String agentName, Content? userContent, {AdkMetricsRecorder? recorder}) → void
Records the byte size of the user content sent to an agent.
recordAgentResponseSize(String agentName, List<Event>? events, {AdkMetricsRecorder? recorder}) → void
Records the byte size of the last response content authored by an agent.
recordToolExecutionDuration(String toolName, String agentName, Duration duration, {Object? error, AdkMetricsRecorder? recorder}) → void
Records the duration of a tool execution.
recordToolRequestSize(String toolName, String agentName, Map<String, Object?> functionArgs, {AdkMetricsRecorder? recorder}) → void
Records the byte size of string-valued tool arguments.
recordToolResponseSize(String toolName, String agentName, Event? responseEvent, {AdkMetricsRecorder? recorder}) → void
Records the byte size of a tool response event.
resetAdkMetricsRecorderForTest() → void
Restores the process-wide metrics recorder to a no-op recorder.
resetIdProvider() → void
Restores the default unique ID provider.
resetTimeProvider() → void
Restores the default system time provider.
setAdkMetricsRecorder(AdkMetricsRecorder recorder) → void
Sets the process-wide ADK metrics recorder.
setIdProvider(IdProvider provider) → void
Sets the provider used by newUuid.
setTimeProvider(TimeProvider provider) → void
Sets the provider used by getTime.
showAdkChatBottomSheet<T>({required BuildContext context, BaseAgent? agent, Runner? runner, AdkChatController? controller, AdkChatThemeData? theme, String title = 'AI Assistant', String? subtitle, String inputPlaceholder = 'Ask something...', List<String>? suggestions, double initialChildSize = 0.85, double minChildSize = 0.5, double maxChildSize = 0.95, bool isDismissible = true, bool enableDrag = true, Widget? header, Widget avatarBuilder(BuildContext context, AdkChatMessage message)?, Widget messageBubbleBuilder(BuildContext context, AdkChatMessage message)?, Widget inputBarBuilder(BuildContext context, TextEditingController controller, VoidCallback onSend, bool isLoading)?, Widget emptyStateBuilder(BuildContext context)?}) Future<T?>
Opens a turnkey ADK AI Assistant in a modal draggable bottom sheet.
toolRequestSizeBytes(Map<String, Object?> functionArgs) int
Returns the request byte size for string-valued tool arguments.
toStructuredEvents(Event event) List<StructuredEvent>
Converts a raw Event into typed structured events.
trimTempState(Map<String, Object?>? state) Map<String, Object?>
Returns state without transient temp: entries.
validateAppName(String name) → void
Validates that name is a supported app identifier.
validateNodeData(Object? schema, Object? data) Object?
Validates and sanitizes node input data against schema.
validateSkillDir(String skillDirPath) List<String>
Reports unsupported validation mode on Web.

Typedefs

AdkSessionItem = AdkSessionInfo
Legacy alias for AdkSessionInfo.
AdkWorkflowNodeStatus = AdkStepStatus
Legacy alias for AdkStepStatus.
AfterModelCallback = FutureOr<LlmResponse?> Function(CallbackContext callbackContext, LlmResponse llmResponse)
Callback invoked after model generation.
AfterToolCallback = FutureOr<Map<String, dynamic>?> Function(BaseTool tool, Map<String, dynamic> args, ToolContext toolContext, Map<String, dynamic> toolResponse)
Callback invoked after a tool call succeeds.
Agent = LlmAgent
Alias for LlmAgent kept for API parity.
AgentLifecycleCallback = FutureOr<Content?> Function(CallbackContext callbackContext)
Callback signature for agent lifecycle hooks.
AnthropicApiInvoker = Future<List<Map<String, Object?>>> Function({required Map<String, Object?> request, required bool stream})
Callback that invokes Anthropic message APIs and returns raw responses.
AnthropicGenerateHook = Stream<LlmResponse> Function(LlmRequest request, bool stream)
Hook for overriding Anthropic generation behavior.
AnthropicStreamInvoker = Stream<Map<String, Object?>> Function({required Map<String, Object?> request})
Callback that streams raw Anthropic SSE event payloads.
BeforeModelCallback = FutureOr<LlmResponse?> Function(CallbackContext callbackContext, LlmRequest llmRequest)
Callback invoked before model generation.
BeforeToolCallback = FutureOr<Map<String, dynamic>?> Function(BaseTool tool, Map<String, dynamic> args, ToolContext toolContext)
Callback invoked before a tool call executes.
CallbackContext = Context
Mutable agent context exposed to callbacks.
Claude = AnthropicLlm
Backward-compatible alias for AnthropicLlm.
ConfirmationPredicate = FutureOr<bool> Function(Map<String, dynamic> args)
Callback signature for dynamic confirmation requirements.
GeminiGenerateHook = Stream<LlmResponse> Function(LlmRequest request, bool stream)
Hook for overriding Gemini generation behavior.
GeminiInteractionsInvoker = Stream<LlmResponse> Function(LlmRequest request, {required bool stream})
Invoker hook for Gemini interactions API generation.
GeminiLiveSessionFactory = GeminiLiveSession Function(LlmRequest request)
Factory that creates live Gemini session transports.
GoogleLlm = Gemini
Backward-compatible alias for Gemini.
IdProvider = String Function()
InstructionProvider = FutureOr<String> Function(ReadonlyContext context)
Dynamic instruction provider callback.
JsonMap = Map<String, dynamic>
JSON-compatible map type used across model and tool payloads.
LiteLlmCompletionsInvoker = Future<List<Map<String, Object?>>> Function({required Map<String, Object?> payload, required bool stream})
Callback that invokes a LiteLLM-compatible completions endpoint.
LiteLlmGenerateHook = Stream<LlmResponse> Function(LlmRequest request, bool stream)
Hook for overriding LiteLLM generation behavior.
LlmFactory = BaseLlm Function(String model)
Factory function that creates an LLM adapter for a model string.
McpConnectionParams = Object
Union type alias for supported MCP transport connection parameters.
McpElicitationCallback = FutureOr<Object?> Function(Map<String, Object?> params)
Callback invoked when an MCP server requests client elicitation (elicitation/create).
McpHeaderProvider = Map<String, String> Function(ReadonlyContext readonlyContext)
Header-builder callback applied to MCP tool calls in this toolset.
McpSamplingCallback = FutureOr<Object?> Function(List<Map<String, Object?>> messages, {Map<String, Object?>? params})
Callback invoked when an MCP server requests client-side sampling.
McpToolExecutor = FutureOr<Object?> Function(Map<String, dynamic> args, {Map<String, String>? headers})
Callback signature for custom local MCP tool executors.
McpToolHeaderProvider = Map<String, String> Function(ReadonlyContext readonlyContext)
Header-builder callback used before making MCP tool HTTP calls.
OnModelErrorCallback = FutureOr<LlmResponse?> Function(CallbackContext callbackContext, LlmRequest llmRequest, Exception error)
Callback invoked when model generation throws.
OnToolErrorCallback = FutureOr<Map<String, dynamic>?> Function(BaseTool tool, Map<String, dynamic> args, ToolContext toolContext, Exception error)
Callback invoked when a tool call throws.
RemoteMcpHeaderProvider = FutureOr<Map<String, String>?> Function(ReadonlyContext context)
Callback signature for dynamic MCP headers.
SkillMetadataValue = Object?
Metadata value allowed in skill frontmatter.
SkillResourceData = Object
Resource payload allowed in skill references/assets.
StructuredErrorEvent = ErrorEvent
Alias for callers that prefer an unambiguous Dart-specific name.
TimeProvider = double Function()
ToolContext = Context
Mutable tool execution context alias used by tool interfaces.
VertexAiRagQueryHandler = Future<List<String>> Function({List<String>? ragCorpora, List<VertexAiRagResource>? ragResources, int? similarityTopK, required String text, double? vectorDistanceThreshold})
Callback signature for live Vertex AI RAG querying.
WorkflowFunction = FutureOr<Object?> Function(WorkflowContext context, Object? nodeInput)
Function callback signature for FunctionNode.

Exceptions / Errors

AdkAbortException
Exception thrown when an operation observes an aborted ADK signal.
AlreadyExistsError
Exception indicating that a resource already exists.
AnthropicApiException
Anthropic API exception with HTTP and body context.
InputValidationError
Exception indicating invalid user or API input.
LiteLlmException
Exception thrown when a LiteLLM/Ollama HTTP request fails.
LlmCallsLimitExceededError
Error thrown when LLM call count exceeds the configured limit.
MalformedFunctionCallException
Exception thrown when the model returned a malformed function call.
McpHttpStatusException
Thrown when an HTTP request returns a non-success status code.
McpJsonRpcException
Thrown when a JSON-RPC response contains an error object.
NodeInterruptedError
NodeTimeoutError
Error thrown when a node exceeds its timeout.
NotFoundError
Exception indicating missing resources.
PluginManagerException
Exception thrown for plugin manager callback/close failures.
ResourceExhaustedModelException
Exception thrown when model capacity is exhausted.
SessionNotFoundError
Exception indicating missing session resource.
SkillSourceException
Exception used by SkillSource implementations.
StaleSessionError
Exception indicating an optimistic concurrency conflict during session update.
ToolExecutionError
Exception raised when a tool fails with a semantic error classification.