pub struct AgentRegistry { /* private fields */ }Expand description
Thread-safe registry of agent cards keyed by agent id.
Implementations§
Source§impl AgentRegistry
impl AgentRegistry
Sourcepub fn register(&self, card: AgentCard)
pub fn register(&self, card: AgentCard)
Register an agent card. Overwrites any previous card for the same id.
Sourcepub fn register_ready(
&self,
agent_id: &str,
capabilities: &[String],
) -> AgentCard
pub fn register_ready( &self, agent_id: &str, capabilities: &[String], ) -> AgentCard
Register an agent from a protocol-level ready announcement.
This normalizes the ready payload into an AgentCard so all components
(TUI, worker, swarm) can rely on the bus registry as source of truth.
Sourcepub fn deregister(&self, agent_id: &str) -> Option<AgentCard>
pub fn deregister(&self, agent_id: &str) -> Option<AgentCard>
Deregister an agent by id.
Sourcepub fn create_ephemeral(
&self,
name: impl Into<String>,
description: impl Into<String>,
skills: Vec<AgentSkill>,
) -> AgentCard
pub fn create_ephemeral( &self, name: impl Into<String>, description: impl Into<String>, skills: Vec<AgentSkill>, ) -> AgentCard
Create and register an ephemeral card for a sub-agent.
These cards are lightweight and intended for in-process sub-agents
that exist only for the lifetime of a swarm execution. The URL
is set to bus://local/{agent_id} to signal that the agent is only
reachable through the in-process bus.
Sourcepub fn ephemeral_name(prefix: &str) -> String
pub fn ephemeral_name(prefix: &str) -> String
Create a unique ephemeral agent name.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AgentRegistry
impl !RefUnwindSafe for AgentRegistry
impl Send for AgentRegistry
impl Sync for AgentRegistry
impl Unpin for AgentRegistry
impl UnwindSafe for AgentRegistry
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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::RequestSource§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,
Source§impl<T> ServiceExt for T
impl<T> ServiceExt for T
Source§fn map_response_body<F>(self, f: F) -> MapResponseBody<Self, F>where
Self: Sized,
fn map_response_body<F>(self, f: F) -> MapResponseBody<Self, F>where
Self: Sized,
Apply a transformation to the response body. Read more
Source§fn trace_for_http(self) -> Trace<Self, SharedClassifier<ServerErrorsAsFailures>>where
Self: Sized,
fn trace_for_http(self) -> Trace<Self, SharedClassifier<ServerErrorsAsFailures>>where
Self: Sized,
High level tracing that classifies responses using HTTP status codes. Read more
Source§fn trace_for_grpc(self) -> Trace<Self, SharedClassifier<GrpcErrorsAsFailures>>where
Self: Sized,
fn trace_for_grpc(self) -> Trace<Self, SharedClassifier<GrpcErrorsAsFailures>>where
Self: Sized,
High level tracing that classifies responses using gRPC headers. Read more