pub struct SubAgentConfig {
pub enabled: bool,
pub max_concurrent: usize,
pub extra_dirs: Vec<PathBuf>,
pub user_agents_dir: Option<PathBuf>,
pub default_permission_mode: Option<PermissionMode>,
pub default_disallowed_tools: Vec<String>,
pub allow_bypass_permissions: bool,
pub default_memory_scope: Option<MemoryScope>,
pub hooks: SubAgentLifecycleHooks,
pub transcript_dir: Option<PathBuf>,
pub transcript_enabled: bool,
pub transcript_max_files: usize,
}Fields§
§enabled: bool§max_concurrent: usizeMaximum number of sub-agents that can run concurrently.
Must be >= max_parallel + 1 when orchestration is enabled, to avoid starving
orchestration tasks while a planning-phase sub-agent is still active.
extra_dirs: Vec<PathBuf>§user_agents_dir: Option<PathBuf>User-level agents directory.
Set to an absolute path to override the platform default (~/.config/zeph/agents
on Linux/macOS, %APPDATA%/zeph/agents on Windows). Note: tilde (~) expansion
is not supported — use an absolute path or omit this field to use the platform default.
Set to empty string to disable the user-level directory entirely.
default_permission_mode: Option<PermissionMode>Default permission mode applied to sub-agents that do not specify one.
Only takes effect when the sub-agent definition leaves permission_mode at its
default value (Default). If the definition sets an explicit mode, this field is
ignored. Some(PermissionMode::Default) behaves identically to None — both
result in Default mode. Prefer omitting the field over explicitly setting
default_permission_mode = "default" in config.
default_disallowed_tools: Vec<String>Global denylist applied to all sub-agents in addition to per-agent tools.except.
allow_bypass_permissions: boolAllow sub-agents to use bypass_permissions mode.
When false (default), spawning a sub-agent with permission_mode: bypass_permissions
is rejected with an error. Set to true only in trusted, controlled environments.
default_memory_scope: Option<MemoryScope>Default memory scope applied to sub-agents that do not set memory in their definition.
When set, all agents without an explicit memory field will use this scope.
Set to None (omit from config) to disable memory by default.
Note: Setting this affects ALL agents without an explicit memory field.
Agents can opt out by setting memory: ~ in their frontmatter (not yet supported — None
means “not specified”, which falls back to this default).
hooks: SubAgentLifecycleHooksLifecycle hooks executed when any sub-agent starts or stops.
start hooks run after the agent is spawned (fire-and-forget).
stop hooks run after the agent finishes or is cancelled (fire-and-forget).
transcript_dir: Option<PathBuf>Directory where transcript JSONL files and meta sidecars are stored.
Defaults to .zeph/subagents relative to the working directory when None.
transcript_enabled: boolEnable writing JSONL transcripts for sub-agent sessions.
When false, no transcript files are written and /agent resume is unavailable.
transcript_max_files: usizeMaximum number of .jsonl transcript files to keep.
When the count exceeds this limit, the oldest files are deleted on each spawn or
resume. 0 means unlimited (no cleanup performed).
Trait Implementations§
Source§impl Clone for SubAgentConfig
impl Clone for SubAgentConfig
Source§fn clone(&self) -> SubAgentConfig
fn clone(&self) -> SubAgentConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SubAgentConfig
impl Debug for SubAgentConfig
Source§impl Default for SubAgentConfig
impl Default for SubAgentConfig
Source§impl<'de> Deserialize<'de> for SubAgentConfigwhere
SubAgentConfig: Default,
impl<'de> Deserialize<'de> for SubAgentConfigwhere
SubAgentConfig: Default,
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 SubAgentConfig
impl RefUnwindSafe for SubAgentConfig
impl Send for SubAgentConfig
impl Sync for SubAgentConfig
impl Unpin for SubAgentConfig
impl UnsafeUnpin for SubAgentConfig
impl UnwindSafe for SubAgentConfig
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,
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> 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 moreSource§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