pub struct FollowupTool { /* private fields */ }Expand description
The schedule_followup tool: the agent books its own next wake-up.
The follow-up runs as a delayed agent_run job in the same session, with
delivery on. Turn it on with
AgentPlugin::followups.
Implementations§
Source§impl FollowupTool
impl FollowupTool
Sourcepub const MAX_PROMPT_CHARS: usize = 2_000
pub const MAX_PROMPT_CHARS: usize = 2_000
Longest prompt a follow-up may carry, in characters.
Sourcepub const MAX_CHAIN: u32 = 10
pub const MAX_CHAIN: u32 = 10
Longest chain of follow-ups (a follow-up that schedules a follow-up that …). Stops an agent from waking itself forever.
Sourcepub const fn depth(self, depth: u32) -> Self
pub const fn depth(self, depth: u32) -> Self
The run this tool serves is depth follow-ups deep.
Sourcepub fn memory_scope(self, scope: MemoryScope) -> Self
pub fn memory_scope(self, scope: MemoryScope) -> Self
Run follow-ups with memory bound to this scope.
Trait Implementations§
Source§impl Clone for FollowupTool
impl Clone for FollowupTool
Source§impl Debug for FollowupTool
impl Debug for FollowupTool
Source§impl Tool for FollowupTool
impl Tool for FollowupTool
Source§fn description(&self) -> &'static str
fn description(&self) -> &'static str
What the tool does, shown to the model.
Source§fn input_schema(&self) -> Value
fn input_schema(&self) -> Value
JSON Schema for the tool’s input object.
Source§fn effect(&self) -> ToolEffect
fn effect(&self) -> ToolEffect
What the tool can change. Defaults to
ToolEffect::Write: a tool
is trusted with less only when it says so.Source§fn execute<'a>(
&'a self,
input: Value,
ctx: &'a ToolContext,
) -> Pin<Box<dyn Future<Output = Result<Value, AgentError>> + Send + 'a>>
fn execute<'a>( &'a self, input: Value, ctx: &'a ToolContext, ) -> Pin<Box<dyn Future<Output = Result<Value, AgentError>> + Send + 'a>>
Run the tool against decoded JSON arguments.
Source§fn definition(&self) -> ToolDefinition
fn definition(&self) -> ToolDefinition
Bundle the metadata the model sees into a
ToolDefinition.Auto Trait Implementations§
impl Forget for FollowupTool
impl Freeze for FollowupTool
impl RefUnwindSafe for FollowupTool
impl Send for FollowupTool
impl Sync for FollowupTool
impl Unpin for FollowupTool
impl UnsafeUnpin for FollowupTool
impl UnwindSafe for FollowupTool
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> Scoped for T
impl<T> Scoped for T
Source§fn scope(ctx: &PolicyContext) -> ScopeQuery<'_, Self>
fn scope(ctx: &PolicyContext) -> ScopeQuery<'_, Self>
Open a deferred
ScopeQuery for this type. Resolves the
registered scope at .load() time, not here.