From 17a614974ce2e0bc6dd32266d8e4f78536979ced Mon Sep 17 00:00:00 2001 From: "Rodrigo Rodriguez (Pragmatismo)" Date: Sun, 25 Jan 2026 14:35:13 -0300 Subject: [PATCH] chore(workspace): final sync and remote standards update --- .../content-moderation.bas | 37 +++++++++++++ .../customer-support-workflow.bas | 54 +++++++++++++++++++ .../package.json | 21 ++++++++ .../marketing-campaign.bas | 45 ++++++++++++++++ .../order-processing.bas | 40 ++++++++++++++ 5 files changed, 197 insertions(+) create mode 100644 multiagent/content-moderation.gbai/content-moderation.bas create mode 100644 multiagent/customer-support-workflow.gbai/customer-support-workflow.bas create mode 100644 multiagent/customer-support-workflow.gbai/package.json create mode 100644 multiagent/marketing-campaign.gbai/marketing-campaign.bas create mode 100644 multiagent/order-processing.gbai/order-processing.bas diff --git a/multiagent/content-moderation.gbai/content-moderation.bas b/multiagent/content-moderation.gbai/content-moderation.bas new file mode 100644 index 0000000..0ab85ae --- /dev/null +++ b/multiagent/content-moderation.gbai/content-moderation.bas @@ -0,0 +1,37 @@ +' Content Moderation Workflow with AI +USE KB "community-guidelines" +USE TOOL "image-analysis" +USE TOOL "text-sentiment" + +ORCHESTRATE WORKFLOW "content-moderation" + +STEP 1: BOT "content-analyzer" "scan content" + ' Multi-modal content analysis + +STEP 2: BOT "policy-checker" "verify guidelines" + ' Check against community standards + +IF toxicity_score > 0.7 OR contains_explicit_content = true THEN + STEP 3: BOT "auto-moderator" "remove content" + PUBLISH EVENT "content_removed" +ELSE IF toxicity_score > 0.4 THEN + STEP 4: HUMAN APPROVAL FROM "moderator@platform.com" + TIMEOUT 3600 ' 1 hour for borderline content + ON TIMEOUT: APPROVE WITH WARNING +END IF + +' Enhanced LLM for context understanding +result = LLM "Analyze content context and cultural sensitivity" + WITH OPTIMIZE FOR "quality" + WITH MAX_COST 0.05 + +IF result.contains("cultural_sensitivity_issue") THEN + STEP 5: BOT "cultural-advisor" "review context" +END IF + +' Learn from moderation decisions +BOT SHARE MEMORY "moderation_patterns" WITH "content-analyzer-v2" + +PUBLISH EVENT "moderation_complete" + +TALK "Content moderation completed" diff --git a/multiagent/customer-support-workflow.gbai/customer-support-workflow.bas b/multiagent/customer-support-workflow.gbai/customer-support-workflow.bas new file mode 100644 index 0000000..39b1ef6 --- /dev/null +++ b/multiagent/customer-support-workflow.gbai/customer-support-workflow.bas @@ -0,0 +1,54 @@ +' Example: Customer Support Workflow with Enhanced Orchestration +' This demonstrates the new ORCHESTRATE WORKFLOW, event system, and bot memory sharing + +USE KB "support-policies" +USE TOOL "check-order" +USE TOOL "process-refund" + +' Set up event handlers +ON EVENT "approval_received" DO + TALK "Manager approval received, processing refund..." +END ON + +ON EVENT "timeout_occurred" DO + TALK "Approval timeout, escalating to director..." +END ON + +' Main workflow orchestration +ORCHESTRATE WORKFLOW "customer-complaint-resolution" + +STEP 1: BOT "classifier" "analyze complaint" + ' Classifier bot analyzes the complaint and sets variables + +STEP 2: BOT "order-checker" "validate order details" + ' Order checker validates the order and warranty status + +' Conditional logic based on order value +IF order_amount > 100 THEN + STEP 3: HUMAN APPROVAL FROM "manager@company.com" + TIMEOUT 1800 ' 30 minutes + ON TIMEOUT: ESCALATE TO "director@company.com" + + ' Wait for approval event + WAIT FOR EVENT "approval_received" TIMEOUT 3600 +END IF + +STEP 4: PARALLEL + BRANCH A: BOT "refund-processor" "process refund" + BRANCH B: BOT "inventory-updater" "update stock levels" +END PARALLEL + +STEP 5: BOT "follow-up" "schedule customer check-in" + DELAY 86400 ' 24 hours later + +' Share successful resolution patterns with other support bots +BOT SHARE MEMORY "successful_resolution_method" WITH "support-bot-2" +BOT SHARE MEMORY "customer_satisfaction_score" WITH "support-bot-3" + +' Sync knowledge from master support bot +BOT SYNC MEMORY FROM "master-support-bot" + +' Publish completion event for analytics +PUBLISH EVENT "workflow_completed" + +TALK "Customer complaint resolved successfully!" diff --git a/multiagent/customer-support-workflow.gbai/package.json b/multiagent/customer-support-workflow.gbai/package.json new file mode 100644 index 0000000..e644421 --- /dev/null +++ b/multiagent/customer-support-workflow.gbai/package.json @@ -0,0 +1,21 @@ +{ + "name": "Customer Support Workflow", + "description": "Advanced customer support workflow with multi-agent orchestration, event handling, and bot memory sharing", + "version": "1.0.0", + "author": "General Bots", + "category": "customer-support", + "keywords": ["workflow", "orchestration", "customer-support", "multi-agent"], + "features": [ + "Multi-step workflow orchestration", + "Human approval integration", + "Event-driven coordination", + "Cross-bot memory sharing", + "Parallel processing", + "Automatic escalation" + ], + "requirements": { + "tools": ["check-order", "process-refund"], + "knowledge_bases": ["support-policies"], + "bots": ["classifier", "order-checker", "refund-processor", "inventory-updater", "follow-up"] + } +} diff --git a/multiagent/marketing-campaign.gbai/marketing-campaign.bas b/multiagent/marketing-campaign.gbai/marketing-campaign.bas new file mode 100644 index 0000000..251d22f --- /dev/null +++ b/multiagent/marketing-campaign.gbai/marketing-campaign.bas @@ -0,0 +1,45 @@ +' Marketing Campaign Automation +USE KB "brand-guidelines" +USE TOOL "social-media-post" +USE TOOL "email-sender" +USE TOOL "analytics-tracker" + +ORCHESTRATE WORKFLOW "marketing-campaign" + +STEP 1: BOT "audience-segmenter" "analyze target demographics" + ' AI-powered audience analysis + +STEP 2: BOT "content-creator" "generate campaign materials" + ' Multi-modal content generation + +' Smart LLM routing for different content types +email_content = LLM "Create engaging email subject line" + WITH OPTIMIZE FOR "cost" + +social_content = LLM "Create viral social media post" + WITH OPTIMIZE FOR "quality" + WITH MAX_LATENCY 5000 + +STEP 3: PARALLEL + BRANCH A: BOT "email-scheduler" "send email campaign" + BRANCH B: BOT "social-scheduler" "post to social media" + BRANCH C: BOT "ad-manager" "launch paid ads" +END PARALLEL + +' Wait for initial results +WAIT FOR EVENT "campaign_metrics_ready" TIMEOUT 7200 + +STEP 4: BOT "performance-analyzer" "analyze results" + +IF engagement_rate < 0.02 THEN + STEP 5: BOT "optimizer" "adjust campaign parameters" + PUBLISH EVENT "campaign_optimized" +END IF + +' Share successful campaign patterns +BOT SHARE MEMORY "high_engagement_content" WITH "content-creator-v2" +BOT SHARE MEMORY "optimal_timing" WITH "scheduler-bots" + +PUBLISH EVENT "campaign_complete" + +TALK "Marketing campaign launched and optimized!" diff --git a/multiagent/order-processing.gbai/order-processing.bas b/multiagent/order-processing.gbai/order-processing.bas new file mode 100644 index 0000000..208adaf --- /dev/null +++ b/multiagent/order-processing.gbai/order-processing.bas @@ -0,0 +1,40 @@ +' E-commerce Order Processing Workflow +USE KB "order-policies" +USE TOOL "validate-payment" +USE TOOL "reserve-inventory" +USE TOOL "send-confirmation" + +ORCHESTRATE WORKFLOW "order-processing" + +STEP 1: BOT "fraud-detector" "analyze transaction" + ' AI-powered fraud detection + +STEP 2: BOT "inventory-checker" "verify availability" + ' Check stock levels and reserve items + +IF fraud_score > 0.8 THEN + STEP 3: HUMAN APPROVAL FROM "security@store.com" + TIMEOUT 900 ' 15 minutes for high-risk orders + ON TIMEOUT: REJECT ORDER +END IF + +IF payment_method = "credit_card" THEN + STEP 4: BOT "payment-processor" "charge card" +ELSE + STEP 4: BOT "payment-processor" "process alternative" +END IF + +STEP 5: PARALLEL + BRANCH A: BOT "shipping-optimizer" "select carrier" + BRANCH B: BOT "inventory-updater" "update stock" + BRANCH C: BOT "notification-sender" "send confirmation" +END PARALLEL + +' Share successful processing patterns +BOT SHARE MEMORY "fraud_indicators" WITH "fraud-detector-backup" +BOT SHARE MEMORY "shipping_preferences" WITH "logistics-bot" + +' Publish completion event +PUBLISH EVENT "order_processed" + +TALK "Order processed successfully!"