From 2aea35f2d9329886fe4fa5e44fefd837afd15134 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 6 Aug 2025 08:56:56 +0530 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Add=20Lean=20Six=20Sigma=20Expert?= =?UTF-8?q?=20agent=20with=20Railway=20integration?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add Business Consulting category to Railway config - Create System 2 direct access agent with JotForm integration - Add dedicated template with full-screen iframe layout - Implement view functions for payment processing and form display - Update marketplace template with special Try Now routing - Add URL routes for agent access and display pages - Create JSON config for Railway deployment compatibility - Ensure identical database state between local and production 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- .../configs/agents/lean-six-sigma-expert.json | 16 ++++ agents/configs/categories/categories.json | 6 ++ .../commands/create_lean_six_sigma_agent.py | 60 ++++++++++++ agents/templates/agents/marketplace.html | 8 ++ agents/urls.py | 2 + agents/views.py | 96 +++++++++++++++++++ templates/lean_six_sigma_expert.html | 43 +++++++++ 7 files changed, 231 insertions(+) create mode 100644 agents/configs/agents/lean-six-sigma-expert.json create mode 100644 agents/management/commands/create_lean_six_sigma_agent.py create mode 100644 templates/lean_six_sigma_expert.html diff --git a/agents/configs/agents/lean-six-sigma-expert.json b/agents/configs/agents/lean-six-sigma-expert.json new file mode 100644 index 0000000..16af8e5 --- /dev/null +++ b/agents/configs/agents/lean-six-sigma-expert.json @@ -0,0 +1,16 @@ +{ + "slug": "lean-six-sigma-expert", + "name": "Lean Six Sigma Expert", + "short_description": "Get expert guidance on Lean Six Sigma methodologies and process improvement strategies", + "description": "Optimize your business processes with expert Lean Six Sigma consultation. Our AI-powered expert provides comprehensive guidance on process improvement, waste reduction, quality enhancement, and operational excellence. Get personalized recommendations for implementing Lean Six Sigma methodologies in your organization.", + "category": "consulting", + "price": 0.0, + "agent_type": "form", + "system_type": "direct_access", + "form_schema": { + "fields": [] + }, + "webhook_url": "https://agent.jotform.com/01987b8843ae71129342f62a93d2c605efad", + "access_url_name": "agents:direct_access_handler", + "display_url_name": "agents:direct_access_display" +} \ No newline at end of file diff --git a/agents/configs/categories/categories.json b/agents/configs/categories/categories.json index c3b3411..2047ec7 100644 --- a/agents/configs/categories/categories.json +++ b/agents/configs/categories/categories.json @@ -28,5 +28,11 @@ "name": "Marketing & Advertising", "description": "AI-powered marketing tools and advertising solutions", "icon": "📢" + }, + { + "slug": "consulting", + "name": "Business Consulting", + "description": "Professional business consultation and strategy services", + "icon": "💼" } ] \ No newline at end of file diff --git a/agents/management/commands/create_lean_six_sigma_agent.py b/agents/management/commands/create_lean_six_sigma_agent.py new file mode 100644 index 0000000..b7fdeba --- /dev/null +++ b/agents/management/commands/create_lean_six_sigma_agent.py @@ -0,0 +1,60 @@ +from django.core.management.base import BaseCommand +from agents.models import AgentCategory, Agent + +class Command(BaseCommand): + help = 'Create Lean Six Sigma Expert agent with JotForm integration' + + def handle(self, *args, **options): + # Create Business Consulting category + consulting_category, created = AgentCategory.objects.get_or_create( + slug='consulting', + defaults={ + 'name': 'Business Consulting', + 'description': 'Professional business consultation and strategy services', + 'icon': '💼' + } + ) + + if created: + self.stdout.write(self.style.SUCCESS(f'Created category: {consulting_category.name}')) + else: + self.stdout.write(f'Category already exists: {consulting_category.name}') + + # Create Lean Six Sigma Expert agent + lean_six_sigma_agent, created = Agent.objects.get_or_create( + slug='lean-six-sigma-expert', + defaults={ + 'name': 'Lean Six Sigma Expert', + 'short_description': 'Get expert guidance on Lean Six Sigma methodologies and process improvement strategies', + 'description': 'Optimize your business processes with expert Lean Six Sigma consultation. Our AI-powered expert provides comprehensive guidance on process improvement, waste reduction, quality enhancement, and operational excellence. Get personalized recommendations for implementing Lean Six Sigma methodologies in your organization.', + 'category': consulting_category, + 'price': 0.0, + 'agent_type': 'form', + 'form_schema': { + 'fields': [] # Empty since we're using JotForm directly + }, + 'webhook_url': 'https://agent.jotform.com/01987b8843ae71129342f62a93d2c605efad', + 'access_url_name': 'agents:direct_access_handler', + 'display_url_name': 'agents:direct_access_display' + } + ) + + if created: + self.stdout.write(self.style.SUCCESS(f'Created agent: {lean_six_sigma_agent.name}')) + self.stdout.write(f' 📝 Description: {lean_six_sigma_agent.short_description}') + self.stdout.write(f' 💰 Price: {lean_six_sigma_agent.price} AED') + self.stdout.write(f' 🔗 JotForm URL: {lean_six_sigma_agent.webhook_url}') + self.stdout.write(f' 📂 Category: {lean_six_sigma_agent.category.name}') + else: + self.stdout.write(f'Agent already exists: {lean_six_sigma_agent.name}') + + self.stdout.write('') + self.stdout.write(self.style.SUCCESS('✅ Lean Six Sigma Expert setup completed successfully')) + self.stdout.write('') + self.stdout.write('🚀 Next steps:') + self.stdout.write(' 1. Agent will appear in the Business Consulting category') + self.stdout.write(' 2. Users get free access to JotForm Lean Six Sigma consultation') + self.stdout.write(' 3. Visit /agents/lean-six-sigma-expert/ to test the interface') + self.stdout.write('') + self.stdout.write(f'Agent ID: {lean_six_sigma_agent.id}') + self.stdout.write(f'Agent Slug: {lean_six_sigma_agent.slug}') \ No newline at end of file diff --git a/agents/templates/agents/marketplace.html b/agents/templates/agents/marketplace.html index b9d7e03..05bb64c 100644 --- a/agents/templates/agents/marketplace.html +++ b/agents/templates/agents/marketplace.html @@ -82,6 +82,10 @@ Try Now → + {% elif agent.slug == 'lean-six-sigma-expert' %} + + Try Now → + {% else %} Try Now → {% endif %} @@ -94,6 +98,10 @@ + {% elif agent.slug == 'lean-six-sigma-expert' %} + {% else %}