What is the Swarms Marketplace?
The Swarms Marketplace provides:- One-Line Prompt Loading: Load prompts instantly using a UUID
- Community Sharing: Discover prompts created by other developers
- Monetization: Publish paid prompts and earn from your expertise
- Version Control: Track and manage prompt versions
- Rich Metadata: Comprehensive descriptions, use cases, and tags
- Direct Integration: Seamless integration with Swarms agents
Quick Start
Loading a Marketplace Prompt
Load a prompt from the marketplace in one line:When you provide a
marketplace_prompt_id, the agent fetches the prompt from the marketplace at construction and appends it to its system_prompt. If agent_name or agent_description were left at their defaults, they are filled in from the marketplace prompt. If no prompt with that ID exists, construction raises ValueError.Fetching Prompts Programmatically
Fetch by Prompt ID
Fetch a prompt using its unique UUID:Fetch by Prompt Name
Fetch a prompt using its name:Get Full Response
Retrieve the complete prompt data:Publishing to the Marketplace
Publishing a Prompt
Share your prompts with the community:Publishing from an Agent
Automatically publish an agent’s configuration:When publishing via
publish_to_marketplace=True, use the Agent’s real constructor parameters: agent_description (not description) and tags as a List[str]. There is currently no category parameter on Agent — auto-published agents are always filed under the "research" category server-side, regardless of the agent’s actual domain. tags and capabilities are merged into a single comma-separated string when publishing; either may be set on its own, or neither. use_cases is required: publishing without it raises AgentInitializationError. The prompt that gets published is short_memory.get_str(), the agent’s conversation history as one string, not the raw system_prompt you passed in. To control the category or publish exactly the prompt text you wrote, call AgentMarketplaceHandler.add_prompt directly instead.API Configuration
Setting Up Your API Key
API Key Validation
Advanced Usage
Custom Timeout Configuration
Error Handling
Publishing Paid Prompts
Monetize your expertise with paid prompts:Real-World Examples
Example 1: Quantitative Trading Agent
Load a sophisticated trading agent from the marketplace:Example 2: Medical AI Assistant
Example 3: Publishing a Research Agent
Marketplace Categories
Organize your prompts by category. The SDK only defines the default,research, and sends whatever string you pass; the accepted set is decided by the marketplace server, so treat this list as examples:
research- Research and analysiscontent- Content creation and writingcoding- Software development and programmingfinance- Financial analysis and tradinghealthcare- Medical and health applicationsmarketing- Marketing and advertisingeducation- Educational and traininglegal- Legal analysis and documentationcustomer-service- Customer supportdata-science- Data analysis and ML
Best Practices
Clear Descriptions
Write comprehensive descriptions explaining what your prompt does
Detailed Use Cases
Provide specific use cases with clear titles and descriptions
Relevant Tags
Use descriptive tags to make your prompt discoverable
Test Thoroughly
Test prompts extensively before publishing to ensure quality
Troubleshooting
API Key Issues
Prompt Not Found
Authentication Errors
API Reference
AgentMarketplaceHandler.fetch
prompt_id: UUID of the prompt to fetch. Takes precedence overnamename: Name of the prompt (alternative to prompt_id). One of the two is required, orValueErroris raisedtimeout: Request timeout in secondsreturn_params_on: If True, returns (name, description, prompt) tuple; if False, returns full dict. ReturnsNonewhen the prompt does not exist (404)
AgentMarketplaceHandler.add_prompt
name: Unique name for the promptprompt: The prompt content/templatedescription: Description of what the prompt doesuse_cases: List of dicts with ‘title’ and ‘description’ keystags: Comma-separated tagsis_free: Whether the prompt is free or paidprice_usd: Price in USD (ignored whenis_freeis True)category: Category for organization (defaults to"research")timeout: Request timeout in seconds
Next Steps
Browse Marketplace
Explore available prompts on the marketplace
Get API Key
Get your API key to publish prompts
Model Providers
Configure LLM providers for your agents
Tools
Add custom tools to enhance agents