mirror of
https://github.com/thecyberlearn/quantum-ai-v2.git
synced 2026-08-18 07:52:58 +00:00
💼 Add Job Posting Generator agent with comprehensive form schema
- Create Human Resources category for HR-related agents - Implement Job Posting Generator with 7-field dynamic form - Add specialized N8N webhook message formatting for job postings - Support multiple seniority levels, contract types, and locations - Complete form validation and error handling - Full integration with existing wallet and execution system Form fields: - Job title and company name - Detailed job description (textarea) - Seniority level (entry to executive) - Contract type (full-time, part-time, contract, etc.) - Location with remote work support - Multi-language support Webhook format matches N8N payload structure exactly. Tested and working with real-time wallet deduction. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
27a1c7d516
commit
cf8583d0b2
130
agents/management/commands/create_job_posting_agent.py
Normal file
130
agents/management/commands/create_job_posting_agent.py
Normal file
@ -0,0 +1,130 @@
|
||||
from django.core.management.base import BaseCommand
|
||||
from agents.models import AgentCategory, Agent
|
||||
|
||||
class Command(BaseCommand):
|
||||
help = 'Create job posting generator agent'
|
||||
|
||||
def handle(self, *args, **options):
|
||||
# Get or use existing HR category
|
||||
hr_category, created = AgentCategory.objects.get_or_create(
|
||||
slug='human-resources',
|
||||
defaults={
|
||||
'name': 'Human Resources',
|
||||
'description': 'AI-powered HR and recruitment tools',
|
||||
'icon': '💼'
|
||||
}
|
||||
)
|
||||
|
||||
if created:
|
||||
self.stdout.write(self.style.SUCCESS(f'Created category: {hr_category.name}'))
|
||||
else:
|
||||
self.stdout.write(f'Category already exists: {hr_category.name}')
|
||||
|
||||
# Create Job Posting Generator agent
|
||||
job_posting_agent, created = Agent.objects.get_or_create(
|
||||
slug='job-posting-generator',
|
||||
defaults={
|
||||
'name': 'Job Posting Generator',
|
||||
'short_description': 'Create professional job postings that attract top talent',
|
||||
'description': 'Generate comprehensive and attractive job postings with AI-powered content creation. Perfect for HR teams and recruiters looking to create compelling job descriptions that attract qualified candidates. Supports multiple languages, locations, and contract types.',
|
||||
'category': hr_category,
|
||||
'price': 10.0,
|
||||
'form_schema': {
|
||||
'fields': [
|
||||
{
|
||||
'name': 'job_title',
|
||||
'type': 'text',
|
||||
'label': 'Job Title',
|
||||
'placeholder': 'e.g., Senior Full Stack Developer',
|
||||
'required': True,
|
||||
'help_text': 'The position title for the job posting'
|
||||
},
|
||||
{
|
||||
'name': 'company_name',
|
||||
'type': 'text',
|
||||
'label': 'Company Name',
|
||||
'placeholder': 'e.g., Quantum Technologies Inc.',
|
||||
'required': True,
|
||||
'help_text': 'Name of the hiring company'
|
||||
},
|
||||
{
|
||||
'name': 'job_description',
|
||||
'type': 'textarea',
|
||||
'label': 'Job Description',
|
||||
'placeholder': 'Describe the role, responsibilities, and what makes this opportunity exciting...',
|
||||
'required': True,
|
||||
'rows': 5,
|
||||
'help_text': 'Detailed description of the role, responsibilities, and company culture'
|
||||
},
|
||||
{
|
||||
'name': 'seniority_level',
|
||||
'type': 'select',
|
||||
'label': 'Seniority Level',
|
||||
'required': True,
|
||||
'options': [
|
||||
{'value': '', 'label': 'Select seniority level...'},
|
||||
{'value': 'entry', 'label': 'Entry Level'},
|
||||
{'value': 'junior', 'label': 'Junior'},
|
||||
{'value': 'mid', 'label': 'Mid Level'},
|
||||
{'value': 'senior', 'label': 'Senior'},
|
||||
{'value': 'lead', 'label': 'Lead'},
|
||||
{'value': 'principal', 'label': 'Principal'},
|
||||
{'value': 'executive', 'label': 'Executive'}
|
||||
],
|
||||
'help_text': 'Experience level required for this position'
|
||||
},
|
||||
{
|
||||
'name': 'contract_type',
|
||||
'type': 'select',
|
||||
'label': 'Contract Type',
|
||||
'required': True,
|
||||
'options': [
|
||||
{'value': '', 'label': 'Select contract type...'},
|
||||
{'value': 'full-time', 'label': 'Full-time'},
|
||||
{'value': 'part-time', 'label': 'Part-time'},
|
||||
{'value': 'contract', 'label': 'Contract'},
|
||||
{'value': 'freelance', 'label': 'Freelance'},
|
||||
{'value': 'internship', 'label': 'Internship'},
|
||||
{'value': 'temporary', 'label': 'Temporary'}
|
||||
],
|
||||
'help_text': 'Type of employment contract'
|
||||
},
|
||||
{
|
||||
'name': 'location',
|
||||
'type': 'text',
|
||||
'label': 'Location',
|
||||
'placeholder': 'e.g., Dubai, UAE (Remote)',
|
||||
'required': True,
|
||||
'help_text': 'Job location, include if remote work is available'
|
||||
},
|
||||
{
|
||||
'name': 'language',
|
||||
'type': 'select',
|
||||
'label': 'Language',
|
||||
'required': False,
|
||||
'default': 'English',
|
||||
'options': [
|
||||
{'value': 'English', 'label': 'English'},
|
||||
{'value': 'Arabic', 'label': 'Arabic (العربية)'},
|
||||
{'value': 'Spanish', 'label': 'Spanish (Español)'},
|
||||
{'value': 'French', 'label': 'French (Français)'},
|
||||
{'value': 'German', 'label': 'German (Deutsch)'},
|
||||
{'value': 'Chinese', 'label': 'Chinese (中文)'}
|
||||
],
|
||||
'help_text': 'Primary language for the job posting'
|
||||
}
|
||||
]
|
||||
},
|
||||
'webhook_url': 'http://localhost:5678/webhook/43f84411-eaaa-488c-9b1f-856e90d0aaf6'
|
||||
}
|
||||
)
|
||||
|
||||
if created:
|
||||
self.stdout.write(self.style.SUCCESS(f'Created agent: {job_posting_agent.name}'))
|
||||
else:
|
||||
self.stdout.write(f'Agent already exists: {job_posting_agent.name}')
|
||||
|
||||
self.stdout.write(self.style.SUCCESS('Job Posting Generator setup completed successfully'))
|
||||
self.stdout.write(f'Agent ID: {job_posting_agent.id}')
|
||||
self.stdout.write(f'Agent Slug: {job_posting_agent.slug}')
|
||||
self.stdout.write(f'Price: {job_posting_agent.price} AED')
|
||||
@ -166,6 +166,17 @@ def format_agent_message(agent_slug, input_data):
|
||||
|
||||
return f"Execute Social Media Ad Creator with the following parameters:. Describe what you'd like to generate: {description}. Include Emoji: {emoji.title()}. For Social Media Platform: {platform.title()}. Language: {language}."
|
||||
|
||||
elif agent_slug == 'job-posting-generator':
|
||||
job_title = input_data.get('job_title', '')
|
||||
company_name = input_data.get('company_name', '')
|
||||
description = input_data.get('job_description', '')
|
||||
seniority = input_data.get('seniority_level', '')
|
||||
contract = input_data.get('contract_type', '')
|
||||
location = input_data.get('location', '')
|
||||
language = input_data.get('language', 'English')
|
||||
|
||||
return f"Create a professional job posting for: {job_title} at {company_name}. Description: {description}. Seniority: {seniority}. Contract: {contract}. Location: {location}. Language: {language}. Make it comprehensive and attractive to candidates."
|
||||
|
||||
# Default formatting for other agents
|
||||
params = [f"{key}: {value}" for key, value in input_data.items() if value]
|
||||
return f"Execute {agent_slug.replace('-', ' ').title()} with parameters: {'. '.join(params)}."
|
||||
|
||||
@ -1,27 +1,17 @@
|
||||
=== Documentation Auto-Update Summary ===
|
||||
Update Date: 2025-07-31 19:05:10
|
||||
Update Date: 2025-07-31 19:05:23
|
||||
|
||||
Recent Commits:
|
||||
- 27a1c7d 📚 Auto-update documentation after agents app implementation
|
||||
- 5eba8fe 🚀 Complete agents app implementation with social ads frontend
|
||||
- 8097f6f ✨ Complete agent template enhancement and repository cleanup
|
||||
- 87e780c 📄 Final documentation summary update
|
||||
|
||||
Agents Changes:
|
||||
- agents/__init__.py
|
||||
- agents/admin.py
|
||||
- agents/apps.py
|
||||
- agents/management/__init__.py
|
||||
- agents/management/commands/__init__.py
|
||||
|
||||
Core Changes:
|
||||
- netcop_hub/settings.py
|
||||
- netcop_hub/urls.py
|
||||
- workflows/views.py
|
||||
|
||||
Documentation Changes:
|
||||
- AGENTS_APP_RECREATION_GUIDE.md
|
||||
- CLAUDE.md
|
||||
|
||||
Updated Documentation Files:
|
||||
- /home/amit/projects/quantum_ai_v2/CLAUDE.md
|
||||
Backend Changes:
|
||||
- docs_update_summary.txt
|
||||
|
||||
No documentation files required updates.
|
||||
|
||||
=== End Summary ===
|
||||
Loading…
Reference in New Issue
Block a user