Publishing to Marketplace

chevron-rightRelevant source fileshashtag

Purpose and Scope: This document covers the process of publishing workspace items (agents, recipes, skills, LLMs) to the Community Marketplace, including submission workflows, approval processes, and trusted user auto-publish capabilities. For information on browsing and installing marketplace items, see Browsing & Installing Items. For backend database schema details, see Marketplace Backend. For complete API documentation, see Marketplace API Reference.


Publishing Overview

The marketplace publishing system allows users to share their workspace agents and recipes with the entire Automatos AI community. The system implements a dual-mode approval workflow:

User Type
Approval Mode
Visibility

Regular Users

Manual approval required

Pending state until admin approves

Trusted Users

Auto-publish enabled

Immediately visible in marketplace

Admin Users

Bypass all checks

Full marketplace management access

Publishable Item Types:

  • Agents: Custom agents with skills, tool assignments, and model configurations

  • Recipes: Multi-step workflows with execution configurations

  • Skills: Reusable code capabilities (planned)

  • LLMs: Custom model configurations (planned)

Key Design Principles:

  1. Non-destructive: Original workspace items remain unchanged; marketplace items are copies

  2. Versioned: Each submission creates a new version tracked by version field

  3. Traceable: original_creator_id and cloned_from_id maintain provenance

  4. Quality-gated: Manual approval ensures marketplace quality (except trusted users)

Sources: orchestrator/api/marketplace.py:1-30


Submission Process

Submission Workflow

spinner

Sources: orchestrator/api/marketplace.py:699-826


Submission API Endpoint

Endpoint: POST /api/marketplace/items/{item_id}/submit

Request Body:

Field Specifications:

Field
Type
Required
Description

item_type

string

Yes

One of: agent, recipe, skill, llm

name

string

No

Display name (defaults to workspace item name)

description

string

No

Marketing description (defaults to workspace description)

category

string

No

Marketplace category (e.g., "Marketing", "DevOps")

tags

string[]

No

Searchable tags for filtering

metadata

object

No

Additional metadata (difficulty, setup time, etc.)

Response:

Key Implementation Details:

  1. Workspace Validation: The endpoint verifies the item exists in the user's workspace with owner_type='workspace' and matching workspace_id.

  2. Duplicate Detection: Checks for existing marketplace submissions by the same user for the same item to prevent spam.

  3. Dependency Copying: For agents, the system automatically copies relationships:

    • Skill assignments (many-to-many via agent_skills table)

    • Tool assignments (via agent_tool_assignments table)

    • Plugin assignments (via agent_plugins table)

  4. Metadata Extraction: The submission extracts relevant configuration from the workspace item:

    • Model configuration (model_config JSONB field)

    • Agent configuration (configuration JSONB field)

    • Required tools and recommended agents (for recipes)

Sources: orchestrator/api/marketplace.py:699-826


Database Field Mapping

When an item is submitted to the marketplace, specific fields are set to distinguish it from workspace items:

Agent Submission Schema Transformation:

spinner

Critical Fields for Marketplace Items:

Field
Purpose
Value for Pending Items
Value After Approval

owner_type

Distinguishes marketplace from workspace items

'marketplace'

'marketplace'

is_approved

Gates visibility to non-admin users

false

true

is_featured

Admin-curated highlighting

false

Admin sets to true

original_creator_id

Tracks creator for attribution

User's DB ID

Unchanged

cloned_from_id

Links to source workspace item

Original agent ID

Unchanged

marketplace_category

Display category in marketplace UI

From submission

Can be updated

marketplace_icon

Icon override for marketplace display

From submission or default

Can be updated

version

Semantic versioning for updates

'1.0.0'

Incremented on resubmission

install_count

Usage tracking metric

0

Incremented on each install

Sources: orchestrator/api/marketplace.py:715-745, core/models/core.py:150-250


Approval Workflow

Admin Review Interface

Admins see pending items with visual indicators in the marketplace UI. The admin check is performed via email domain matching:

Admin Controls:

spinner

Frontend Implementation - Admin dropdown menu for pending items:

Pending Badge Display:

Sources: frontend/components/marketplace/marketplace-agents-tab.tsx:110-143, frontend/components/marketplace/marketplace-recipes-tab.tsx:44-79


Approval API Endpoint

Endpoint: POST /api/marketplace/items/{item_id}/approve

Authorization: Requires admin privileges via assert_admin() helper.

Request: No body required (item ID in path).

Response:

Backend Implementation:

Key Security Checks:

  1. Admin verification: assert_admin(ctx) checks ctx.user.system_role == 'admin'

  2. Owner type validation: Only items with owner_type='marketplace' can be approved

  3. Existence check: Returns 404 if item not found in marketplace tables

Sources: orchestrator/api/marketplace.py:828-859


Deletion/Rejection Endpoint

Endpoint: DELETE /api/marketplace/items/{item_id}

Authorization: Admin only.

Purpose: Remove inappropriate, duplicate, or low-quality submissions from the marketplace.

Implementation:

Important: Deletion only removes the marketplace copy. The original workspace item remains unchanged in the user's workspace, preserving their work.

Sources: orchestrator/api/marketplace.py:861-886


Trusted User Auto-Publish

The trusted user system allows pre-approved publishers to bypass manual review, enabling instant marketplace visibility for high-quality contributors.

Trust System Design

spinner

Trust Criteria (recommended implementation):

Metric
Threshold for Trust

Install count across items

> 100 cumulative installs

Approval success rate

> 95% approved without edits

Active publishing history

> 5 successfully published items

User feedback score

> 4.5/5.0 average rating

Time on platform

> 90 days active

Database Schema for Trust:

Submission Logic with Trust Check:

Trust Revocation: Admins can revoke trust status for users who publish low-quality content or violate guidelines. Revoked users return to manual review for all future submissions.

Sources: orchestrator/api/marketplace.py:699-826


Publishing Workflow: Complete Flow

spinner

State Definitions:

State
Database Condition
User Visibility
Admin Visibility

WorkspaceItem

owner_type='workspace'

Only owner

N/A

PendingReview

owner_type='marketplace' AND is_approved=false

Hidden

Visible with badge

AutoPublish

Trusted user submission → direct to marketplace

All users

All users

Marketplace

owner_type='marketplace' AND is_approved=true

All users

All users

Rejected

Item deleted from database

N/A

N/A

Sources: orchestrator/api/marketplace.py:699-886, frontend/components/marketplace/marketplace-agents-tab.tsx:110-143


Category and Tag System

Category Definitions

The marketplace uses a hierarchical category system for organizing items. Categories are stored in the marketplace_category field (nullable string).

Agent Categories (as defined in frontend constants):

Recipe Categories (future implementation):

  • Automation Workflows

  • Data Processing

  • Content Generation

  • Integration Pipelines

  • Monitoring & Alerts

Category Filtering in API:

Tag System

Tags are stored as a JSONB array in the tags field, enabling flexible multi-dimensional filtering.

Tag Best Practices:

  • Use lowercase for consistency

  • Limit to 3-7 tags per item

  • Include capability tags (e.g., "email", "slack", "data-analysis")

  • Include use-case tags (e.g., "automation", "reporting", "customer-support")

  • Include technology tags (e.g., "python", "javascript", "api")

Tag Filtering (client-side):

Sources: orchestrator/api/marketplace.py:160-161, frontend/lib/agent-constants.ts:25-42


Quality Guidelines for Publishers

To maintain marketplace quality and improve approval rates, publishers should follow these guidelines:

Agent Submission Checklist

Recipe Submission Checklist

Common Rejection Reasons

Reason
Description
How to Fix

Generic name

Names like "Test Agent" or "Agent 1"

Use descriptive names like "LinkedIn Content Scheduler"

Missing description

No description or single-word description

Write 2-3 sentences explaining purpose and use cases

Wrong category

Agent categorized as "General" when specialized

Select the most specific applicable category

Broken tools

Tools assigned but not configured/tested

Test all tool integrations before submission

Duplicate submission

Nearly identical to existing marketplace item

Add unique value or customize significantly

Incomplete configuration

Missing model config or critical settings

Complete all configuration fields

Sources: orchestrator/api/marketplace.py:699-826


Integration Points

Frontend Submission Flow

The marketplace does not currently have a dedicated "Submit to Marketplace" button in the main UI. Submissions are expected to be made via direct API calls or through admin interfaces (future enhancement).

Recommended UI Integration Locations:

  1. Agent Management Page: Add "Publish to Marketplace" button in agent card dropdown

  2. Recipe Management Page: Add "Publish to Marketplace" button in recipe actions

  3. Agent Details Modal: Include marketplace submission option in settings

  4. Bulk Actions: Allow selecting multiple agents/recipes for batch submission

Expected Frontend Component (not yet implemented):

Sources: frontend/components/marketplace/marketplace-agents-tab.tsx:1-368


Admin Dashboard Enhancements

Future enhancements for admin marketplace management:

Pending Items Dashboard

Recommended Features:

  • Dedicated /admin/marketplace/pending route

  • Table view with sortable columns (submission date, creator, type)

  • Batch approval/rejection actions

  • Filtering by category, type, and creator

  • Submission preview with full metadata display

  • Approval history and audit trail

Analytics and Insights

Key Metrics to Track:

  • Submission rate (items/week)

  • Approval rate (approved/submitted)

  • Average review time (submission → approval)

  • Top publishers (by install count)

  • Category distribution

  • Quality score trends

Sources: orchestrator/api/marketplace.py:828-886


Database Schema Summary

Key Tables and Fields for Publishing:

Critical Indexes:

Sources: orchestrator/api/marketplace.py:122-309, core/models/core.py:150-250


Last updated