pub struct RemoteReasoningEngineAgentBuilder { /* private fields */ }Expand description
Builder for RemoteReasoningEngineAgent.
§Example
use adk_server::agent_engine::remote::RemoteReasoningEngineAgent;
let agent = RemoteReasoningEngineAgent::builder("research-agent")
.resource_name("projects/my-project/locations/us-central1/reasoningEngines/4242")
.build()
.await?;Implementations§
Source§impl RemoteReasoningEngineAgentBuilder
impl RemoteReasoningEngineAgentBuilder
Sourcepub fn description(self, description: impl Into<String>) -> Self
pub fn description(self, description: impl Into<String>) -> Self
Sets the agent description shown to orchestrating LLMs.
Sourcepub fn resource_name(self, resource_name: impl Into<String>) -> Self
pub fn resource_name(self, resource_name: impl Into<String>) -> Self
Addresses the engine by full resource name
(projects/*/locations/*/reasoningEngines/*).
Sourcepub fn urn(self, urn: impl Into<String>) -> Self
pub fn urn(self, urn: impl Into<String>) -> Self
Addresses the engine by Agent Registry URN, resolved at build time
via registry.
Sourcepub fn registry(self, registry: AgentRegistryClient) -> Self
pub fn registry(self, registry: AgentRegistryClient) -> Self
Supplies the registry client used to resolve a urn.
Sourcepub fn class_method(self, class_method: impl Into<String>) -> Self
pub fn class_method(self, class_method: impl Into<String>) -> Self
Overrides the class method invoked on the engine.
Defaults to streaming_agent_run_with_events with a one-shot
fallback to stream_query when the engine does not register it.
Sourcepub fn endpoint(self, endpoint: impl Into<String>) -> Self
pub fn endpoint(self, endpoint: impl Into<String>) -> Self
Sets a custom API origin (loopback HTTP allowed for tests).
Sourcepub fn credentials(self, credentials: Credentials) -> Self
pub fn credentials(self, credentials: Credentials) -> Self
Uses explicit credentials instead of Application Default Credentials.
Sourcepub async fn build(self) -> Result<RemoteReasoningEngineAgent>
pub async fn build(self) -> Result<RemoteReasoningEngineAgent>
Resolves the engine address and builds the agent.
§Errors
Returns an error when neither resource_name nor a resolvable
urn + registry pair is configured, the resource name is not a
valid reasoningEngines name, or the HTTP client cannot be built.
Auto Trait Implementations§
impl !RefUnwindSafe for RemoteReasoningEngineAgentBuilder
impl !UnwindSafe for RemoteReasoningEngineAgentBuilder
impl Forget for RemoteReasoningEngineAgentBuilder
impl Freeze for RemoteReasoningEngineAgentBuilderwhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
*const ArcInner<ClientRef> is !null: Freeze,
PhantomData<ArcInner<ClientRef>>: Freeze,
*const ArcInner<dyn CredentialsProvider> is !null: Freeze,
PhantomData<ArcInner<dyn CredentialsProvider>>: Freeze,
*const ArcInner<RwLock<Option<HeaderMap>>> is !null: Freeze,
PhantomData<ArcInner<RwLock<Option<HeaderMap>>>>: Freeze,
&'static str: Freeze,
impl Move for RemoteReasoningEngineAgentBuilder
impl Send for RemoteReasoningEngineAgentBuilder
impl Sync for RemoteReasoningEngineAgentBuilder
impl Unpin for RemoteReasoningEngineAgentBuilder
impl UnsafeUnpin for RemoteReasoningEngineAgentBuilderwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
*const ArcInner<ClientRef> is !null: UnsafeUnpin,
PhantomData<ArcInner<ClientRef>>: UnsafeUnpin,
*const ArcInner<dyn CredentialsProvider> is !null: UnsafeUnpin,
PhantomData<ArcInner<dyn CredentialsProvider>>: UnsafeUnpin,
*const ArcInner<RwLock<Option<HeaderMap>>> is !null: UnsafeUnpin,
PhantomData<ArcInner<RwLock<Option<HeaderMap>>>>: UnsafeUnpin,
&'static str: UnsafeUnpin,
Blanket Implementations§
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
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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 more