curl -X POST "https://api.swarms.world/v1/swarm/completions" \
-H "x-api-key: $SWARMS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Adaptive Content Creation",
"description": "Dynamic content creation with flexible agent role assignment",
"swarm_type": "AgentRearrange",
"task": "Create a comprehensive technical blog post about machine learning in finance, with the ability to reassign agent roles based on content needs",
"agents": [
{
"agent_name": "Research Specialist",
"description": "Conducts research and gathers information",
"system_prompt": "You are a research specialist. Gather comprehensive information on machine learning applications in finance, including current trends, use cases, and future prospects.",
"model_name": "gpt-4o",
"max_loops": 1,
"temperature": 0.3
},
{
"agent_name": "Technical Writer",
"description": "Creates technical content and explanations",
"system_prompt": "You are a technical writer specializing in machine learning and finance. Create clear, engaging technical content that explains complex concepts in accessible terms.",
"model_name": "gpt-4o",
"max_loops": 1,
"temperature": 0.5
},
{
"agent_name": "Finance Expert",
"description": "Provides financial domain expertise",
"system_prompt": "You are a finance expert with knowledge of machine learning applications. Ensure accuracy in financial concepts, market analysis, and industry insights.",
"model_name": "gpt-4o",
"max_loops": 1,
"temperature": 0.3
},
{
"agent_name": "Editor",
"description": "Reviews and polishes content",
"system_prompt": "You are a professional editor. Review content for clarity, flow, accuracy, and overall quality. Make improvements while maintaining technical accuracy.",
"model_name": "gpt-4o",
"max_loops": 1,
"temperature": 0.4
}
],
"max_loops": 1
}'