agent_name | string | No | - | The unique name assigned to the agent, which identifies its role and functionality within the swarm. |
description | string | No | - | A detailed explanation of the agent’s purpose, capabilities, and any specific tasks it is designed to perform. |
system_prompt | string | No | - | The initial instruction or context provided to the agent, guiding its behavior and responses during execution. |
marketplace_prompt_id | string | No | - | The ID of a prompt from the Swarms marketplace to use as the system prompt. If provided, the prompt will be automatically retrieved from the marketplace. |
model_name | string | No | "gpt-4.1" | The name of the AI model that the agent will utilize for processing tasks and generating outputs. Examples: gpt-4o, gpt-4.1, openai/o3-mini, claude-sonnet-4-20250514. |
auto_generate_prompt | boolean | No | false | A flag indicating whether the agent should automatically create prompts based on the task requirements. |
max_tokens | integer | No | 8192 | The maximum number of tokens that the agent is allowed to generate in its responses, limiting output length. |
temperature | number | No | - | A parameter that controls the randomness of the agent’s output; lower values result in more deterministic responses. If omitted, no temperature is sent to the model and the provider’s own default applies. |
role | string | No | "worker" | The designated role of the agent within the swarm, which influences its behavior and interaction with other agents. |
max_loops | integer | string | No | 1 | Maximum number of iterations the agent can perform for its task. Accepts an integer for a fixed count, or 'auto' to allow the system to determine the necessary number based on the task’s complexity. |
tools_list_dictionary | array[object] | No | - | A dictionary of tools that the agent can use to complete its task. |
selected_tools | string | array[string] | No | All safe tools | Tools to enable for the autonomous looper when max_loops="auto". Pass a list of tool names to restrict which tools the agent can use (e.g. ["think", "create_plan"]). Available tools: create_plan, think, subtask_done, complete_task, respond_to_user, create_file, update_file, read_file, list_directory, delete_file, create_sub_agent, assign_task. Note: run_bash is not permitted for security reasons. |
mcp_url | string | No | - | The URL of the MCP server that the agent can use to complete its task. |
mcp_config | object | No | - | The MCP connection configuration to use for the agent. See MCP Connection Configuration table below. |
mcp_configs | object | No | - | Multiple MCP connections to use for the agent. This is a list of MCP connections. See Multiple MCP Connections below. |
streaming_on | boolean | No | false | A flag indicating whether the agent should stream its output. |
llm_args | object | No | - | Additional arguments to pass to the LLM such as top_p, frequency_penalty, presence_penalty, etc. |
dynamic_temperature_enabled | boolean | No | true | A flag indicating whether the agent should dynamically adjust its temperature based on the task. |
tool_call_summary | boolean | No | true | A parameter enabling an agent to summarize tool calls. |
reasoning_effort | string | No | "low" | The effort to put into reasoning. Options: 'low', 'medium', 'high'. Used with reasoning-enabled models. |
thinking_tokens | integer | No | - | The number of tokens to use for thinking. Used with reasoning-enabled models. |
reasoning_enabled | boolean | No | false | A parameter enabling an agent to use reasoning capabilities. |
publish_to_marketplace | boolean | No | false | A flag indicating whether to publish this agent to the Swarms marketplace. |
use_cases | array[object] | No | - | A list of use case dictionaries with title and description keys. Required when publish_to_marketplace is true. |
tags | array[string] | No | - | A list of searchable tags/keywords for the marketplace (e.g., ['finance', 'analysis']). |
capabilities | array[string] | No | - | A list of agent capabilities or features (e.g., ['trend-analysis', 'risk-assessment']). |
category | string | No | - | The marketplace category for the agent (e.g., 'research', 'content', 'coding', 'finance', 'healthcare', 'education', 'legal'). |
is_free | boolean | No | true | A flag indicating whether the agent is free to use in the marketplace. |
price_usd | number | No | - | The price in USD for using this agent in the marketplace (if not free). |
handoffs | array[AgentSpec] | No | - | A list of agent specifications that this agent can hand off tasks to. These agents will be created and passed to the agent’s handoffs parameter. |