pub struct AgentConfig {
pub agent: AgentInfo,
pub llm: LlmParams,
pub system_prompt: SystemPrompt,
pub tools: Option<ToolsConfig>,
pub runner: Option<RunnerConfig>,
pub permissions: Option<PermissionMap>,
}Expand description
Top-level agent configuration.
Why: Declarative agent configs let operators define or override agents
without touching Rust code.
What: agent carries identity/role; llm carries model/token params;
system_prompt carries the prompt text; optional sections add capabilities.
Populated by agents::md_loader::project_to_agent_config from a composed
.md agent document.
Test: agent_config_default_is_empty; agents::md_loader::tests::* cover
the actual field-projection contract end-to-end.
Fields§
§agent: AgentInfoCore identity fields.
llm: LlmParamsLLM parameters for this agent.
system_prompt: SystemPromptSystem prompt content.
tools: Option<ToolsConfig>Optional tool permissions.
runner: Option<RunnerConfig>Optional runner override.
permissions: Option<PermissionMap>(#7948) Optional per-verb permission map from the agent’s own
permissions: frontmatter block.
Why: tools.allowed cannot say “run git status freely, never run
rm”. The allowlist still runs first, so this can only narrow.
What: None for every agent without a permissions: block (every stock
bundled agent). Populated by crate::agents::md_loader and
crate::plugins::agents via crate::permissions::parse_permissions.
#[serde(skip)]: the .md frontmatter is the source of truth, and
compiled glob matchers have no serde form.
Test: agents::md_loader::tests::permissions_block_projects_onto_agent_config,
agents::md_loader::tests::embedded_permissions_block_projects_onto_agent_config,
agents::md_loader::tests::embedded_extends_permissions_block_projects_onto_agent_config.
Trait Implementations§
Source§impl Clone for AgentConfig
impl Clone for AgentConfig
Source§impl Debug for AgentConfig
impl Debug for AgentConfig
Source§impl Default for AgentConfig
impl Default for AgentConfig
Source§impl<'de> Deserialize<'de> for AgentConfig
impl<'de> Deserialize<'de> for AgentConfig
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 AgentConfig
impl RefUnwindSafe for AgentConfig
impl Send for AgentConfig
impl Sync for AgentConfig
impl Unpin for AgentConfig
impl UnsafeUnpin for AgentConfig
impl UnwindSafe for AgentConfig
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> 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 more