Agent Marketplace Design

Comprehensive guide to agent marketplace design covering architecture, implementation, testing, and operational patterns for production engineering teams.

Agents in a distributed AI system must discover, instantiate, and compose one another dynamically. The Agent Marketplace Design describes how a shared registry of reusable, composable, versioned agent components supports discovery, deployment, and interoperability across teams, services, and environments. This design matters when multiple teams develop autonomous agents that must be discoverable, configurable, and integrable with minimal boilerplate—especially in polyglot, multi-tenant, or microservices-based AI platforms.

Discovering and Installing Agents

Agents are published as self-contained units that describe their capabilities, inputs, outputs, and deployment metadata. A marketplace enables clients to search, filter, and install agents with known interfaces and behaviors.

To query the marketplace, clients send a GET request to /agents with query parameters:

GET /agents?query=invoice+processing&tag=finance&min_version=1.2.0 HTTP/1.1
Host: marketplace.example.com
Accept: application/json
Authorization: Bearer <token>

The response includes a list of agents with metadata:

{
  "agents": [
    {
      "id": "invoice-processor-v3",
      "name": "Invoice Processor",
      "description": "Extracts line items, vendor, and totals from PDF invoices.",
      "version": "3.1.0",
      "author": "[email protected]",
      "tags": ["finance", "document", "pdf"],
      "inputs": [
        {
          "name": "input_pdf",
          "type": "string",
          "description": "Path to the input PDF file."
        }
      ],
      "outputs": [
        {
          "name": "invoice_data",
          "type": "object",
          "schema": {
            "properties": {
              "vendor": { "type": "string" },
              "date": { "type": "string", "format": "date" },
              "line_items": {
                "type": "array",
                "items": {
                  "properties": {
                    "description": { "type": "string" },
                    "quantity": { "type": "number" },
                    "price": { "type": "number" }
                  }
                }
              }
            }
          }
        }
      ],
      "deployment": {
        "type": "docker",
        "image": "registry.example.com/finance/invoice-processor:3.1.0",
        "resources": {
          "cpu": "2000m",
          "memory": "4Gi"
        }
      },
      "created_at": "2024-01-15T10:30:00Z"
    }
  ],
  "total": 1,
  "page": 1,
  "size": 10
}

To install an agent, a client sends a POST to /agents/{id}/install with a configuration object:

POST /agents/invoice-processor-v3/install HTTP/1.1
Host: marketplace.example.com
Content-Type: application/json
Authorization: Bearer <token>

{
  "instance_id": "invoice-processor-01",
  "config": {
    "timeout_seconds": 300,
    "ocr_model": "tesseract-ocr-v2",
    "extract_vendor": true,
    "output_format": "json"
  },
  "environment": "production"
}

The server returns a 201 Created with a link to the deployed agent instance:

{
  "instance_id": "invoice-processor-01",
  "status": "deploying",
  "deployment_url": "https://agent.example.com/invoice-processor-01",
  "created_at": "2024-01-15T10:35:00Z"
}

Failure Modes in Discovery

Publishing an Agent

Publishing an agent requires submitting a manifest and a deployment artifact. The manifest is a manifest.json file at the root of a versioned package:

{
  "name": "User Profile Enricher",
  "version": "2.0.1",
  "description": "Augments user profiles with social, demographic, and behavioral data.",
  "author": "[email protected]",
  "tags": ["profile", "enrichment", "user"],
  "inputs": [
    {
      "name": "user_id",
      "type": "string",
      "description": "Unique identifier for the user."
    },
    {
      "name": "source_data",
      "type": "object",
      "schema": {
        "properties": {
          "social": { "type": "object" },
          "behavior": { "type": "object" }
        }
      }
    }
  ],
  "outputs": [
    {
      "name": "enriched_profile",
      "type": "object",
      "schema": {
        "properties": {
          "age": { "type": "number" },
          "location": { "type": "string" },
          "interests": { "type": "array", "items": { "type": "string" } },
          "engagement_score": { "type": "number" }
        }
      }
    }
  ],
  "deployment": {
    "type": "docker",
    "image": "registry.example.com/eng/user-profile-enricher:2.0.1",
    "entrypoint": [
      "/app/entrypoint.sh",
      "--config",
      "/config/config.yaml"
    ],
    "resources": {
      "cpu": "1500m",
      "memory": "3Gi"
    }
  },
  "lifecycle": {
    "on_install": "scripts/on-install.sh",
    "on_update": "scripts/on-update.sh",
    "on_remove": "scripts/on-remove.sh"
  }
}

The agent is published via PUT /agents/{name}/{version} with the manifest and the deployment artifact (e.g., a Docker image pushed to a registry):

PUT /agents/user-profile-enricher/2.0.1 HTTP/1.1
Host: marketplace.example.com
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW
Authorization: Bearer <token>

------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="manifest"

{ ... manifest.json ... }
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="artifact"; filename="user-profile-enricher.tar.gz"
Content-Type: application/gzip

[ binary tarball of Docker image, config files, scripts ]
------WebKitFormBoundary7MA4YWxkTrZu0gW--

Upon successful publication, the server responds with 201 Created and a Location header pointing to the agent's canonical URL.

Sharp Edges in Publishing

Managing Version and Compatibility

Agents evolve over time. The marketplace enforces semantic versioning and supports backward compatibility.

When a client installs an agent, it can request a specific version or accept the latest compatible one:

GET /agents/user-profile-enricher?preferred_version=2.0

The marketplace returns the best match based on:

If a client requests 2.0.1 and the marketplace has 2.0.1, 2.0.2, and 2.1.0, it returns the latest patch in the minor series: 2.0.2.

The marketplace also supports versioning strategies:

Clients can lock an agent instance to a version:

PATCH /agents/user-profile-enricher/2.0.1/lock HTTP/1.1
Host: marketplace.example.com
Content-Type: application/json
Authorization: Bearer <token>

{
  "version": "2.0.1",
  "reason": "Production stability required for user onboarding"
}

The marketplace returns 200 OK and updates the agent’s current_version and locked_version fields.

Versioning Pitfalls

Configuring and Customizing Agents

Each agent instance can be customized through a configuration object passed during installation or updated later.

Configuration is applied as a JSON object merged into the agent’s default configuration:

{
  "timeout_seconds": 300,
  "max_retries": 3,
  "cache_ttl": "1h",
  "data_sources": [
    { "name": "salesforce", "enabled": true },
    { "name": "stripe", "enabled": false }
  ],
  "features": {
    "enable_email_notifications": true,
    "send_summary_reports": true
  }
}

The agent reads the config at startup, and the marketplace validates the config against the agent’s schema:

{
  "type": "object",
  "properties": {
    "timeout_seconds": { "type": "integer", "minimum": 10 },
    "max_retries": { "type": "integer", "minimum": 1 },
    "cache_ttl": {
      "type": "string",
      "pattern": "^[0-9]+[hms]$"
    },
    "data_sources": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": { "type": "string" },
          "enabled": { "type": "boolean" }
        },
        "required": ["name"]
      }
    }
  },
  "required": ["timeout_seconds", "max_retries"]
}

If the config does not match the schema, the marketplace returns 400 Bad Request:

{
  "error": "invalid_config",
  "details": [
    {
      "field": "cache_ttl",
      "message": "Invalid duration format. Expected: 1h, 30m, 60s, etc."
    },
    {
      "field": "data_sources[0].name",
      "message": "Required property 'name' is missing"
    }
  ]
}

Configuration Gotchas

Lifecycle and Metadata Management

Each agent has a lifecycle tied to its metadata and deployments. The marketplace tracks:

Clients can retrieve an agent's full history:

GET /agents/user-profile-enricher/2.0.1/history HTTP/1.1
Host: marketplace.example.com
Authorization: Bearer <token>

Response:

{
  "agent_id": "user-profile-enricher",
  "current_version": "2.0.1",
  "deployments": [
    {
      "version": "2.0.1",
      "status": "deployed",
      "deployed_at": "2024-01-15T10:35:00Z",
      "deployed_by": "[email protected]",
      "changes": [
        { "type": "config", "key": "cache_ttl", "old": "30m", "new": "1h" },
        { "type": "feature", "name": "enable_email_notifications", "enabled": true }
      ],
      "metadata": {
        "image": "registry.example.com/eng/user-profile-enricher:2.0.1",
        "resources": { "cpu": "1500m", "memory": "3Gi" }
      }
    },
    {
      "version": "2.0.0",
      "status": "failed",
      "deployed_at": "2024-01-14T15:20:00Z",
      "error": "image_pull_failed",
      "error_details": "Image not found: registry.example.com/eng/user-profile-enricher:2.0.0"
    }
  ]
}

Metadata and Audit Events

The marketplace supports tagging agents with arbitrary labels:

POST /agents/user-profile-enricher/tags HTTP/1.1
Host: marketplace.example.com
Content-Type: application/json
Authorization: Bearer <token>

{
  "tags": ["high-priority", "onboarding", "beta"]
}

Tags can be used to filter agents, group them, or drive rollout strategies.

Metadata Failure Modes

Composability and Interoperability

The marketplace enables agents to be composed into workflows. Clients can discover agents that accept or produce specific data types and stitch them together.

A client queries for agents that produce enriched_profile and consume user_id:

GET /agents?output=enriched_profile&input=user_id&tag=profile

The response includes agents that can be chained. The client can then construct a workflow:

{
  "workflow": "user-onboarding",
  "steps": [
    {
      "agent_id": "user-profile-enricher",
      "version": "2.0.1",
      "inputs": {
        "user_id": "${event.user_id}"
      },
      "outputs": {
        "enriched_profile": "profile_data"
      }
    },
    {
      "agent_id": "send-welcome-email",
      "version": "1.0.0",
      "inputs": {
        "user": "${profile_data}"
      }
    }
  ]
}

The marketplace validates that the output of one agent matches the input of the next, and logs warnings when types do not align.

This page was rewritten on 13 October 2026. It replaced a templated version that was not specific to its own title. How these pages are written and checked. If anything here is wrong, tell us at [email protected] and we will correct it.