pub struct AgentPromptPacket<T> {
pub workflow_name: Name,
pub goal: Purpose,
pub event: Event,
pub input: T,
pub policies: Vec<PolicyInstruction>,
pub output_schema_name: OutputSchemaName,
}Expand description
Safe prompt-and-evidence packet exchanged with an automation agent.
Operator framing: this is the checklist packet an agent receives for one reviewable workflow run. It matters to managers because every suggested action, brief, classification, or customer-message draft should trace back to the workflow name, source event, approved input facts, policy instructions, and expected output shape recorded here.
Next step: compare the packet fields with the workflow’s AgentSpec and
review gates before treating any generated output as usable evidence. The
field-level Rustdoc below documents the API shape; it does not grant live
authority to book, charge, message, schedule, or override policy.
An agent prompt packet bundles the workflow identity, triggering source event, typed app input, policy instructions, and expected output schema sent to an agent runner. It is a draft/evidence gate: agents can use it to prepare a briefing, follow-up draft, classification, or manager-review packet, but the packet itself is not permission to mutate live resort systems.
Fields§
§workflow_name: NameWorkflow 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.
goal: PurposeBusiness 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.
event: EventSource 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.
input: TTyped 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.
policies: Vec<PolicyInstruction>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.
output_schema_name: OutputSchemaNameName 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.
Implementations§
Source§impl<T> AgentPromptPacket<T>
impl<T> AgentPromptPacket<T>
Sourcepub fn builder() -> AgentPromptPacketBuilder<T>
pub fn builder() -> AgentPromptPacketBuilder<T>
Create an instance of AgentPromptPacket using the builder syntax
Trait Implementations§
Source§impl<T: Clone> Clone for AgentPromptPacket<T>
impl<T: Clone> Clone for AgentPromptPacket<T>
Source§fn clone(&self) -> AgentPromptPacket<T>
fn clone(&self) -> AgentPromptPacket<T>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more