pub struct AgentConfig {
pub system: String,
pub tools: Vec<Tool>,
pub llm: LlmOpts,
pub stream_fn: StreamFn,
pub hooks: HooksSet,
pub session: Option<Session>,
pub context: Vec<AgentMessage>,
pub working_dir: PathBuf,
pub max_turns: usize,
pub parallel_tools: bool,
pub compaction: CompactionPolicy,
pub plan_mode: PlanModeHandle,
}Fields§
§system: String§tools: Vec<Tool>§llm: LlmOpts§stream_fn: StreamFn§hooks: HooksSet§session: Option<Session>§context: Vec<AgentMessage>Prior messages seeding the conversation (e.g. resumed session history).
working_dir: PathBufWorking directory for tool execution; empty falls back to the process
cwd (bash runs here, file paths resolve) — plumb it so embeddings can
run against a directory other than current_dir().
max_turns: usizeMaximum number of LLM turns in a single run; caps a runaway tool loop
(see crate::loop_::LoopConfig::max_turns). Use
crate::loop_::DEFAULT_MAX_TURNS for the kernel default.
parallel_tools: boolRun concurrency-safe tool calls in one batch in parallel. false
restores strictly-sequential execution.
compaction: CompactionPolicyWhen to compact and how much recent context to keep
(see crate::compaction). Use CompactionPolicy::default.
plan_mode: PlanModeHandleThe shared plan-mode switch; the same handle is held by the
PlanModeHooks in hooks, so set_plan_mode flips both.