pub struct AgentDefinition {Show 16 fields
pub slug: String,
pub display_name: String,
pub description: String,
pub backend: AgentBackendSpec,
pub system_prompt: String,
pub allowed_mcp_tools: Vec<String>,
pub max_sensitivity: u8,
pub outcome_sharing: OutcomeSharing,
pub semantic_profile: AgentSemanticProfile,
pub context_policy: AgentContextPolicy,
pub data_policy: AgentDataPolicy,
pub execution_policy: AgentExecutionPolicy,
pub roster_version: u16,
pub enabled: bool,
pub created_at_unix: u64,
pub updated_at_unix: u64,
}Expand description
A single agent in a principal’s roster.
Keyed by slug, a stable identifier that survives
renames of display_name. All fields are public so callers (e.g. the
command/API layer) can build and edit definitions directly; use
AgentDefinition::new for a conservatively-defaulted, timestamped entry.
Fields§
§slug: StringStable identifier for this agent (unique within the roster).
display_name: StringHuman-friendly label shown in the UI.
description: StringFree-form description of what the agent is for.
backend: AgentBackendSpecThe inference backend this agent uses.
system_prompt: StringThe agent’s persona / system prompt.
allowed_mcp_tools: Vec<String>MCP tool allowlist. Empty = no tools allowed; a single "*" entry = all
tools allowed. See AgentDefinition::has_tool.
max_sensitivity: u8Ceiling of material sensitivity this agent may handle (0 = public).
outcome_sharing: OutcomeSharingHow this agent’s processed outcomes may be shared with peers.
semantic_profile: AgentSemanticProfilePointed ontology-linked study graph: classification, specialization, geographic/language scope, methods, datasets, tools and constraints.
context_policy: AgentContextPolicyFine-grained, directional context contract. Missing in pre-existing roster files means the safe default above, preserving compatibility.
data_policy: AgentDataPolicyNarrower per-agent data-source boundary, intersected with session permissions at inference time.
execution_policy: AgentExecutionPolicyModel residency and remote-consent preferences, interpreted by the job scheduler rather than by the inference hot path.
roster_version: u16Persisted schema marker for future non-breaking roster migrations.
enabled: boolWhether the agent is currently available for invocation.
created_at_unix: u64Unix seconds at which this agent was first created.
updated_at_unix: u64Unix seconds at which this agent was last written.
Implementations§
Source§impl AgentDefinition
impl AgentDefinition
Sourcepub fn new(
slug: impl Into<String>,
display_name: impl Into<String>,
description: impl Into<String>,
backend: AgentBackendSpec,
system_prompt: impl Into<String>,
) -> Self
pub fn new( slug: impl Into<String>, display_name: impl Into<String>, description: impl Into<String>, backend: AgentBackendSpec, system_prompt: impl Into<String>, ) -> Self
Construct a new agent with a conservative default posture: empty tool
allowlist, public-only sensitivity (SENSITIVITY_PUBLIC), default
(owner-only) outcome sharing, and enabled = true. Both timestamps are
stamped with the current wall-clock. Raise the sensitivity ceiling or
widen the allowlist deliberately after construction.
Trait Implementations§
Source§impl Clone for AgentDefinition
impl Clone for AgentDefinition
Source§fn clone(&self) -> AgentDefinition
fn clone(&self) -> AgentDefinition
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AgentDefinition
impl Debug for AgentDefinition
Source§impl<'de> Deserialize<'de> for AgentDefinition
impl<'de> Deserialize<'de> for AgentDefinition
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>,
Source§impl PartialEq for AgentDefinition
impl PartialEq for AgentDefinition
Source§fn eq(&self, other: &AgentDefinition) -> bool
fn eq(&self, other: &AgentDefinition) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for AgentDefinition
impl Serialize for AgentDefinition
impl Eq for AgentDefinition
impl StructuralPartialEq for AgentDefinition
Auto Trait Implementations§
impl Freeze for AgentDefinition
impl RefUnwindSafe for AgentDefinition
impl Send for AgentDefinition
impl Sync for AgentDefinition
impl Unpin for AgentDefinition
impl UnsafeUnpin for AgentDefinition
impl UnwindSafe for AgentDefinition
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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