Skip to main content

AgentPromptPacketBuilder

Struct AgentPromptPacketBuilder 

Source
pub struct AgentPromptPacketBuilder<T, S: State = Empty> { /* private fields */ }
Expand description

Use builder syntax to set the inputs and finish with build().

Implementations§

Source§

impl<T, S: State> AgentPromptPacketBuilder<T, S>

Source

pub fn build(self) -> AgentPromptPacket<T>
where S: IsComplete,

Finish building and return the requested object

Source

pub fn workflow_name( self, value: Name, ) -> AgentPromptPacketBuilder<T, SetWorkflowName<S>>
where S::WorkflowName: IsUnset,

Required.

Workflow identifier that ties the packet to a specific agent spec.

Examples include manager-daily-brief, booking-triage, and grooming-rebooking; the name lets audits connect a packet back to the workflow rules that defined its allowed tools and forbidden actions.

Source

pub fn goal(self, value: Purpose) -> AgentPromptPacketBuilder<T, SetGoal<S>>
where S::Goal: IsUnset,

Required.

Business goal the agent should pursue while preparing only draft output.

This describes the labor, customer-service, safety, or data-quality outcome for the workflow, such as summarizing labor risk or drafting a customer follow-up, without granting authority to perform the action.

Source

pub fn event(self, value: Event) -> AgentPromptPacketBuilder<T, SetEvent<S>>
where S::Event: IsUnset,

Required.

Source workflow event that caused the packet to be built.

The event provides audit correlation for the triggering reservation, intake, document, review, incident, or scheduled briefing path so a human reviewer can trace why this packet exists.

Source

pub fn input(self, value: T) -> AgentPromptPacketBuilder<T, SetInput<S>>
where S::Input: IsUnset,

Required.

Typed app-layer input facts available to the agent for this run.

The payload should contain the workflow-specific request or evidence the app has already promoted from source systems; it is context for drafting, not authorization to repair or overwrite those source records.

Source

pub fn policies( self, value: Vec<PolicyInstruction>, ) -> AgentPromptPacketBuilder<T, SetPolicies<S>>
where S::Policies: IsUnset,

Required.

Policy instructions the runner must include in the agent context.

These instructions state review gates, safety limits, escalation rules, and source-grounding requirements that constrain agent drafts and make policy compliance reviewable after the run.

Source

pub fn output_schema_name( self, value: OutputSchemaName, ) -> AgentPromptPacketBuilder<T, SetOutputSchemaName<S>>
where S::OutputSchemaName: IsUnset,

Required.

Name of the output schema expected from the agent.

The schema name tells the runner and validator which structured draft, classification, briefing, or evidence bundle shape to expect before any downstream workflow code accepts the output.

Auto Trait Implementations§

§

impl<T, S> Freeze for AgentPromptPacketBuilder<T, S>
where T: Freeze,

§

impl<T, S> RefUnwindSafe for AgentPromptPacketBuilder<T, S>
where T: RefUnwindSafe,

§

impl<T, S> Send for AgentPromptPacketBuilder<T, S>
where T: Send,

§

impl<T, S> Sync for AgentPromptPacketBuilder<T, S>
where T: Sync,

§

impl<T, S> Unpin for AgentPromptPacketBuilder<T, S>
where T: Unpin,

§

impl<T, S> UnsafeUnpin for AgentPromptPacketBuilder<T, S>
where T: UnsafeUnpin,

§

impl<T, S> UnwindSafe for AgentPromptPacketBuilder<T, S>
where T: UnwindSafe,

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

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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, 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.