Struct Agent Identity

View as Markdown

Generated from cargo doc --no-deps -p nemo-relay -p nemo-relay-adaptive -p nemo-relay-ffi.

pub struct AgentIdentity {
    pub agent_id: String,
    pub template_version: String,
    pub toolset_hash: String,
    pub model_family: String,
    pub tenant_scope: String,
}

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

1use nemo_relay_adaptive::acg::AgentIdentity;
2use std::collections::HashMap;
3
4let id = AgentIdentity {
5 agent_id: "research".to_string(),
6 template_version: "1.0.0".to_string(),
7 toolset_hash: "abc123".to_string(),
8 model_family: "claude".to_string(),
9 tenant_scope: "acme-corp".to_string(),
10};
11
12let mut policies = HashMap::new();
13policies.insert(id.clone(), "aggressive-caching");
14assert_eq!(policies.get(&id), Some(&"aggressive-caching"));

Fields

agent_id: String

Unique identifier for the agent (e.g., “research-agent”).

template_version: String

Version of the prompt template in use.

toolset_hash: String

Hash of the active toolset configuration.

model_family: String

Model family name (e.g., “claude”, “gpt”).

tenant_scope: String

Tenant scope for isolation and access control.

Trait Implementations

impl Clone for AgentIdentity

impl Clone for AgentIdentity

clone

fn clone(&self) -> AgentIdentity

clone_from

fn clone_from(&mut self, source: &Self)

impl Debug for AgentIdentity

impl Debug for AgentIdentity

fmt

fn fmt(&self, f: &mut Formatter<'_>) -> Result

impl<'de> Deserialize<'de> for AgentIdentity

impl<'de> Deserialize<'de> for AgentIdentity

deserialize

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
    __D: Deserializer<'de>,

impl Display for AgentIdentity

impl Display for AgentIdentity

fmt

fn fmt(&self, f: &mut Formatter<'_>) -> Result

impl Hash for AgentIdentity

impl Hash for AgentIdentity

hash

fn hash<__H: Hasher>(&self, state: &mut __H)

hash_slice

fn hash_slice<H>(data: &[Self], state: &mut H)where
    H: Hasher,
    Self: Sized,

impl PartialEq for AgentIdentity

impl PartialEq for AgentIdentity

eq

fn eq(&self, other: &AgentIdentity) -> bool

ne

fn ne(&self, other: &Rhs) -> bool

impl Serialize for AgentIdentity

impl Serialize for AgentIdentity

serialize

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where
    __S: Serializer,

impl Eq for AgentIdentity

impl Eq for AgentIdentity

impl StructuralPartialEq for AgentIdentity

impl StructuralPartialEq for AgentIdentity