Skip to main content

AgentHarnessOptions

Struct AgentHarnessOptions 

Source
pub struct AgentHarnessOptions {
Show 26 fields pub system_prompt: String, pub model: Option<Model>, pub thinking_level: ThinkingLevel, pub skills: Vec<Skill>, pub prompt_templates: Vec<PromptTemplate>, pub tools: Vec<Arc<dyn AgentTool>>, pub session: Session, pub observer: Arc<dyn RuntimeObserver>, pub observation_context: ObservationContext, pub observation_parent: Option<OperationId>, pub stream_fn: Option<StreamFn>, pub get_api_key: Option<GetApiKey>, pub compaction: CompactionSettings, pub compact_algorithms: Arc<CompactAlgorithmRegistry>, pub before_tool_call: Option<BeforeToolCallHook>, pub after_tool_call: Option<AfterToolCallHook>, pub on_control_plane_prompt: Option<OnControlPlanePromptHook>, pub budget_cap_usd: Option<f64>, pub reload_skills_fn: Option<ReloadSkillsFn>, pub on_turn_end: Option<OnTurnEndHook>, pub turn_continuation_cap: Option<u32>, pub max_iterations: Option<u32>, pub runtime_extensions: Arc<dyn RuntimeExtensionPort>, pub runtime_extension_model_context: ExtensionModelContextProjection, pub runtime_extension_cwd: String, pub runtime_extension_has_interactive_client: bool,
}

Fields§

§system_prompt: String

Base system prompt prepended to the rendered skill catalog.

§model: Option<Model>

Active model. None when no model is configured yet (daemon launches model-less and the client injects one per-session via set_model); the turn loop errors with “Agent has no model set” until one is assigned.

§thinking_level: ThinkingLevel§skills: Vec<Skill>§prompt_templates: Vec<PromptTemplate>§tools: Vec<Arc<dyn AgentTool>>§session: Session§observer: Arc<dyn RuntimeObserver>

Embedder-owned runtime observer shared with the inner bare Agent.

§observation_context: ObservationContext

Session/run/job/node correlation inherited by inner operations.

§observation_parent: Option<OperationId>

Optional parent operation for the inner agent run.

§stream_fn: Option<StreamFn>§get_api_key: Option<GetApiKey>

Optional per-provider credential resolver applied to every model call.

§compaction: CompactionSettings

Auto-compaction thresholds. Defaults to DEFAULT_COMPACTION_SETTINGS.

§compact_algorithms: Arc<CompactAlgorithmRegistry>

Custom compaction algorithm registry. The builtin algorithm is always available.

§before_tool_call: Option<BeforeToolCallHook>

Optional tool hooks supplied by the embedding runtime.

§after_tool_call: Option<AfterToolCallHook>§on_control_plane_prompt: Option<OnControlPlanePromptHook>

Control-plane prompt resolver. None keeps prompt-classified tool calls fail-closed.

§budget_cap_usd: Option<f64>

Per-session USD cap. None disables the check.

§reload_skills_fn: Option<ReloadSkillsFn>

Embedder-owned loader used by AgentHarness::reload_skills_from_disk.

§on_turn_end: Option<OnTurnEndHook>

Optional cross-prompt turn completion hook.

§turn_continuation_cap: Option<u32>

Maximum hook-driven continuations for one prompt cycle.

§max_iterations: Option<u32>

Hard cap on inner agent loop iterations. None is unbounded.

§runtime_extensions: Arc<dyn RuntimeExtensionPort>

Engine-independent lifecycle port supplied by the embedding runtime.

§runtime_extension_model_context: ExtensionModelContextProjection

Reconstructed, de-duplicated persistent model context for this branch.

§runtime_extension_cwd: String

Working directory included in runtime-extension lifecycle context.

§runtime_extension_has_interactive_client: bool

Whether this harness is currently attached to an interactive client.

Implementations§

Source§

impl AgentHarnessOptions

Source

pub fn new(model: impl Into<Option<Model>>, session: Session) -> Self

model may be a concrete Model (wrapped into Some) or an Option<Model> (kept as-is) so both the model-less daemon path and the existing concrete-model callers build through one constructor.

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

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> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. 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: Sized + 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: Sized + 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> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

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