Skip to main content
The Swarms Marketplace is a platform for discovering and sharing production-ready prompts, agent configurations, and tools. Load prompts in a single line of code or publish your own creations to the community.

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:
Make sure to set the SWARMS_API_KEY environment variable before publishing. Get your API key at swarms.world/platform/api-keys
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 analysis
  • content - Content creation and writing
  • coding - Software development and programming
  • finance - Financial analysis and trading
  • healthcare - Medical and health applications
  • marketing - Marketing and advertising
  • education - Educational and training
  • legal - Legal analysis and documentation
  • customer-service - Customer support
  • data-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

Parameters:
  • prompt_id: UUID of the prompt to fetch. Takes precedence over name
  • name: Name of the prompt (alternative to prompt_id). One of the two is required, or ValueError is raised
  • timeout: Request timeout in seconds
  • return_params_on: If True, returns (name, description, prompt) tuple; if False, returns full dict. Returns None when the prompt does not exist (404)

AgentMarketplaceHandler.add_prompt

Parameters:
  • name: Unique name for the prompt
  • prompt: The prompt content/template
  • description: Description of what the prompt does
  • use_cases: List of dicts with ‘title’ and ‘description’ keys
  • tags: Comma-separated tags
  • is_free: Whether the prompt is free or paid
  • price_usd: Price in USD (ignored when is_free is 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