pub struct AgentProfile {
pub system_prompt: String,
pub model: Option<String>,
pub effort: Option<String>,
pub tools: Vec<String>,
pub description: Option<String>,
pub extras: Value,
pub version_hash: Option<String>,
pub worker_binding: Option<String>,
}Expand description
Agent persona information. Orthogonal to the backend kind (Shell / InProc / Operator).
Populated by agent_md_loader::load_dir from the frontmatter and Markdown body of
agents/*.md in agent-profiles. The backend (e.g. AgentBlockOperator) receives this
struct at construction / dispatch time and consumes system_prompt as the LLM API
system message and model / tools as configuration.
C-C-specific fields (permissionMode / memory / abtest, etc.) are dumped into
extras: Value, and consumers that need them read them out. This is the escape hatch
that keeps the schema future-proof rather than making it strict.
Fields§
§system_prompt: StringMarkdown body (= system prompt content).
model: Option<String>LLM model identifier (e.g. "sonnet" / "haiku" / "opus").
effort: Option<String>Reasoning effort (e.g. "low" / "medium" / "high").
tools: Vec<String>List of available tool names (normalized from the CSV form in frontmatter).
description: Option<String>Frontmatter description. A short one-line description.
extras: ValueC-C-specific / future-proof fields (permissionMode / memory / abtest / …). Shape is the leftover keys of the agent.md frontmatter dumped as a JSON object.
version_hash: Option<String>Content hash (blake3 32-byte hex) of the agent body (= system_prompt).
§Purpose
When the Enhance loop receives a Patch that replaces
/agents/N/profile/system_prompt, the post-hook in patch_applier.lua
recomputes this field (= new blake3 of the body) and updates it automatically.
This is the field that structurally prevents a Blueprint carrying a stale hash
from being committed.
None= hash not computed (= manually built agent, or a Blueprint predating this field)Some(hex)= latest hash at agent-profiles seed time or after PatchApplier
Planned to be used as the cache-index key in AgentStore.
worker_binding: Option<String>Claude Code SubAgent definition name this agent binds to at spawn
time (e.g. “mse-worker-coder”). Why: the Blueprint is the single
source of truth for the declaration↔executor binding — an external
registry would duplicate what tools already declares and drift.
None is valid for agents whose operator backend never dispatches
a SubAgent (direct-LLM operators); WS thin-path operators require
it at compile time (see Operator::requires_worker_binding).
Trait Implementations§
Source§impl Clone for AgentProfile
impl Clone for AgentProfile
Source§fn clone(&self) -> AgentProfile
fn clone(&self) -> AgentProfile
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 AgentProfile
impl Debug for AgentProfile
Source§impl Default for AgentProfile
impl Default for AgentProfile
Source§fn default() -> AgentProfile
fn default() -> AgentProfile
Source§impl<'de> Deserialize<'de> for AgentProfile
impl<'de> Deserialize<'de> for AgentProfile
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 JsonSchema for AgentProfile
impl JsonSchema for AgentProfile
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl PartialEq for AgentProfile
impl PartialEq for AgentProfile
Source§fn eq(&self, other: &AgentProfile) -> bool
fn eq(&self, other: &AgentProfile) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for AgentProfile
impl Serialize for AgentProfile
impl StructuralPartialEq for AgentProfile
Auto Trait Implementations§
impl Freeze for AgentProfile
impl RefUnwindSafe for AgentProfile
impl Send for AgentProfile
impl Sync for AgentProfile
impl Unpin for AgentProfile
impl UnsafeUnpin for AgentProfile
impl UnwindSafe for AgentProfile
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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