Skip to main content
Publish your agents directly to the Swarms Marketplace with minimal configuration. Share your specialized agents with the community and monetize your creations.

Overview


Step 1: Get Your API Key

Before publishing, you need a Swarms API key:
  1. Visit swarms.world/platform/api-keys
  2. Create an account or sign in
  3. Generate an API key
  4. Set the environment variable:
Or add to your .env file:

Step 2: Configure Your Agent

Create an agent with publishing configuration:

Step 3: Run to Publish

Simply run the agent to trigger publishing:

Complete Example

Here’s a complete working example:

Required Fields for Publishing

Use Case Format


Optional: Programmatic Publishing

You can also publish prompts/agents directly using the utility function:

Marketplace Categories


Best Practices

!!! tip “Publishing Best Practices”
  • Clear Descriptions: Write detailed, accurate agent descriptions
  • Multiple Use Cases: Provide 3-5 distinct use cases
  • Relevant Tags: Use specific, searchable keywords
  • Test First: Thoroughly test your agent before publishing
  • System Prompt Quality: Ensure your system prompt is well-crafted
!!! warning “Important Notes”
  • use_cases is required when publish_to_marketplace=True
  • Both tags and capabilities should be provided for discoverability
  • The agent must have a valid SWARMS_API_KEY set in the environment


Next Steps