pub struct WorkerProfile {
pub name: String,
pub description: String,
pub persona: String,
pub allowed_tools: Vec<String>,
pub provider: Option<String>,
pub model: Option<String>,
pub max_iterations: usize,
pub max_memory_messages: usize,
pub can_delegate: bool,
pub resource_limits: ResourceLimits,
}Expand description
Declarative profile for a swarm worker agent.
Each worker has a unique combination of persona, capabilities, and resource limits. Profiles are composable (can inherit from a base profile) and inheritable (sub-profiles can override specific fields).
Fields§
§name: StringUnique name for this profile (e.g., “researcher”, “coder”, “reviewer”)
description: StringHuman-readable description of this worker’s role
persona: StringSystem prompt / persona for this worker
allowed_tools: Vec<String>Which tools this worker can use (empty = all available)
provider: Option<String>Provider override (empty = use default from config)
model: Option<String>Model override (empty = use default from config)
max_iterations: usizeMaximum iterations for this worker’s agent loop
max_memory_messages: usizeMaximum memory messages for this worker
can_delegate: boolWhether this worker can spawn sub-workers (recursive supervision)
resource_limits: ResourceLimitsResource limits
Implementations§
Source§impl WorkerProfile
impl WorkerProfile
Sourcepub fn researcher() -> Self
pub fn researcher() -> Self
Analytical researcher profile — focused on logic, structure, and precision
Sourcepub fn creative() -> Self
pub fn creative() -> Self
Creative problem-solver profile — focused on innovation and alternatives
Sourcepub fn executor() -> Self
pub fn executor() -> Self
Pragmatic executor profile — focused on getting things done efficiently
Sourcepub fn reviewer() -> Self
pub fn reviewer() -> Self
Reviewer / quality-assurance profile — focused on verification and validation
Sourcepub fn supervisor() -> Self
pub fn supervisor() -> Self
Supervisor profile — can delegate to sub-workers
Trait Implementations§
Source§impl Clone for WorkerProfile
impl Clone for WorkerProfile
Source§fn clone(&self) -> WorkerProfile
fn clone(&self) -> WorkerProfile
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 WorkerProfile
impl Debug for WorkerProfile
Source§impl Default for WorkerProfile
impl Default for WorkerProfile
Source§impl<'de> Deserialize<'de> for WorkerProfile
impl<'de> Deserialize<'de> for WorkerProfile
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>,
Auto Trait Implementations§
impl Freeze for WorkerProfile
impl RefUnwindSafe for WorkerProfile
impl Send for WorkerProfile
impl Sync for WorkerProfile
impl Unpin for WorkerProfile
impl UnsafeUnpin for WorkerProfile
impl UnwindSafe for WorkerProfile
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request