pub struct AgentIdentity {
pub agent_id: String,
pub template_version: String,
pub toolset_hash: String,
pub model_family: String,
pub tenant_scope: String,
}Expand description
Identity model for an agent type.
Used as a key for per-agent policy lookup, behavioral model selection, and telemetry grouping. Two agents with identical identity fields are considered the same agent type.
§Examples
use nemo_flow_adaptive::acg::AgentIdentity;
use std::collections::HashMap;
let id = AgentIdentity {
agent_id: "research".to_string(),
template_version: "1.0.0".to_string(),
toolset_hash: "abc123".to_string(),
model_family: "claude".to_string(),
tenant_scope: "acme-corp".to_string(),
};
let mut policies = HashMap::new();
policies.insert(id.clone(), "aggressive-caching");
assert_eq!(policies.get(&id), Some(&"aggressive-caching"));Fields§
§agent_id: StringUnique identifier for the agent (e.g., “research-agent”).
template_version: StringVersion of the prompt template in use.
toolset_hash: StringHash of the active toolset configuration.
model_family: StringModel family name (e.g., “claude”, “gpt”).
tenant_scope: StringTenant scope for isolation and access control.
Trait Implementations§
Source§impl Clone for AgentIdentity
impl Clone for AgentIdentity
Source§fn clone(&self) -> AgentIdentity
fn clone(&self) -> AgentIdentity
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 AgentIdentity
impl Debug for AgentIdentity
Source§impl<'de> Deserialize<'de> for AgentIdentity
impl<'de> Deserialize<'de> for AgentIdentity
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 Display for AgentIdentity
impl Display for AgentIdentity
Source§impl Hash for AgentIdentity
impl Hash for AgentIdentity
Source§impl PartialEq for AgentIdentity
impl PartialEq for AgentIdentity
Source§fn eq(&self, other: &AgentIdentity) -> bool
fn eq(&self, other: &AgentIdentity) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for AgentIdentity
impl Serialize for AgentIdentity
impl Eq for AgentIdentity
impl StructuralPartialEq for AgentIdentity
Auto Trait Implementations§
impl Freeze for AgentIdentity
impl RefUnwindSafe for AgentIdentity
impl Send for AgentIdentity
impl Sync for AgentIdentity
impl Unpin for AgentIdentity
impl UnsafeUnpin for AgentIdentity
impl UnwindSafe for AgentIdentity
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