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>
impl<T, S: State> AgentPromptPacketBuilder<T, S>
Sourcepub fn build(self) -> AgentPromptPacket<T>where
S: IsComplete,
pub fn build(self) -> AgentPromptPacket<T>where
S: IsComplete,
Finish building and return the requested object
Sourcepub fn workflow_name(
self,
value: Name,
) -> AgentPromptPacketBuilder<T, SetWorkflowName<S>>where
S::WorkflowName: IsUnset,
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.
Sourcepub fn goal(self, value: Purpose) -> AgentPromptPacketBuilder<T, SetGoal<S>>where
S::Goal: IsUnset,
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.
Sourcepub fn event(self, value: Event) -> AgentPromptPacketBuilder<T, SetEvent<S>>where
S::Event: IsUnset,
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.
Sourcepub fn input(self, value: T) -> AgentPromptPacketBuilder<T, SetInput<S>>where
S::Input: IsUnset,
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.
Sourcepub fn policies(
self,
value: Vec<PolicyInstruction>,
) -> AgentPromptPacketBuilder<T, SetPolicies<S>>where
S::Policies: IsUnset,
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.
Sourcepub fn output_schema_name(
self,
value: OutputSchemaName,
) -> AgentPromptPacketBuilder<T, SetOutputSchemaName<S>>where
S::OutputSchemaName: IsUnset,
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.