Skip to main content

Module context

Module context 

Source
Expand description

Core traits and types.

Always available regardless of feature flags. Includes:

  • Agent - The fundamental trait for all agents
  • Tool / Toolset - For extending agents with capabilities
  • Session / State - For managing conversation context
  • Event - For streaming agent responses
  • AdkError / Result - Unified error handling Invocation context traits: state, session, artifacts, memory, and run configuration.

Structs§

MemoryEntry
A single entry returned from memory search.
RunConfig
Configuration for a single agent run.
RunConfigBuilder
Builder for RunConfig.
ToolCallbackContext
Wraps a CallbackContext to inject tool name and input for before-tool and after-tool callbacks.
ToolConcurrencyConfig
Configuration for tool execution concurrency.
ToolConfirmationRequest
Payload describing a tool call awaiting human confirmation.
ToolOutcome
Structured metadata about a completed tool execution.

Enums§

BackpressurePolicy
Policy for handling excess tool calls when the concurrency limit is reached.
IncludeContents
Controls what parts of prior conversation history is received by llmagent
StreamingMode
Streaming mode for agent responses. Matches ADK Python/Go specification.
ToolConfirmationDecision
Decision applied when a tool execution requires human confirmation.
ToolConfirmationPolicy
Policy defining which tools require human confirmation before execution.

Constants§

MAX_STATE_KEY_LEN
Maximum allowed length for state keys (256 bytes).

Traits§

Artifacts
Binary artifact storage for agents.
CallbackContext
Context available to agent lifecycle callbacks.
InvocationContext
Full invocation context available to agents during execution.
Memory
Semantic memory search for agents.
ReadonlyContext
Read-only access to invocation metadata.
ReadonlyState
Read-only view of session state.
SecretService
Trait for retrieving secrets at runtime.
Session
Represents an active conversation session with identity and state.
State
Mutable session state with key-value storage.

Functions§

validate_state_key
Validates a state key. Returns Ok(()) if the key is safe, or an error message.