pub struct AgentConfig {
pub system_prompt_prefix: String,
pub model_pref: ModelPref,
pub behavioral_rules: BTreeSet<String>,
pub tool_permissions: BTreeSet<String>,
pub response_style: ResponseStyle,
pub extensions: BTreeMap<String, Value>,
}Expand description
The unit Evolve evolves. Each version is stored once in SQLite and referenced
by ConfigId.
Fields§
§system_prompt_prefix: StringFree-form prefix prepended to the agent’s effective system prompt.
model_pref: ModelPrefPreferred model. Adapters interpret this against their own model catalog.
behavioral_rules: BTreeSet<String>Behavioral rules the agent is asked to follow (e.g., “always run tests after edits”).
tool_permissions: BTreeSet<String>Tools/permissions the agent is allowed to use. Interpretation is per-adapter.
response_style: ResponseStyleWhether the agent is asked to be terse, normal, or verbose in its responses.
extensions: BTreeMap<String, Value>Per-tool extension fields. Keyed by adapter id. Opaque blob each adapter understands.
Implementations§
Source§impl AgentConfig
impl AgentConfig
Sourcepub fn default_for(adapter_id: &str) -> Self
pub fn default_for(adapter_id: &str) -> Self
Construct a sane starting AgentConfig for the given adapter.
Accepts the adapter id as &str to avoid coupling this module to the adapter
crate; in practice callers use adapter_id.as_str().
Sourcepub fn fingerprint(&self) -> u64
pub fn fingerprint(&self) -> u64
Stable hash used as a cache key and to detect “did anything change” cheaply.
Hashes the canonical JSON form rather than the in-memory layout so that
reordering of BTreeMap/BTreeSet (canonical) and field reordering on
non-canonical inputs do not affect the result.
Sourcepub fn extension<T: DeserializeOwned>(&self, key: &str) -> Option<T>
pub fn extension<T: DeserializeOwned>(&self, key: &str) -> Option<T>
Read a typed extension blob registered under key.
Trait Implementations§
Source§impl Clone for AgentConfig
impl Clone for AgentConfig
Source§fn clone(&self) -> AgentConfig
fn clone(&self) -> AgentConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more