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.
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"
}
min_version=1.2.0 but the marketplace returns an agent with version=1.1.9, the client must resolve a 426 Upgrade Required error and fetch the latest compatible version.inputs or outputs are missing type or schema, downstream systems may fail to bind inputs to the agent’s execution graph.environment is not in the config object during install, the marketplace defaults to development, but the client may expect staging. This leads to subtle configuration drift.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.
deployment.image: If deployment.image is not a valid Docker image URI, the marketplace fails to resolve the image during installation, returning a 400 Bad Request with "error": "invalid_image_uri".inputs: If a client sends {"user_id": 123} but the agent expects {"user_id": "123"}, the marketplace logs a warning in the agent’s audit log: "Input 'user_id' type mismatch: expected string, got number".scripts/on-install.sh is not executable (+x), the marketplace skips the script and logs "script not executable: /scripts/on-install.sh".2.0.1 and 2.0.1.0 as distinct versions. Clients must be explicit in versioning—2.0 is not the same as 2.0.0.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:
2.0 accepts any 2.x agent.2.0.1 can use 2.0.2, 2.1.0, or 2.2.0.2.0.1 can be used in place of 2.0.0, but not vice versa.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:
stable tag.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.
2.0.2) adds a new output field engagement_trend, but the client expects engagement_score only. The client must handle optional fields or add fallback logic.2.0.1 expects inputs to be a map[string]interface{}. A 2.1.0 agent changes the inputs schema to use array of objects, causing a runtime error in the client.stable tag: When a new version is published, the marketplace does not automatically tag it stable. Clients must manually add the stable tag to promote a version.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"
}
]
}
cache_ttl in 1h, 30m, 60s, but clients often send PT1H, P1D, or ISO 8601 durations. The marketplace converts these but logs a warning when the format is not standard.timeout_seconds is null or missing, the agent starts with a default value, but the marketplace logs "config missing required field: timeout_seconds".debug_level or preview_mode, which the agent handles but the marketplace does not validate.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"
}
]
}
agent_publishedagent_deployedagent_config_updatedagent_version_lockedagent_deployment_failedtimestamp, actor, agent_id, version, details, and metadata.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.
2.0.2 does not inherit the tags unless explicitly updated.deployment.resources.memory as a string ("4Gi") may later change to a number (4096)—the client must handle both formats.agent_version_promoted) is added, but the client expects agent_version_updated, the client may miss critical lifecycle events.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.
We use cookies for analytics (Google Analytics) and advertising (Google AdSense) to improve your experience and support free content. Privacy Policy