mirror of
https://github.com/thecyberlearn/quantum-ai-v3.git
synced 2026-08-18 17:12:58 +00:00
BREAKTHROUGH: Configuration-driven agent management that scales to 100+ agents ## New System Architecture: - **JSON Configuration Files**: All agents defined in version-controlled JSON - **Dynamic Loading**: populate_agents.py reads from config files automatically - **Zero Code Changes**: Add new agents by creating JSON files only - **Automatic Railway Sync**: Single command ensures database consistency ## File Structure: - agents/configs/categories/categories.json - All categories - agents/configs/agents/*.json - Individual agent configurations - agents/configs/README.md - Complete documentation ## Key Benefits: ✅ **Ultimate Scalability**: Add 1000+ agents without touching code ✅ **Version Control**: All agent definitions tracked in git ✅ **Railway Consistency**: Single command syncs local and production ✅ **Developer Experience**: JSON files are easier than Python commands ✅ **Validation**: Built-in error handling and field validation ✅ **Documentation**: Self-documenting with clear examples ## Migration Path: - Extracted all 6 existing agents to JSON configurations - Updated populate_agents.py to load dynamically from configs - Maintained backward compatibility - Added comprehensive documentation ## Usage: ```bash # Add new agent: Create JSON file in agents/configs/agents/ # Deploy to Railway: python manage.py populate_agents # Result: Agent automatically appears in marketplace ``` This solves the original issue: "if we create another will it show on railway also???" Answer: YES - just create JSON file and run populate_agents\! 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
3.4 KiB
3.4 KiB
Agent Configuration System
This directory contains JSON configuration files for dynamically creating agents and categories in the Quantum Tasks AI platform.
Directory Structure
agents/configs/
├── categories/
│ └── categories.json # All agent categories
├── agents/
│ ├── ai-brand-strategist.json # Direct access agent
│ ├── cybersec-career-navigator.json # Direct access agent
│ ├── five-whys-analysis.json # Chat webhook agent
│ ├── job-posting-generator.json # Form webhook agent
│ ├── pdf-summarizer.json # File upload webhook agent
│ └── social-ads-generator.json # Form webhook agent
└── README.md # This file
How It Works
- Categories are defined in
categories/categories.json - Agents are defined in individual JSON files in
agents/ - Run
python manage.py populate_agentsto create all agents from configs - Adding new agents is as simple as creating a new JSON file
Adding New Agents
Step 1: Create JSON Configuration File
Create a new file in agents/ directory, e.g., email-writer.json:
{
"slug": "email-writer",
"name": "Email Writer",
"short_description": "AI-powered professional email writing assistant",
"description": "Generate professional emails for any purpose with AI assistance.",
"category": "marketing",
"price": 3.0,
"agent_type": "form",
"system_type": "webhook",
"form_schema": {
"fields": [
{
"name": "email_type",
"type": "select",
"label": "Email Type",
"required": true,
"options": [
{"value": "business", "label": "Business Email"},
{"value": "marketing", "label": "Marketing Email"}
]
}
]
},
"webhook_url": "http://localhost:5678/webhook/email-writer",
"access_url_name": "",
"display_url_name": ""
}
Step 2: Run Population Command
python manage.py populate_agents
Step 3: Agent Appears Automatically
The agent will now appear in the marketplace with the configured settings.
Agent Types
Webhook Agents (N8N Integration)
- Set
system_type:"webhook" - Include detailed
form_schemawith fields - Set
webhook_urlto N8N endpoint - Leave
access_url_nameanddisplay_url_nameempty
Direct Access Agents (External Forms)
- Set
system_type:"direct_access" - Set
form_schema:{"fields": []} - Set
webhook_urlto external form URL (JotForm, etc.) - Set
access_url_name:"agents:direct_access_handler" - Set
display_url_name:"agents:direct_access_display"
Field Types for Webhook Agents
text: Single-line text inputtextarea: Multi-line text inputselect: Dropdown with options arrayfile: File upload with drag-and-dropurl: URL input with validationcheckbox: Boolean checkbox
Benefits
✅ Scalable: Add 100+ agents without code changes ✅ Version Controlled: All agent definitions in git ✅ Consistent: Ensures local and Railway databases match ✅ Simple: Just create JSON file and run command ✅ Validated: Built-in validation and error handling
Railway Deployment
On Railway, just run:
python manage.py populate_agents
All agents defined in JSON files will be created automatically, ensuring Railway marketplace shows all agents consistently.