pub struct AgentDescriptor {
pub id: CapabilityId,
pub name: String,
pub version: String,
pub description: String,
pub risk: RiskLevel,
pub metadata: BTreeMap<String, Value>,
}Expand description
Versioned contract for invoking an agent through a gateway.
Fields§
§id: CapabilityIdStable capability identity.
name: StringModel-facing delegation name.
version: StringSemantic contract version.
description: StringModel-facing description of when this agent should be used.
risk: RiskLevelCoarse risk classification for policy engines.
metadata: BTreeMap<String, Value>Host-only namespaced metadata.
Implementations§
Source§impl AgentDescriptor
impl AgentDescriptor
Sourcepub fn new(name: impl Into<String>, description: impl Into<String>) -> Self
pub fn new(name: impl Into<String>, description: impl Into<String>) -> Self
Creates an agent contract with the canonical delegation schema.
Sourcepub fn capability(&self) -> CapabilityDescriptor
pub fn capability(&self) -> CapabilityDescriptor
Converts this descriptor into a grantable agent capability.
Sourcepub fn model_spec(&self) -> ToolSpec
pub fn model_spec(&self) -> ToolSpec
Converts this descriptor into the callable shape exposed to a model.
Trait Implementations§
Source§impl Clone for AgentDescriptor
impl Clone for AgentDescriptor
Source§fn clone(&self) -> AgentDescriptor
fn clone(&self) -> AgentDescriptor
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AgentDescriptor
impl Debug for AgentDescriptor
Source§impl<'de> Deserialize<'de> for AgentDescriptor
impl<'de> Deserialize<'de> for AgentDescriptor
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for AgentDescriptor
impl PartialEq for AgentDescriptor
Source§impl Serialize for AgentDescriptor
impl Serialize for AgentDescriptor
impl StructuralPartialEq for AgentDescriptor
Auto Trait Implementations§
impl Freeze for AgentDescriptor
impl RefUnwindSafe for AgentDescriptor
impl Send for AgentDescriptor
impl Sync for AgentDescriptor
impl Unpin for AgentDescriptor
impl UnsafeUnpin for AgentDescriptor
impl UnwindSafe for AgentDescriptor
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