pub struct ResolvedAgent {
pub spec: Arc<AgentSpec>,
pub upstream_model: String,
pub tools: HashMap<String, Arc<dyn Tool>>,
pub llm_executor: Arc<dyn LlmExecutor>,
pub tool_executor: Arc<dyn ToolExecutor>,
pub context_summarizer: Option<Arc<dyn ContextSummarizer>>,
pub env: ExecutionEnv,
}Expand description
A fully resolved agent: all capabilities + plugin environment, ready to run.
Produced by AgentResolver::resolve(). Contains live references
(LlmExecutor, tools, plugins) — not serializable.
Fields§
§spec: Arc<AgentSpec>The source agent specification.
upstream_model: StringActual model name sent to the upstream provider.
tools: HashMap<String, Arc<dyn Tool>>§llm_executor: Arc<dyn LlmExecutor>§tool_executor: Arc<dyn ToolExecutor>§context_summarizer: Option<Arc<dyn ContextSummarizer>>Context summarizer for LLM-based compaction. None disables LLM compaction
(hard truncation still works if context_policy is set).
env: ExecutionEnvPlugin-provided behavior (hooks, handlers, transforms).
Implementations§
Source§impl ResolvedAgent
impl ResolvedAgent
Sourcepub fn new(
id: impl Into<String>,
upstream_model: impl Into<String>,
system_prompt: impl Into<String>,
llm_executor: Arc<dyn LlmExecutor>,
) -> Self
pub fn new( id: impl Into<String>, upstream_model: impl Into<String>, system_prompt: impl Into<String>, llm_executor: Arc<dyn LlmExecutor>, ) -> Self
Create a minimal ResolvedAgent (for tests).
pub fn id(&self) -> &str
pub fn model_id(&self) -> &str
pub fn system_prompt(&self) -> &str
pub fn max_rounds(&self) -> usize
pub fn context_policy(&self) -> Option<&ContextWindowPolicy>
pub fn max_continuation_retries(&self) -> usize
pub fn with_tool_executor(self, executor: Arc<dyn ToolExecutor>) -> Self
pub fn with_max_rounds(self, max_rounds: usize) -> Self
pub fn with_tool(self, tool: Arc<dyn Tool>) -> Self
pub fn with_tools(self, tools: Vec<Arc<dyn Tool>>) -> Self
pub fn with_context_policy(self, policy: ContextWindowPolicy) -> Self
pub fn with_context_summarizer( self, summarizer: Arc<dyn ContextSummarizer>, ) -> Self
pub fn with_max_continuation_retries(self, n: usize) -> Self
pub fn tool_descriptors(&self) -> Vec<ToolDescriptor>
Trait Implementations§
Source§impl Clone for ResolvedAgent
impl Clone for ResolvedAgent
Source§fn clone(&self) -> ResolvedAgent
fn clone(&self) -> ResolvedAgent
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ResolvedAgent
impl !RefUnwindSafe for ResolvedAgent
impl Send for ResolvedAgent
impl Sync for ResolvedAgent
impl Unpin for ResolvedAgent
impl UnsafeUnpin for ResolvedAgent
impl !UnwindSafe for ResolvedAgent
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more