Real-Time Dynamic Bundling Agent Workflow Specification
Design an autonomous tool-calling pipeline that creates and prices high-margin product bundles dynamically in real time.
Deploy this template when building an autonomous bundling service that listens to cart events, evaluates margin constraints, and dynamically generates customized product kits. It outlines tool chains, validation rules, and latency limits.
Role: Lead E-commerce Merchandising Automation Engineer specializing in agentic systems and dynamic pricing.
Context
- Storefront platform: {{storefront_platform}}
- Target customer segment: {{target_customer_tier}}
- Bundle recommendation engine: {{bundle_rule_engine}}
- Minimum combined basket margin: {{min_basket_margin}}
- Maximum allowable agent latency: {{max_tool_invocation_latency_ms}}
- Human supervisor escalation threshold: {{human_override_threshold}}
Task
Produce an end-to-end technical workflow specification for an autonomous agent that intercepts customer basket events, calls recommendation and pricing tools, and publishes dynamically generated product bundles to {{storefront_platform}}.
Method
- Define the event hook listener structure capturing cart state changes for {{target_customer_tier}} customers.
- Construct the tool-calling signature for the candidate generator calling {{bundle_rule_engine}} with current basket IDs.
- Specify the margin evaluation tool schema that calculates composite discount eligibility against {{min_basket_margin}}.
- Build the dynamic bundle injection tool definition compatible with {{storefront_platform}} checkout APIs.
- Map the sequential execution DAG ensuring strict evaluation of margin rules prior to basket injection.
- Incorporate a timeout budget enforcement step ensuring total chain latency remains under {{max_tool_invocation_latency_ms}}.
- Establish the risk rating heuristic that pauses autonomous publication and escalates to {{human_override_threshold}} when anomalies arise.
Constraints
- Dynamic bundle discounts MUST NOT breach the {{min_basket_margin}} boundary under any condition.
- The agent MUST terminate execution gracefully if API latency exceeds {{max_tool_invocation_latency_ms}}.
- Tool parameter declarations must strictly enforce integer prices and string SKU formats.
- No bundle may be injected without an automated inventory stock reservation check.
Output format
Provide the completed specification structured in these exact sections:
- Pipeline Summary (1 paragraph, max 150 words)
- Agent Tool Definitions (JSON schemas for 3 distinct tools)
- Workflow State Machine (state transitions and decision branches)
- Risk Control & Escalation Criteria (table format)
Self-review
- Confirm that latency constraints are enforced at each tool invocation step.
- Validate that human escalation boundaries are distinct, measurable, and complete.
- Check that all parameter schemas match standard JSON schema conventions.
Explicit role, a named task, and discrete steps the model can follow.
Background, inputs and variables the model needs before it starts.
Hard boundaries — what the model must and must not do.
A named, field-level shape for the response.
Ordered work items that force analysis before an answer.
Length and structure that travel across frontier models.
Signal density — instruction weight without padding.
Documented variables so the scaffold adapts to new inputs.
Quality bar, assumptions and behaviour when inputs are thin.
How much real usage the template has behind it.