quantum-ai-v3/workflows/config/agents.py
Claude 5eba8fee84 🚀 Complete agents app implementation with social ads frontend
- Create complete REST API-based agents system for scalability
- Implement Social Ads Generator with dynamic form rendering
- Add agents marketplace with search and category filtering
- Build real-time wallet balance updates after execution
- Fix URL routing conflicts and API endpoint issues
- Add comprehensive N8N webhook integration with proper payload format
- Create dynamic template system for 100+ agent scalability

Features:
- Database-driven agent management via Django admin
- JSON schema-based dynamic form generation
- Real-time wallet balance deduction and display updates
- Comprehensive error handling and validation
- Mobile-responsive marketplace UI
- Complete API endpoints for frontend integration

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-31 19:05:09 +05:30

63 lines
1.9 KiB
Python

"""
Simplified agent configuration system for unified workflows app.
Each agent is defined by essential metadata only - forms are handled in individual templates.
"""
AGENT_CONFIGS = {
'social-ads-generator': {
'name': 'Social Ads Generator',
'description': 'Create engaging social media advertisements with AI-powered content generation',
'price': 6.0,
'icon': '📱',
'webhook_url': 'http://localhost:5678/webhook/2dc234d8-7217-454a-83e9-81afe5b4fe2d',
},
'job-posting-generator': {
'name': 'Job Posting Generator',
'description': 'Create professional job postings that attract top talent',
'price': 10.0,
'icon': '💼',
'webhook_url': 'http://localhost:5678/webhook/43f84411-eaaa-488c-9b1f-856e90d0aaf6',
},
'data-analyzer': {
'name': 'Data Analyzer',
'description': 'AI-powered analysis of your data files with comprehensive insights',
'price': 8.0,
'icon': '📊',
'webhook_url': 'http://localhost:5678/webhook/simple-pdf-processor',
},
}
def get_agent_config(agent_slug):
"""Get agent configuration by slug"""
return AGENT_CONFIGS.get(agent_slug)
def get_all_agents():
"""Get all available agent configurations"""
return AGENT_CONFIGS
def get_available_agents():
"""Get all agents formatted for navigation components"""
return {
slug: {
'name': config['name'],
'icon': config['icon'],
'description': config['description']
}
for slug, config in AGENT_CONFIGS.items()
}
def format_message_for_n8n(agent_slug, form_data):
"""Format form data into message for N8N webhook"""
config = get_agent_config(agent_slug)
if not config:
return None
# Simple format - just send the form data as is
return f"Process {config['name']} request: {str(form_data)}"