From 1601e9662585b1954284da91a668b3e240369faa Mon Sep 17 00:00:00 2001 From: Ravi Prakash Date: Fri, 27 Sep 2024 10:37:02 +0530 Subject: [PATCH] Create state-machine version 0.1 --- arch/state-machine.md | 45 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 arch/state-machine.md diff --git a/arch/state-machine.md b/arch/state-machine.md new file mode 100644 index 0000000..e50119b --- /dev/null +++ b/arch/state-machine.md @@ -0,0 +1,45 @@ +# State Machine for an Agentic Workflow +Below is the state machine of an agentic workflow on a BAP + +```mermaid +stateDiagram-v2 + [*] --> AgentOrchestrator + + AgentOrchestrator --> DiscoveryAgent + AgentOrchestrator --> PriceNegotiationAgent + AgentOrchestrator --> TermsNegotiationAgent + AgentOrchestrator --> FulfillmentAgent + AgentOrchestrator --> SupportAgent + + DiscoveryAgent --> PriceNegotiationAgent + DiscoveryAgent --> TermsNegotiationAgent + PriceNegotiationAgent --> ConfirmationAgent + TermsNegotiationAgent --> ConfirmationAgent + ConfirmationAgent --> FulfillmentAgent + + FulfillmentAgent --> TrackingAgent + FulfillmentAgent --> CancellationAgent + FulfillmentAgent --> ModificationAgent + + CancellationAgent --> FulfillmentAgent + CancellationAgent --> SupportAgent + + ModificationAgent --> FulfillmentAgent + + TrackingAgent --> SupportAgent + SupportAgent --> Tool + RatingAgent --> SupportAgent + + PriceNegotiationAgent --> DiscoveryAgent : Continue browsing after price negotiation + TermsNegotiationAgent --> DiscoveryAgent : Return to browsing due to undesirable terms + TermsNegotiationAgent --> PriceNegotiationAgent : Adjust price based on terms + PriceNegotiationAgent --> TermsNegotiationAgent : Adjust terms based on pricing + ConfirmationAgent --> TermsNegotiationAgent : Revisit terms before confirming + + FulfillmentAgent --> ModificationAgent : Update fulfillment based on modifications + FulfillmentAgent --> TrackingAgent : Reverse connection to update fulfillment + SupportAgent --> DiscoveryAgent : Assist in rediscovering services + SupportAgent --> PriceNegotiationAgent : Assist in pricing-related issues + SupportAgent --> TermsNegotiationAgent : Assist in terms-related issues + CancellationAgent --> TermsNegotiationAgent : Renegotiate terms before cancellation + RatingAgent --> FulfillmentAgent : Feedback for fulfillment process