pub struct Agent {
pub meta: AgentMeta,
pub ai: Option<AgentAiOverride>,
pub tools: Vec<AgentTool>,
pub permissions: AgentPermissions,
}Expand description
One configured chat agent.
Fields§
§meta: AgentMeta§ai: Option<AgentAiOverride>Optional per-agent AI provider overrides. When absent, the app’s
global [ai] configuration answers this agent too.
tools: Vec<AgentTool>§permissions: AgentPermissionsImplementations§
Source§impl Agent
impl Agent
pub fn validate(&self) -> Result<()>
Sourcepub fn merged_ai_config(&self, base: &AiConfig) -> AiConfig
pub fn merged_ai_config(&self, base: &AiConfig) -> AiConfig
The app’s [ai] configuration, with this agent’s own overrides applied.
The legacy [agent] model|temperature|max_tokens keys still work and
win over the fallback values they historically replaced.
Sourcepub fn thread_resource_name(&self) -> String
pub fn thread_resource_name(&self) -> String
The generated resource that stores conversation threads, if history is on.
Sourcepub fn message_resource_name(&self) -> String
pub fn message_resource_name(&self) -> String
The generated resource that stores persisted messages, if history is on.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Agent
impl<'de> Deserialize<'de> for Agent
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Agent
impl RefUnwindSafe for Agent
impl Send for Agent
impl Sync for Agent
impl Unpin for Agent
impl UnsafeUnpin for Agent
impl UnwindSafe for Agent
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
Mutably borrows from an owned value. Read more