pub struct AgentDef {Show 15 fields
pub name: String,
pub description: Option<String>,
pub version: String,
pub model: Option<String>,
pub system_prompt: Option<String>,
pub tools: Vec<String>,
pub workflow: Option<String>,
pub approval: Option<ApprovalConfig>,
pub memory: Option<MemoryConfig>,
pub channels: Vec<String>,
pub telegram: Option<ChannelBotConfig>,
pub whatsapp: Option<ChannelBotConfig>,
pub teams: Option<ChannelBotConfig>,
pub session: Option<SessionConfigOverride>,
pub hooks: Option<Vec<HookConfig>>,
}Expand description
Per-agent definition (agents/
Fields§
§name: String§description: Option<String>§version: String§model: Option<String>Overrides global provider deployment/model for this agent.
system_prompt: Option<String>§tools: Vec<String>§workflow: Option<String>Path to workflow YAML or null for LLM-only.
approval: Option<ApprovalConfig>Per-agent config overrides (merged over global config).
memory: Option<MemoryConfig>§channels: Vec<String>Channels this agent listens on (e.g., [“telegram”, “whatsapp”]). Agents declare their channels; channels are transport-only.
telegram: Option<ChannelBotConfig>Telegram bot configuration for this agent (optional). If set, overrides global telegram settings from channels.yaml.
whatsapp: Option<ChannelBotConfig>WhatsApp bot configuration for this agent (optional). If set, overrides global whatsapp settings from channels.yaml.
teams: Option<ChannelBotConfig>Teams bot configuration for this agent (optional). If set, overrides global teams settings from channels.yaml.
session: Option<SessionConfigOverride>Per-agent session config overrides.
hooks: Option<Vec<HookConfig>>Per-agent hook overrides (merged with global ~/.enact/hooks.yaml).
Implementations§
Source§impl AgentDef
impl AgentDef
Sourcepub fn agent_dir(home: &Path, name: &str) -> PathBuf
pub fn agent_dir(home: &Path, name: &str) -> PathBuf
Path to this agent’s directory under ENACT_HOME.
Sourcepub fn agent_yaml_path(home: &Path, name: &str) -> PathBuf
pub fn agent_yaml_path(home: &Path, name: &str) -> PathBuf
Path to agent.yaml for this agent.
Sourcepub fn sessions_dir(home: &Path, name: &str) -> PathBuf
pub fn sessions_dir(home: &Path, name: &str) -> PathBuf
Path to this agent’s sessions directory.
Sourcepub fn memory_dir(home: &Path, name: &str) -> PathBuf
pub fn memory_dir(home: &Path, name: &str) -> PathBuf
Path to this agent’s memory directory.
Sourcepub fn threads_dir(home: &Path, agent_name: &str) -> PathBuf
pub fn threads_dir(home: &Path, agent_name: &str) -> PathBuf
Path to agent’s threads directory (conversation metadata).