Skip to main content

Module agent

Module agent 

Source
Available on crate feature agents only.
Expand description

Agent implementations (LLM, Custom, Workflow agents).

Provides the core agent types:

Available with feature: agents

Modules§

codeactcodeact
A CodeAct agent: a peer to LlmAgent that acts by writing and executing code instead of emitting one tool call at a time.
compaction
LLM-based event summarizer for context compaction.
guardrails
Guardrail integration for LlmAgent
team
Portable, validated multi-agent team composition.
tool_call_markup
XML-based tool call markup parsing.

Structs§

BlackboardPolicy
Bounded blackboard execution policy.
BlackboardSpec
Portable, governed shared-transcript team definition.
BlackboardTransition
One exact permitted speaker transition.
CircuitBreakerPolicy
Opens an edge circuit after repeated failures.
CompiledBlackboardTeam
Executable blackboard/group-chat root.
CompiledTeam
Executable root produced by TeamSpec::compile.
ConditionalAgent
Rule-based conditional routing agent.
CustomAgent
An agent with a user-defined async handler function.
CustomAgentBuilder
Builder for constructing a CustomAgent.
GuardrailSetNon-guardrails
Placeholder type when guardrails feature is disabled
LlmAgent
An LLM-powered agent that orchestrates tool calls and sub-agent delegation.
LlmAgentBuilder
Builder for constructing an LlmAgent with all configuration options.
LlmConditionalAgent
LLM-based intelligent conditional routing agent.
LlmConditionalAgentBuilder
Builder for constructing an LlmConditionalAgent.
LlmEventSummarizer
An LLM-based event summarizer for sliding window compaction.
LoopAgent
Loop agent executes sub-agents repeatedly for N iterations or until escalation
ParallelAgent
Parallel agent executes sub-agents concurrently
RelationshipPolicy
Contract enforced for one exact relationship.
ResolvedTeamMember
Immutable member binding captured when a team is compiled or discovered.
SequentialAgent
Sequential agent executes sub-agents once in order
StaticTeamAgentRegistry
Deterministic in-process registry useful for generated projects and tests.
TeamAgentDescriptor
Serializable candidate metadata returned by a team agent registry.
TeamBudget
Aggregate limits enforced across a root team invocation and its delegates.
TeamEdgeExecution
One causal relationship execution in a team invocation.
TeamExecutionAnalysis
Provider-free evaluation summary derived from a team execution receipt.
TeamExecutionSnapshot
Serializable execution receipt for one root team invocation.
TeamExecutionUsage
Aggregate resource usage recorded for a team invocation.
TeamLifecycleContext
Immutable context supplied to a TeamLifecycleHook.
TeamManagerBranch
One manager branch in a hierarchical architecture.
TeamMemberSpec
Serializable metadata for one team member.
TeamPolicy
Policies applied uniformly by a compiled team.
TeamRegistryRequirement
Portable governance constraints for dynamically discovered bindings.
TeamRelationship
One exact directed relationship between two team members.
TeamSpec
A portable team definition independent of concrete model or runtime types.
TeamTerminationPolicy
Clean termination conditions independent from hard resource budgets.

Enums§

BlackboardHistoryPolicy
Transcript projection visible to each blackboard speaker.
BlackboardSchedule
Speaker scheduling for a blackboard team.
RelationshipApprovalPolicy
Approval requirement for a relationship invocation.
RelationshipFailureStrategy
Failure handling for an exact relationship.
RelationshipKind
Control-flow semantics for a team relationship.
TeamAgentHealth
Health advertised by a registry candidate at resolution time.
TeamArchitectureTemplate
Portable LLM-directed team architecture presets.
TeamContextPolicy
Context sharing policy for agent-as-tool delegation.
TeamError
Validation or compilation failure for a TeamSpec.
TeamExecutionStatus
Lifecycle state of a team or relationship execution.
TeamFailurePolicy
Failure behavior for team relationships.
TeamHistoryPolicy
Conversation history exposed to a delegated member.
TeamLifecycleDecision
Decision returned before a team lifecycle boundary executes.
TeamLifecycleOutcome
Result observed after a team lifecycle boundary.
TeamLifecyclePhase
Lifecycle boundary exposed by portable team execution.
TeamReplayError
Integrity failure found while validating an execution receipt for replay/evaluation.
TeamResumePlan
Safe action a durable host can take for a restored execution receipt.
TeamResumePolicy
Recovery contract for a delegation that was running when execution stopped.
TeamRuntimeError
Structured failure produced while a compiled team is executing.
TeamStateMergePolicy
Merge policy for state returned by an exact delegation edge.
WorkflowArchitectureTemplate
Portable deterministic workflow presets built from existing agent types.

Constants§

DEFAULT_LOOP_MAX_ITERATIONS
Default maximum iterations for LoopAgent when none is specified. Prevents infinite loops from consuming unbounded resources.
DEFAULT_MAX_ITERATIONS
Default maximum number of LLM round-trips (iterations) before the agent stops.
DEFAULT_TOOL_TIMEOUT
Default tool execution timeout (5 minutes).
TEAM_EDGE_ID_KEY
Event metadata key containing the causal relationship execution identifier.
TEAM_EXECUTION_STATE_KEY
Session state key containing the latest serializable team execution receipt.
TEAM_ROOT_INVOCATION_KEY
Event metadata key containing the stable root team invocation identifier.

Traits§

Agent
The fundamental trait for all ADK agents.
TeamAgentRegistry
Discovers and resolves local or remote agents for portable team members.
TeamLifecycleHook
Async team execution hook.

Functions§

analyze_team_execution
Computes deterministic topology coverage and failure metrics.
extract_typed
Extract a typed value from agent events.
normalize_content
Normalize content by converting tool call markup in text parts to FunctionCall parts.
normalize_option_content
Normalize Option<Content> by converting tool call markup.
validate_team_replay
Validates receipt integrity against an immutable TeamSpec.

Type Aliases§

AfterToolCallbackFull
Rich after-tool callback that receives the tool, arguments, and response.
OnToolErrorCallback
Callback invoked when a tool execution fails (after retries are exhausted).