Module prelude

Module prelude 

Source
Expand description

Convenience prelude for common imports.

Import everything you need with a single line:

use adk_rust::prelude::*;

This includes:

  • Core traits: Agent, Tool, Llm, Session
  • Agent builders: LlmAgentBuilder, CustomAgentBuilder
  • Workflow agents: SequentialAgent, ParallelAgent, LoopAgent
  • Models: GeminiModel
  • Tools: FunctionTool, GoogleSearchTool, McpToolset
  • Services: InMemorySessionService, InMemoryArtifactService
  • Runtime: Runner, RunnerConfig
  • Common types: Arc, Result, Content, Event

Structs§

Arc
A thread-safe reference-counting pointer. ‘Arc’ stands for ‘Atomically Reference Counted’.
BasicToolsettools
ConditionalAgentagents
Conditional agent runs different sub-agents based on a condition
Content
Core traits and types.
CustomAgentagents
CustomAgentBuilderagents
Event
Core traits and types.
ExitLoopTooltools
FunctionTooltools
GeminiModelmodels
GoogleSearchTooltools
GoogleSearch is a built-in tool that is automatically invoked by Gemini models to retrieve search results from Google Search. The tool operates internally within the model and does not require or perform local code execution.
GraphAgentgraph
GraphAgent wraps a CompiledGraph as an ADK Agent
InMemoryArtifactServiceartifacts
InMemoryMemoryServicememory
InMemorySessionServicesessions
LlmAgentagents
LlmAgentBuilderagents
LlmRequest
Core traits and types.
LlmResponse
Core traits and types.
LoadArtifactsTooltools
LoopAgentagents
Loop agent executes sub-agents repeatedly for N iterations or until escalation
McpToolsettools
MCP Toolset - connects to an MCP server and exposes its tools as ADK tools.
NodeOutputgraph
Output from a node execution
ParallelAgentagents
Parallel agent executes sub-agents concurrently
Routergraph
Router helper functions for common patterns
RunConfig
Core traits and types.
Runnerrunner
RunnerConfigrunner
SequentialAgentagents
Sequential agent executes sub-agents once in order
StateGraphgraph
Builder for constructing graphs
UiToolsetui
A toolset containing all UI rendering tools.

Enums§

AdkError
Core traits and types.
BeforeModelResult
Core traits and types.
Part
Core traits and types.

Constants§

ENDgraph
STARTgraph
Special node identifiers

Traits§

Agent
Core traits and types.
InvocationContext
Core traits and types.
Llm
Core traits and types.
Session
Core traits and types.
State
Core traits and types.
Tool
Core traits and types.
ToolContext
Core traits and types.
Toolset
Core traits and types.

Type Aliases§

AnyhowResult
Result<T, Error>
EventStream
Core traits and types.
Result
Core traits and types.

Attribute Macros§

async_trait