Skip to main content

AgentConfig

Struct AgentConfig 

Source
pub struct AgentConfig {
Show 19 fields pub api_base: String, pub api_key: String, pub model: String, pub max_iterations: usize, pub max_tool_calls_per_task: usize, pub workspace: String, pub system_prompt: Option<String>, pub temperature: Option<f64>, pub skill_dirs: Vec<String>, pub enable_task_planning: bool, pub enable_memory: bool, pub enable_memory_vector: bool, pub verbose: bool, pub soul_path: Option<String>, pub context_append: Option<String>, pub max_consecutive_failures: Option<usize>, pub goal_boundaries: Option<GoalBoundaries>, pub skip_history_for_planning: bool, pub read_only_tools: bool,
}
Expand description

Agent configuration.

Fields§

§api_base: String

OpenAI-compatible API base URL (e.g. “https://api.openai.com/v1”)

§api_key: String

API key

§model: String

Model name (e.g. “gpt-4o”, “claude-3-5-sonnet-20241022”)

§max_iterations: usize

Maximum iterations for the agent loop

§max_tool_calls_per_task: usize

Maximum tool calls per task

§workspace: String

Workspace root path

§system_prompt: Option<String>

System prompt override (optional)

§temperature: Option<f64>

Temperature (0.0 - 2.0)

§skill_dirs: Vec<String>

Skills directories to load (reserved for multi-dir support)

§enable_task_planning: bool

Enable task planning

§enable_memory: bool

Enable memory tools

§enable_memory_vector: bool

Enable memory vector search (requires memory_vector feature + embedding API)

§verbose: bool

Verbose output

§soul_path: Option<String>

Path to SOUL.md identity document (optional). Resolution: explicit path > .skilllite/SOUL.md > ~/.skilllite/SOUL.md

§context_append: Option<String>

Optional extra context to append to system prompt (e.g. from RPC params.context.append). Generic extension point for callers to inject domain-specific rules without modifying SkillLite.

§max_consecutive_failures: Option<usize>

[Run mode] Max consecutive tool failures before stopping (prevents infinite retry loops). None = no limit (chat mode). Some(N) = stop after N consecutive failures (run mode).

§goal_boundaries: Option<GoalBoundaries>

[Run mode] Extracted goal boundaries (scope, exclusions, completion conditions). Injected into planning when set.

§skip_history_for_planning: bool

When true, exclude conversation history from the planning prompt. Use when each task is self-contained and history from previous turns would corrupt planning (e.g. multi-turn agent orchestration, batch task dispatch). Default: false.

§read_only_tools: bool

Restrict the tool registry to read-only operations. Used by replay/eval flows that must not mutate the workspace.

Implementations§

Source§

impl AgentConfig

Source

pub fn from_env() -> Self

Load from environment variables with sensible defaults. Also reads .env file from current directory if present. Uses unified config layer: SKILLLITE_* with fallback to OPENAI_* / BASE_URL / API_KEY / MODEL.

Trait Implementations§

Source§

impl Clone for AgentConfig

Source§

fn clone(&self) -> AgentConfig

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for AgentConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for AgentConfig

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more