pub struct CodeActAgentBuilder { /* private fields */ }agents and codeact only.Expand description
Builder for CodeActAgent.
model and runtime are required; every
other setting has a default. The configuration surface mirrors
LlmAgentBuilder (instructions, tools, toolsets,
retries, guardrails, callbacks, transfer, output schema, …).
§Example
use std::sync::Arc;
use std::time::Duration;
use adk_agent::codeact::CodeActAgent;
let agent = CodeActAgent::builder()
.name("assistant")
.model(model)
.runtime(runtime)
.temperature(0.2)
.tool_timeout(Duration::from_secs(30))
.require_tool_confirmation("delete_file")
.build()?;Implementations§
Source§impl CodeActAgentBuilder
impl CodeActAgentBuilder
Sourcepub fn new() -> CodeActAgentBuilder
pub fn new() -> CodeActAgentBuilder
Create a builder with default settings.
Sourcepub fn name(self, name: impl Into<String>) -> CodeActAgentBuilder
pub fn name(self, name: impl Into<String>) -> CodeActAgentBuilder
Set the agent name.
Sourcepub fn description(self, description: impl Into<String>) -> CodeActAgentBuilder
pub fn description(self, description: impl Into<String>) -> CodeActAgentBuilder
Set the agent description.
Sourcepub fn model(self, model: Arc<dyn Llm>) -> CodeActAgentBuilder
pub fn model(self, model: Arc<dyn Llm>) -> CodeActAgentBuilder
Set the model (required).
Sourcepub fn runtime(self, runtime: Arc<dyn CodeRuntime>) -> CodeActAgentBuilder
pub fn runtime(self, runtime: Arc<dyn CodeRuntime>) -> CodeActAgentBuilder
Set the code runtime (required).
Sourcepub fn tool(self, tool: Arc<dyn Tool>) -> CodeActAgentBuilder
pub fn tool(self, tool: Arc<dyn Tool>) -> CodeActAgentBuilder
Register a tool callable from scripts.
Sourcepub fn sub_agent(self, agent: Arc<dyn Agent>) -> CodeActAgentBuilder
pub fn sub_agent(self, agent: Arc<dyn Agent>) -> CodeActAgentBuilder
Add a sub-agent this agent may transfer control to.
When any sub-agent is present (or the Runner supplies transfer targets),
the transfer_to_agent
output is described to the model.
Sourcepub fn toolset(self, toolset: Arc<dyn Toolset>) -> CodeActAgentBuilder
pub fn toolset(self, toolset: Arc<dyn Toolset>) -> CodeActAgentBuilder
Add a toolset whose tools are resolved fresh on each invocation from the
run’s ReadonlyContext (e.g. per-user or pooled tools). Resolved tools
are merged with static tools; duplicate names are rejected at run time.
Sourcepub fn with_skills(self, index: SkillIndex) -> CodeActAgentBuilder
Available on crate feature skills only.
pub fn with_skills(self, index: SkillIndex) -> CodeActAgentBuilder
skills only.Set a preloaded skills index. The most relevant skill for each user query is injected into the system prompt.
Sourcepub fn with_auto_skills(self) -> Result<CodeActAgentBuilder, AdkError>
Available on crate feature skills only.
pub fn with_auto_skills(self) -> Result<CodeActAgentBuilder, AdkError>
skills only.Auto-load skills from .skills/ in the current working directory.
§Errors
Returns an error if the skills directory cannot be loaded.
Sourcepub fn with_skills_from_root(
self,
root: impl AsRef<Path>,
) -> Result<CodeActAgentBuilder, AdkError>
Available on crate feature skills only.
pub fn with_skills_from_root( self, root: impl AsRef<Path>, ) -> Result<CodeActAgentBuilder, AdkError>
skills only.Load skills from .skills/ under a custom root directory.
§Errors
Returns an error if the skills directory cannot be loaded.
Sourcepub fn with_skill_policy(self, policy: SelectionPolicy) -> CodeActAgentBuilder
Available on crate feature skills only.
pub fn with_skill_policy(self, policy: SelectionPolicy) -> CodeActAgentBuilder
skills only.Customize skill selection behavior.
Sourcepub fn with_skill_budget(self, max_chars: usize) -> CodeActAgentBuilder
Available on crate feature skills only.
pub fn with_skill_budget(self, max_chars: usize) -> CodeActAgentBuilder
skills only.Limit injected skill content length (default 2000 chars).
Sourcepub fn disallow_transfer_to_parent(self, disallow: bool) -> CodeActAgentBuilder
pub fn disallow_transfer_to_parent(self, disallow: bool) -> CodeActAgentBuilder
Prevent this agent from transferring control back to its parent.
Applies only to the parent the Runner supplies via
RunConfig::parent_agent; sub-agents are unaffected.
Sourcepub fn disallow_transfer_to_peers(self, disallow: bool) -> CodeActAgentBuilder
pub fn disallow_transfer_to_peers(self, disallow: bool) -> CodeActAgentBuilder
Prevent this agent from transferring control to peer agents.
Applies only to the runner-provided peers in RunConfig::transfer_targets;
sub-agents are unaffected.
Sourcepub fn tool_confirmation_policy(
self,
policy: ToolConfirmationPolicy,
) -> CodeActAgentBuilder
pub fn tool_confirmation_policy( self, policy: ToolConfirmationPolicy, ) -> CodeActAgentBuilder
Set the tool confirmation policy.
Sourcepub fn require_tool_confirmation(
self,
tool_name: impl Into<String>,
) -> CodeActAgentBuilder
pub fn require_tool_confirmation( self, tool_name: impl Into<String>, ) -> CodeActAgentBuilder
Require human confirmation for a specific tool.
Sourcepub fn require_tool_confirmation_for_all(self) -> CodeActAgentBuilder
pub fn require_tool_confirmation_for_all(self) -> CodeActAgentBuilder
Require human confirmation for every tool call.
Sourcepub fn generate_content_config(
self,
config: GenerateContentConfig,
) -> CodeActAgentBuilder
pub fn generate_content_config( self, config: GenerateContentConfig, ) -> CodeActAgentBuilder
Set the generation config (temperature, tokens, etc.) applied to every model request.
Sourcepub fn temperature(self, temperature: f32) -> CodeActAgentBuilder
pub fn temperature(self, temperature: f32) -> CodeActAgentBuilder
Set the default sampling temperature for model requests.
Sourcepub fn top_p(self, top_p: f32) -> CodeActAgentBuilder
pub fn top_p(self, top_p: f32) -> CodeActAgentBuilder
Set the default top-p for model requests.
Sourcepub fn top_k(self, top_k: i32) -> CodeActAgentBuilder
pub fn top_k(self, top_k: i32) -> CodeActAgentBuilder
Set the default top-k for model requests.
Sourcepub fn max_output_tokens(self, max_tokens: i32) -> CodeActAgentBuilder
pub fn max_output_tokens(self, max_tokens: i32) -> CodeActAgentBuilder
Set the default maximum output tokens for model requests.
Sourcepub fn tool_timeout(self, timeout: Duration) -> CodeActAgentBuilder
pub fn tool_timeout(self, timeout: Duration) -> CodeActAgentBuilder
Set the per-tool execution timeout (default: 5 minutes).
A ToolEffect::NonIdempotent call that times out is raised into the
script as an outcome_unknown_response,
because its side effect may already have happened.
Sourcepub fn output_key(self, key: impl Into<String>) -> CodeActAgentBuilder
pub fn output_key(self, key: impl Into<String>) -> CodeActAgentBuilder
Set a session state key under which the final result value is stored.
Sourcepub fn before_callback(
self,
callback: Box<dyn Fn(Arc<dyn CallbackContext>) -> Pin<Box<dyn Future<Output = Result<Option<Content>, AdkError>> + Send>> + Sync + Send>,
) -> CodeActAgentBuilder
pub fn before_callback( self, callback: Box<dyn Fn(Arc<dyn CallbackContext>) -> Pin<Box<dyn Future<Output = Result<Option<Content>, AdkError>> + Send>> + Sync + Send>, ) -> CodeActAgentBuilder
Add a before-agent callback.
Callbacks run in registration order before the loop starts; the first to
return Some(content) short-circuits the run with that content.
Sourcepub fn after_callback(
self,
callback: Box<dyn Fn(Arc<dyn CallbackContext>) -> Pin<Box<dyn Future<Output = Result<Option<Content>, AdkError>> + Send>> + Sync + Send>,
) -> CodeActAgentBuilder
pub fn after_callback( self, callback: Box<dyn Fn(Arc<dyn CallbackContext>) -> Pin<Box<dyn Future<Output = Result<Option<Content>, AdkError>> + Send>> + Sync + Send>, ) -> CodeActAgentBuilder
Add an after-agent callback.
Callbacks run after the loop completes (not on suspension); the first to
return Some(content) emits that content and wins.
Sourcepub fn before_model_callback(
self,
callback: Box<dyn Fn(Arc<dyn CallbackContext>, LlmRequest) -> Pin<Box<dyn Future<Output = Result<BeforeModelResult, AdkError>> + Send>> + Sync + Send>,
) -> CodeActAgentBuilder
pub fn before_model_callback( self, callback: Box<dyn Fn(Arc<dyn CallbackContext>, LlmRequest) -> Pin<Box<dyn Future<Output = Result<BeforeModelResult, AdkError>> + Send>> + Sync + Send>, ) -> CodeActAgentBuilder
Add a before-model callback, invoked before each model request.
A callback may rewrite the request
(BeforeModelResult::Continue)
or skip the model call entirely with a synthetic response
(BeforeModelResult::Skip).
Sourcepub fn after_model_callback(
self,
callback: Box<dyn Fn(Arc<dyn CallbackContext>, LlmResponse) -> Pin<Box<dyn Future<Output = Result<Option<LlmResponse>, AdkError>> + Send>> + Sync + Send>,
) -> CodeActAgentBuilder
pub fn after_model_callback( self, callback: Box<dyn Fn(Arc<dyn CallbackContext>, LlmResponse) -> Pin<Box<dyn Future<Output = Result<Option<LlmResponse>, AdkError>> + Send>> + Sync + Send>, ) -> CodeActAgentBuilder
Add an after-model callback, invoked after each model response is
assembled. Returning Some(response) replaces the response the loop uses
to extract the next script.
Sourcepub fn before_tool_callback(
self,
callback: Box<dyn Fn(Arc<dyn CallbackContext>) -> Pin<Box<dyn Future<Output = Result<Option<Content>, AdkError>> + Send>> + Sync + Send>,
) -> CodeActAgentBuilder
pub fn before_tool_callback( self, callback: Box<dyn Fn(Arc<dyn CallbackContext>) -> Pin<Box<dyn Future<Output = Result<Option<Content>, AdkError>> + Send>> + Sync + Send>, ) -> CodeActAgentBuilder
Add a before-tool callback, invoked before each tool call. The first to
return Some(content) short-circuits the call; that content is converted
to a value and fed back into the script as the tool’s result.
Sourcepub fn after_tool_callback(
self,
callback: Box<dyn Fn(Arc<dyn CallbackContext>) -> Pin<Box<dyn Future<Output = Result<Option<Content>, AdkError>> + Send>> + Sync + Send>,
) -> CodeActAgentBuilder
pub fn after_tool_callback( self, callback: Box<dyn Fn(Arc<dyn CallbackContext>) -> Pin<Box<dyn Future<Output = Result<Option<Content>, AdkError>> + Send>> + Sync + Send>, ) -> CodeActAgentBuilder
Add an after-tool callback, invoked after each tool attempt resolves. The
first to return Some(content) replaces the result fed back to the script.
Sourcepub fn after_tool_callback_full(
self,
callback: Box<dyn Fn(Arc<dyn CallbackContext>, Arc<dyn Tool>, Value, Value) -> Pin<Box<dyn Future<Output = Result<Option<Value>, AdkError>> + Send>> + Sync + Send>,
) -> CodeActAgentBuilder
pub fn after_tool_callback_full( self, callback: Box<dyn Fn(Arc<dyn CallbackContext>, Arc<dyn Tool>, Value, Value) -> Pin<Box<dyn Future<Output = Result<Option<Value>, AdkError>> + Send>> + Sync + Send>, ) -> CodeActAgentBuilder
Add a rich after-tool callback receiving the tool, arguments, and response
value. Returning Some(value) replaces the result fed back to the script.
These run after the plain after_tool_callback
chain.
Sourcepub fn on_tool_error(
self,
callback: Box<dyn Fn(Arc<dyn CallbackContext>, Arc<dyn Tool>, Value, String) -> Pin<Box<dyn Future<Output = Result<Option<Value>, AdkError>> + Send>> + Sync + Send>,
) -> CodeActAgentBuilder
pub fn on_tool_error( self, callback: Box<dyn Fn(Arc<dyn CallbackContext>, Arc<dyn Tool>, Value, String) -> Pin<Box<dyn Future<Output = Result<Option<Value>, AdkError>> + Send>> + Sync + Send>, ) -> CodeActAgentBuilder
Add an on-tool-error callback. When a tool ultimately fails, callbacks
run in order; the first to return Some(value) supplies a fallback
result (fed back as if the tool succeeded). If none do, the error is
raised into the script.
Sourcepub fn default_retry_budget(self, budget: RetryBudget) -> CodeActAgentBuilder
pub fn default_retry_budget(self, budget: RetryBudget) -> CodeActAgentBuilder
Set the default retry budget applied to tools without a per-tool override.
Sourcepub fn tool_retry_budget(
self,
tool_name: impl Into<String>,
budget: RetryBudget,
) -> CodeActAgentBuilder
pub fn tool_retry_budget( self, tool_name: impl Into<String>, budget: RetryBudget, ) -> CodeActAgentBuilder
Set a per-tool retry budget override (takes precedence over the default).
Sourcepub fn circuit_breaker_threshold(self, threshold: u32) -> CodeActAgentBuilder
pub fn circuit_breaker_threshold(self, threshold: u32) -> CodeActAgentBuilder
Set the circuit-breaker threshold: after this many consecutive failures in one invocation, a tool is short-circuited with an immediate error until the next run.
Sourcepub fn input_schema(self, schema: Value) -> CodeActAgentBuilder
pub fn input_schema(self, schema: Value) -> CodeActAgentBuilder
Set a JSON schema describing this agent’s input (descriptive metadata, e.g. for exposing the agent as a tool; not enforced at runtime).
Sourcepub fn output_schema(self, schema: Value) -> CodeActAgentBuilder
pub fn output_schema(self, schema: Value) -> CodeActAgentBuilder
Require the final result to validate against this JSON schema. On a
mismatch the model is asked to correct it, up to
output_max_retries times.
Sourcepub fn output_type<T>(self) -> CodeActAgentBuilderwhere
T: JsonSchema,
pub fn output_type<T>(self) -> CodeActAgentBuilderwhere
T: JsonSchema,
Require the final result to match T’s JSON schema. Convenience over
output_schema using schemars.
Sourcepub fn output_max_retries(self, retries: usize) -> CodeActAgentBuilder
pub fn output_max_retries(self, retries: usize) -> CodeActAgentBuilder
Set the maximum number of output-schema correction retries (default 3).
Sourcepub fn input_guardrails(self, guardrails: GuardrailSet) -> CodeActAgentBuilder
pub fn input_guardrails(self, guardrails: GuardrailSet) -> CodeActAgentBuilder
Set guardrails applied to the incoming user content before the run. A
block aborts the run; a transform (e.g. PII redaction) rewrites it.
No-op unless the guardrails feature is enabled.
Sourcepub fn output_guardrails(self, guardrails: GuardrailSet) -> CodeActAgentBuilder
pub fn output_guardrails(self, guardrails: GuardrailSet) -> CodeActAgentBuilder
Set guardrails applied to the final result before it is emitted.
No-op unless the guardrails feature is enabled.
Sourcepub fn enhanced_plugin(
self,
plugin: Arc<dyn EnhancedPlugin>,
) -> CodeActAgentBuilder
Available on crate feature enhanced-plugins only.
pub fn enhanced_plugin( self, plugin: Arc<dyn EnhancedPlugin>, ) -> CodeActAgentBuilder
enhanced-plugins only.Register an enhanced plugin. Plugins intercept tool and model calls
(modify args/results/requests/responses or short-circuit them), running
in priority order. Requires the enhanced-plugins feature.
Sourcepub fn enhanced_plugins(
self,
plugins: Vec<Arc<dyn EnhancedPlugin>>,
) -> CodeActAgentBuilder
Available on crate feature enhanced-plugins only.
pub fn enhanced_plugins( self, plugins: Vec<Arc<dyn EnhancedPlugin>>, ) -> CodeActAgentBuilder
enhanced-plugins only.Register multiple enhanced plugins at once.
Sourcepub fn instruction(self, instruction: impl Into<String>) -> CodeActAgentBuilder
pub fn instruction(self, instruction: impl Into<String>) -> CodeActAgentBuilder
Set the agent instruction, placed first in the system prompt.
{key} is replaced with the session state value under key (an error when it is
missing), {key?} with the value or nothing, {app:key}, {user:key}, and
{temp:key} with prefixed state, and {artifact.name} with the artifact’s text. See
adk_core::inject_session_state.
Sourcepub fn instruction_provider(
self,
provider: Box<dyn Fn(Arc<dyn ReadonlyContext>) -> Pin<Box<dyn Future<Output = Result<String, AdkError>> + Send>> + Sync + Send>,
) -> CodeActAgentBuilder
pub fn instruction_provider( self, provider: Box<dyn Fn(Arc<dyn ReadonlyContext>) -> Pin<Box<dyn Future<Output = Result<String, AdkError>> + Send>> + Sync + Send>, ) -> CodeActAgentBuilder
Set a dynamic instruction provider evaluated per invocation (takes
precedence over the static instruction).
Sourcepub fn static_instruction(
self,
instruction: impl Into<String>,
) -> CodeActAgentBuilder
pub fn static_instruction( self, instruction: impl Into<String>, ) -> CodeActAgentBuilder
Set an instruction sent exactly as written, after any selected skill and before the
global instruction and instruction.
No {key} placeholder is read, so text you do not control — a skill file, a tool’s
documentation — keeps its braces.
Sourcepub fn global_instruction(
self,
instruction: impl Into<String>,
) -> CodeActAgentBuilder
pub fn global_instruction( self, instruction: impl Into<String>, ) -> CodeActAgentBuilder
Set a global instruction placed before the agent instruction. Supports the same
{key} placeholders as instruction.
Sourcepub fn global_instruction_provider(
self,
provider: Box<dyn Fn(Arc<dyn ReadonlyContext>) -> Pin<Box<dyn Future<Output = Result<String, AdkError>> + Send>> + Sync + Send>,
) -> CodeActAgentBuilder
pub fn global_instruction_provider( self, provider: Box<dyn Fn(Arc<dyn ReadonlyContext>) -> Pin<Box<dyn Future<Output = Result<String, AdkError>> + Send>> + Sync + Send>, ) -> CodeActAgentBuilder
Set a dynamic global instruction provider evaluated per invocation (takes
precedence over the static global_instruction).
Sourcepub fn include_contents(self, include: IncludeContents) -> CodeActAgentBuilder
pub fn include_contents(self, include: IncludeContents) -> CodeActAgentBuilder
Control which conversation history the agent sees (default: full).
Sourcepub fn max_iterations(self, max: u32) -> CodeActAgentBuilder
pub fn max_iterations(self, max: u32) -> CodeActAgentBuilder
Set the maximum number of model turns.
Sourcepub fn max_error_chars(self, max: usize) -> CodeActAgentBuilder
pub fn max_error_chars(self, max: usize) -> CodeActAgentBuilder
Set the maximum error-message length fed back to the model.
Sourcepub fn build(self) -> Result<CodeActAgent, AdkError>
pub fn build(self) -> Result<CodeActAgent, AdkError>
Build the CodeActAgent.
§Errors
Returns a config error if the model or runtime was not set, and an
error with code agent.duplicate_tool_name when two tools share a name.
Trait Implementations§
Source§impl Default for CodeActAgentBuilder
impl Default for CodeActAgentBuilder
Source§fn default() -> CodeActAgentBuilder
fn default() -> CodeActAgentBuilder
Auto Trait Implementations§
impl !RefUnwindSafe for CodeActAgentBuilder
impl !UnwindSafe for CodeActAgentBuilder
impl Forget for CodeActAgentBuilder
impl Freeze for CodeActAgentBuilderwhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
*const ArcInner<dyn Llm> is !null: Freeze,
PhantomData<ArcInner<dyn Llm>>: Freeze,
PhantomData<Arc<dyn Tool>>: Freeze,
PhantomData<Arc<dyn Toolset>>: Freeze,
*const ArcInner<dyn CodeRuntime> is !null: Freeze,
PhantomData<ArcInner<dyn CodeRuntime>>: Freeze,
*const LeafNode<String, SetValZST> is !null: Freeze,
PhantomData<(Owned, LeafOrInternal)>: Freeze,
PhantomData<Box<(String, SetValZST)>>: Freeze,
*const ArcInner<SkillIndex> is !null: Freeze,
PhantomData<ArcInner<SkillIndex>>: Freeze,
PhantomData<String>: Freeze,
*const ArcInner<Box<dyn Fn(Arc<dyn ReadonlyContext>) -> Pin<Box<dyn Future<Output = Result<String, AdkError>> + Send>> + Sync + Send>> is !null: Freeze,
PhantomData<ArcInner<Box<dyn Fn(Arc<dyn ReadonlyContext>) -> Pin<Box<dyn Future<Output = Result<String, AdkError>> + Send>> + Sync + Send>>>: Freeze,
PhantomData<Arc<dyn Agent>>: Freeze,
PhantomData<Value>: Freeze,
PhantomData<usize>: Freeze,
PhantomData<Bucket<String, Value>>: Freeze,
PhantomData<Box<dyn Fn(Arc<dyn CallbackContext>) -> Pin<Box<dyn Future<Output = Result<Option<Content>, AdkError>> + Send>> + Sync + Send>>: Freeze,
PhantomData<Box<dyn Fn(Arc<dyn CallbackContext>, LlmRequest) -> Pin<Box<dyn Future<Output = Result<BeforeModelResult, AdkError>> + Send>> + Sync + Send>>: Freeze,
PhantomData<Box<dyn Fn(Arc<dyn CallbackContext>, LlmResponse) -> Pin<Box<dyn Future<Output = Result<Option<LlmResponse>, AdkError>> + Send>> + Sync + Send>>: Freeze,
PhantomData<Box<dyn Fn(Arc<dyn CallbackContext>, Arc<dyn Tool>, Value, Value) -> Pin<Box<dyn Future<Output = Result<Option<Value>, AdkError>> + Send>> + Sync + Send>>: Freeze,
PhantomData<(String, RetryBudget)>: Freeze,
PhantomData<Box<dyn Fn(Arc<dyn CallbackContext>, Arc<dyn Tool>, Value, String) -> Pin<Box<dyn Future<Output = Result<Option<Value>, AdkError>> + Send>> + Sync + Send>>: Freeze,
PhantomData<Arc<dyn Guardrail>>: Freeze,
PhantomData<Arc<dyn EnhancedPlugin>>: Freeze,
impl Move for CodeActAgentBuilder
impl Send for CodeActAgentBuilderwhere
RawVecInner: Send,
Arc<dyn Llm>: Send,
Arc<dyn Tool>: Send,
Arc<dyn Toolset>: Send,
Arc<dyn CodeRuntime>: Send,
NodeRef<Owned, String, SetValZST, LeafOrInternal>: Send,
BoxRaw<(String, SetValZST)>: Send,
Arc<SkillIndex>: Send,
Arc<Box<dyn Fn(Arc<dyn ReadonlyContext>) -> Pin<Box<dyn Future<Output = Result<String, AdkError>> + Send>> + Sync + Send>>: Send,
Arc<dyn Agent>: Send,
RawTable<usize>: Send,
BoxRaw<dyn Fn(Arc<dyn CallbackContext>) -> Pin<Box<dyn Future<Output = Result<Option<Content>, AdkError>> + Send>> + Sync + Send>: Send,
BoxRaw<dyn Fn(Arc<dyn CallbackContext>, LlmRequest) -> Pin<Box<dyn Future<Output = Result<BeforeModelResult, AdkError>> + Send>> + Sync + Send>: Send,
BoxRaw<dyn Fn(Arc<dyn CallbackContext>, LlmResponse) -> Pin<Box<dyn Future<Output = Result<Option<LlmResponse>, AdkError>> + Send>> + Sync + Send>: Send,
BoxRaw<dyn Fn(Arc<dyn CallbackContext>, Arc<dyn Tool>, Value, Value) -> Pin<Box<dyn Future<Output = Result<Option<Value>, AdkError>> + Send>> + Sync + Send>: Send,
RawTable<(String, RetryBudget)>: Send,
BoxRaw<dyn Fn(Arc<dyn CallbackContext>, Arc<dyn Tool>, Value, String) -> Pin<Box<dyn Future<Output = Result<Option<Value>, AdkError>> + Send>> + Sync + Send>: Send,
Arc<dyn Guardrail>: Send,
Arc<dyn EnhancedPlugin>: Send,
impl Sync for CodeActAgentBuilderwhere
RawVecInner: Sync,
Arc<dyn Llm>: Sync,
Arc<dyn Tool>: Sync,
Arc<dyn Toolset>: Sync,
Arc<dyn CodeRuntime>: Sync,
NodeRef<Owned, String, SetValZST, LeafOrInternal>: Sync,
BoxRaw<(String, SetValZST)>: Sync,
Arc<SkillIndex>: Sync,
Arc<Box<dyn Fn(Arc<dyn ReadonlyContext>) -> Pin<Box<dyn Future<Output = Result<String, AdkError>> + Send>> + Sync + Send>>: Sync,
Arc<dyn Agent>: Sync,
RawTable<usize>: Sync,
BoxRaw<dyn Fn(Arc<dyn CallbackContext>) -> Pin<Box<dyn Future<Output = Result<Option<Content>, AdkError>> + Send>> + Sync + Send>: Sync,
BoxRaw<dyn Fn(Arc<dyn CallbackContext>, LlmRequest) -> Pin<Box<dyn Future<Output = Result<BeforeModelResult, AdkError>> + Send>> + Sync + Send>: Sync,
BoxRaw<dyn Fn(Arc<dyn CallbackContext>, LlmResponse) -> Pin<Box<dyn Future<Output = Result<Option<LlmResponse>, AdkError>> + Send>> + Sync + Send>: Sync,
BoxRaw<dyn Fn(Arc<dyn CallbackContext>, Arc<dyn Tool>, Value, Value) -> Pin<Box<dyn Future<Output = Result<Option<Value>, AdkError>> + Send>> + Sync + Send>: Sync,
RawTable<(String, RetryBudget)>: Sync,
BoxRaw<dyn Fn(Arc<dyn CallbackContext>, Arc<dyn Tool>, Value, String) -> Pin<Box<dyn Future<Output = Result<Option<Value>, AdkError>> + Send>> + Sync + Send>: Sync,
Arc<dyn Guardrail>: Sync,
Arc<dyn EnhancedPlugin>: Sync,
impl Unpin for CodeActAgentBuilderwhere
*const u8 is !null: Unpin,
Arc<dyn Llm>: Unpin,
Arc<dyn Tool>: Unpin,
Arc<dyn Toolset>: Unpin,
Arc<dyn CodeRuntime>: Unpin,
*const LeafNode<String, SetValZST> is !null: Unpin,
Box<(String, SetValZST)>: Unpin,
Arc<SkillIndex>: Unpin,
Arc<Box<dyn Fn(Arc<dyn ReadonlyContext>) -> Pin<Box<dyn Future<Output = Result<String, AdkError>> + Send>> + Sync + Send>>: Unpin,
Arc<dyn Agent>: Unpin,
Box<dyn Fn(Arc<dyn CallbackContext>) -> Pin<Box<dyn Future<Output = Result<Option<Content>, AdkError>> + Send>> + Sync + Send>: Unpin,
Box<dyn Fn(Arc<dyn CallbackContext>, LlmRequest) -> Pin<Box<dyn Future<Output = Result<BeforeModelResult, AdkError>> + Send>> + Sync + Send>: Unpin,
Box<dyn Fn(Arc<dyn CallbackContext>, LlmResponse) -> Pin<Box<dyn Future<Output = Result<Option<LlmResponse>, AdkError>> + Send>> + Sync + Send>: Unpin,
Box<dyn Fn(Arc<dyn CallbackContext>, Arc<dyn Tool>, Value, Value) -> Pin<Box<dyn Future<Output = Result<Option<Value>, AdkError>> + Send>> + Sync + Send>: Unpin,
Box<dyn Fn(Arc<dyn CallbackContext>, Arc<dyn Tool>, Value, String) -> Pin<Box<dyn Future<Output = Result<Option<Value>, AdkError>> + Send>> + Sync + Send>: Unpin,
Arc<dyn Guardrail>: Unpin,
Arc<dyn EnhancedPlugin>: Unpin,
impl UnsafeUnpin for CodeActAgentBuilderwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
*const ArcInner<dyn Llm> is !null: UnsafeUnpin,
PhantomData<ArcInner<dyn Llm>>: UnsafeUnpin,
PhantomData<Arc<dyn Tool>>: UnsafeUnpin,
PhantomData<Arc<dyn Toolset>>: UnsafeUnpin,
*const ArcInner<dyn CodeRuntime> is !null: UnsafeUnpin,
PhantomData<ArcInner<dyn CodeRuntime>>: UnsafeUnpin,
*const LeafNode<String, SetValZST> is !null: UnsafeUnpin,
PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin,
PhantomData<Box<(String, SetValZST)>>: UnsafeUnpin,
*const ArcInner<SkillIndex> is !null: UnsafeUnpin,
PhantomData<ArcInner<SkillIndex>>: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
*const ArcInner<Box<dyn Fn(Arc<dyn ReadonlyContext>) -> Pin<Box<dyn Future<Output = Result<String, AdkError>> + Send>> + Sync + Send>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Box<dyn Fn(Arc<dyn ReadonlyContext>) -> Pin<Box<dyn Future<Output = Result<String, AdkError>> + Send>> + Sync + Send>>>: UnsafeUnpin,
PhantomData<Arc<dyn Agent>>: UnsafeUnpin,
PhantomData<Value>: UnsafeUnpin,
PhantomData<usize>: UnsafeUnpin,
PhantomData<Bucket<String, Value>>: UnsafeUnpin,
PhantomData<Box<dyn Fn(Arc<dyn CallbackContext>) -> Pin<Box<dyn Future<Output = Result<Option<Content>, AdkError>> + Send>> + Sync + Send>>: UnsafeUnpin,
PhantomData<Box<dyn Fn(Arc<dyn CallbackContext>, LlmRequest) -> Pin<Box<dyn Future<Output = Result<BeforeModelResult, AdkError>> + Send>> + Sync + Send>>: UnsafeUnpin,
PhantomData<Box<dyn Fn(Arc<dyn CallbackContext>, LlmResponse) -> Pin<Box<dyn Future<Output = Result<Option<LlmResponse>, AdkError>> + Send>> + Sync + Send>>: UnsafeUnpin,
PhantomData<Box<dyn Fn(Arc<dyn CallbackContext>, Arc<dyn Tool>, Value, Value) -> Pin<Box<dyn Future<Output = Result<Option<Value>, AdkError>> + Send>> + Sync + Send>>: UnsafeUnpin,
PhantomData<(String, RetryBudget)>: UnsafeUnpin,
PhantomData<Box<dyn Fn(Arc<dyn CallbackContext>, Arc<dyn Tool>, Value, String) -> Pin<Box<dyn Future<Output = Result<Option<Value>, AdkError>> + Send>> + Sync + Send>>: UnsafeUnpin,
PhantomData<Arc<dyn Guardrail>>: UnsafeUnpin,
PhantomData<Arc<dyn EnhancedPlugin>>: UnsafeUnpin,
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> FmtForward for T
impl<T> FmtForward for T
Source§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self to use its Binary implementation when Debug-formatted.Source§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self to use its Display implementation when
Debug-formatted.Source§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self to use its LowerExp implementation when
Debug-formatted.Source§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self to use its LowerHex implementation when
Debug-formatted.Source§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self to use its Octal implementation when Debug-formatted.Source§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self to use its Pointer implementation when
Debug-formatted.Source§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self to use its UpperExp implementation when
Debug-formatted.Source§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self to use its UpperHex implementation when
Debug-formatted.Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreimpl<T> MaybeSend for Twhere
T: Send,
Source§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
Source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Source§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
Source§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
Source§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self, then passes self.as_ref() into the pipe function.Source§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self, then passes self.as_mut() into the pipe
function.Source§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self, then passes self.deref() into the pipe function.Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.Source§impl<T> Tap for T
impl<T> Tap for T
Source§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B> of a value. Read moreSource§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B> of a value. Read moreSource§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R> view of a value. Read moreSource§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R> view of a value. Read moreSource§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap() only in debug builds, and is erased in release builds.Source§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut() only in debug builds, and is erased in release
builds.Source§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref() only in debug builds, and is erased in release
builds.Source§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut() only in debug builds, and is erased in release
builds.Source§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref() only in debug builds, and is erased in release
builds.