Agent Registry & Metadata
This document describes the agent registry system, metadata schema, discovery mechanisms, and versioning strategy for agents in the Meta Agent Platform.
Overview
The Agent Registry is a central component that manages agent definitions, metadata, versioning, and discovery. It enables users to register, search, and manage agents, ensuring interoperability and reusability across workflows.
Registry Architecture
The registry architecture consists of several key components:
- Metadata Store: Stores agent definitions and metadata
- Version Control: Manages agent versioning and history
- Search Index: Enables efficient discovery of agents
- Access Control: Enforces visibility and permissions
- Quality Assurance: Validates and certifies agents
Agent Registry Architecture (Mermaid)
graph TD
A[Developer] -->|Register Agent| B(Registry API)
B --> C[Metadata Validator]
C -->|Valid| D[Version Manager]
C -->|Invalid| E[Error Returned]
D --> F[Metadata Store]
F --> G[Search Index]
F --> H[Version Control]
F --> I[Access Control]
F --> J[Quality Assurance]
G -->|Discover| K[User]
H -->|History| K
I -->|Permissions| K
J -->|Certified Agents| K
Agent Registration
Agents are registered with detailed metadata, including:
- Name & Description: Human-readable identification and summary.
- Type: Execution type (docker, api, a2a, llm, vision, audio, sensor, workflow).
- Configuration: JSON schema describing agent configuration.
- Version: Semantic versioning for agent evolution.
- Owner & Visibility: Ownership and access control (private, workspace, tenant, public).
- Tags & Categories: For search and discovery.
- Documentation & License: Usage instructions and licensing.
- Repository URL: Source code reference.
- Input/Output Schema: JSON Schema for agent I/O.
- Modalities: Supported data types (text, image, audio, etc.).
A2A Agent Card Compatibility Fields:
- A2A Endpoint URL (
url): Base URL endpoint for the agent's A2A service. - Provider: Structured organization/provider details (name, contact, url).
- Capabilities: Features supported (e.g., streaming, push notifications, state transition history).
- Authentication: Auth schemes/credentials required to access the agent.
- Default Input Modes: Default supported input types (e.g., "text", "file").
- Default Output Modes: Default supported output types.
- Skills: List of specific capabilities, each with id, name, description, tags, examples, inputModes, outputModes.
Registration Process
sequenceDiagram
participant Developer
participant RegistryAPI
participant MetadataValidator
participant VersionManager
participant MetadataStore
Developer->>RegistryAPI: Submit agent metadata
RegistryAPI->>MetadataValidator: Validate metadata
MetadataValidator-->>RegistryAPI: Validation results
alt Validation Failed
RegistryAPI-->>Developer: Return validation errors
else Validation Passed
RegistryAPI->>VersionManager: Check version conflicts
VersionManager-->>RegistryAPI: Version check results
RegistryAPI->>MetadataStore: Store agent metadata
MetadataStore-->>RegistryAPI: Confirmation
RegistryAPI-->>Developer: Registration successful
end
Example Agent Metadata
{
"name": "image-classifier",
"display_name": "Image Classifier",
"version": "1.2.0",
"description": "Classifies images into categories using a pre-trained neural network",
"type": "docker",
"container": {
"image": "registry.example.com/agents/image-classifier:1.2.0",
"tag": "1.2.0"
},
"author": {
"name": "AI Platform Team",
"email": "ai-platform@example.com",
"url": "https://github.com/example/image-classifier"
},
"license": "MIT",
"tags": ["vision", "classification", "neural-network", "image-processing"],
"categories": ["Computer Vision", "Machine Learning"],
"visibility": "public",
"input_schema": {
"type": "object",
"required": ["image"],
"properties": {
"image": {
"type": "string",
"format": "binary",
"description": "Image to classify (JPEG or PNG)"
},
"top_k": {
"type": "integer",
"description": "Number of top categories to return",
"default": 5,
"minimum": 1,
"maximum": 20
},
"threshold": {
"type": "number",
"description": "Confidence threshold for returned categories",
"default": 0.2,
"minimum": 0.0,
"maximum": 1.0
}
}
},
"output_schema": {
"type": "object",
"properties": {
"categories": {
"type": "array",
"items": {
"type": "object",
"properties": {
"label": {
"type": "string",
"description": "Category label"
},
"confidence": {
"type": "number",
"description": "Confidence score between 0 and 1"
}
}
}
},
"processing_time": {
"type": "number",
"description": "Processing time in milliseconds"
}
}
},
"modalities": ["image"],
"resources": {
"memory": "1Gi",
"cpu": "0.5",
"gpu": "0.0"
},
"documentation_url": "https://docs.example.com/agents/image-classifier",
"repository_url": "https://github.com/example/image-classifier",
"url": "https://agents.example.com/image-classifier/a2a", // NEW: A2A endpoint
"provider": { // NEW: Structured provider info
"name": "AI Platform Team",
"contact": "ai-platform@example.com",
"url": "https://github.com/example/image-classifier"
},
"capabilities": { // NEW: Capabilities block
"streaming": true,
"pushNotifications": false,
"stateTransitionHistory": true
},
"authentication": { // NEW: Authentication block
"type": "apiKey",
"description": "API key required in Authorization header"
},
"default_input_modes": ["image"], // NEW: Default input modes
"default_output_modes": ["categories"], // NEW: Default output modes
"skills": [ // NEW: Skills block
{
"id": "classify-image",
"name": "Classify Image",
"description": "Classifies an input image and returns the top categories.",
"tags": ["vision", "classification"],
"examples": ["Classify a photo of a cat"],
"inputModes": ["image"],
"outputModes": ["categories"]
}
],
"changelog": [
{
"version": "1.2.0",
"date": "2025-03-15",
"changes": ["Added support for PNG images", "Improved classification accuracy", "Reduced memory usage"]
},
{
"version": "1.1.0",
"date": "2025-02-01",
"changes": ["Added top_k parameter", "Added threshold parameter"]
},
{
"version": "1.0.0",
"date": "2025-01-10",
"changes": ["Initial release"]
}
],
"quality": {
"test_coverage": 0.87,
"security_scan": "passed",
"certification": "verified"
}
}
Registration API
# Example of registering an agent using the Python SDK
from meta_agent_platform import AgentRegistry
# Initialize the registry client
registry = AgentRegistry(api_key="your-api-key")
# Load metadata from file
with open("agent-metadata.json", "r") as f:
metadata = json.load(f)
# Register the agent
try:
agent_id = registry.register_agent(metadata)
print(f"Agent registered successfully with ID: {agent_id}")
except ValidationError as e:
print(f"Validation error: {e}")
except VersionConflictError as e:
print(f"Version conflict: {e}")
Discovery & Search
The registry supports:
- Full-text search on agent name, description, tags.
- Filtering by type, modality, owner, visibility, version, and categories.
- Version management to select specific agent versions.
- Quality metrics and certification badges for trusted agents.
Search API
# Example of searching for agents using the Python SDK
from meta_agent_platform import AgentRegistry
# Initialize the registry client
registry = AgentRegistry(api_key="your-api-key")
# Search for image classification agents
results = registry.search_agents(
query="image classification",
filters={
"type": "docker",
"modalities": ["image"],
"visibility": ["public", "workspace"],
"tags": ["classification"],
"min_quality": 0.8
},
sort_by="relevance",
limit=10
)
print(f"Found {len(results)} agents:")
for agent in results:
print(f"- {agent.display_name} (v{agent.version}): {agent.description}")
GraphQL API
The registry also provides a GraphQL API for more complex queries:
query FindImageClassifiers {
agents(
filter: {
type: "docker",
modalities: ["image"],
tags_include: ["classification"],
visibility_in: [PUBLIC, WORKSPACE]
},
sort: { field: QUALITY, direction: DESC },
first: 10
) {
edges {
node {
id
name
displayName
version
description
author {
name
url
}
quality {
testCoverage
securityScan
certification
}
inputSchema
outputSchema
modalities
tags
}
}
pageInfo {
hasNextPage
endCursor
}
}
}
Versioning
- Semantic Versioning: Agents use MAJOR.MINOR.PATCH versioning.
- Version History: All versions are tracked; users can select or roll back.
- Deprecation: Deprecated versions are marked but remain accessible for reproducibility.
Version Management
flowchart TD
A[Agent v1.0.0] --> B[Agent v1.1.0]
B --> C[Agent v1.2.0]
C --> D[Agent v2.0.0]
B -.-> B1[Patch v1.1.1]
B1 -.-> B2[Patch v1.1.2]
C -.-> C1[Patch v1.2.1]
classDef current fill:#9f9,stroke:#484
classDef deprecated fill:#faa,stroke:#a44
classDef stable fill:#adf,stroke:#48a
class A deprecated
class B,B1,B2 deprecated
class C,C1 stable
class D current
Version Selection
# Example of selecting a specific agent version
from meta_agent_platform import AgentRegistry
# Initialize the registry client
registry = AgentRegistry(api_key="your-api-key")
# Get the latest version
latest_agent = registry.get_agent("image-classifier")
# Get a specific version
specific_version = registry.get_agent("image-classifier", version="1.1.0")
# Get the latest patch of a minor version
minor_version = registry.get_agent("image-classifier", version="1.1")
# Get the latest minor of a major version
major_version = registry.get_agent("image-classifier", version="1")
Access Control
- Visibility Levels: Private, workspace, tenant, public.
- Role-based Permissions: Only authorized users can register, update, or delete agents.
Visibility Levels
| Level | Description | Access |
|---|---|---|
| Private | Only accessible to the creator | Limited to the creator |
| Workspace | Accessible within a workspace | All members of the workspace |
| Tenant | Accessible within an organization | All members of the organization |
| Public | Accessible to everyone | Anyone with platform access |
Permission Matrix
| Action | Creator | Workspace Admin | Workspace Member | Tenant Admin | Platform Admin |
|---|---|---|---|---|---|
| View | ✅ | ✅ | ✅ | ✅ | ✅ |
| Use | ✅ | ✅ | ✅ | ✅ | ✅ |
| Edit | ✅ | ✅ | ❌ | ❌ | ✅ |
| Delete | ✅ | ✅ | ❌ | ❌ | ✅ |
| Change Visibility | ✅ | ✅ | ❌ | ✅ | ✅ |
| Certify | ❌ | ❌ | ❌ | ❌ | ✅ |
Quality Assurance
- Automated Testing: Agents must pass tests before publication.
- Certification: High-quality agents receive badges after review.
Quality Metrics
flowchart LR
A[Agent Submission] --> B{Automated Tests}
B -->|Pass| C{Security Scan}
C -->|Pass| D{Performance Test}
D -->|Pass| E{Manual Review}
E -->|Approved| F[Certified Agent]
B -->|Fail| G[Test Failures]
C -->|Fail| H[Security Issues]
D -->|Fail| I[Performance Issues]
E -->|Rejected| J[Review Feedback]
G --> A
H --> A
I --> A
J --> A
Certification Badges
| Badge | Requirements | Benefits |
|---|---|---|
| Verified | Passes automated tests | Basic verification |
| Secure | Passes security scan | Featured in security-sensitive contexts |
| Optimized | Passes performance tests | Featured for performance-sensitive use cases |
| Certified | Passes manual review | Featured in marketplace, higher visibility |
| Enterprise-Ready | Meets enterprise requirements | Featured for enterprise customers |
Integration with Workflows
# Example of using an agent from the registry in a workflow
from meta_agent_platform import AgentRegistry, Workflow
# Initialize the registry client
registry = AgentRegistry(api_key="your-api-key")
# Get agents for the workflow
image_classifier = registry.get_agent("image-classifier")
text_generator = registry.get_agent("text-generator")
# Create a workflow
workflow = Workflow("image-description-workflow")
# Add agents to the workflow
workflow.add_agent("classifier", image_classifier)
workflow.add_agent("generator", text_generator)
# Connect agents
workflow.connect(
source="classifier.output.categories",
target="generator.input.context"
)
# Set workflow input mapping
workflow.set_input_mapping({
"image": "classifier.input.image"
})
# Set workflow output mapping
workflow.set_output_mapping({
"description": "generator.output.text",
"categories": "classifier.output.categories"
})
# Save the workflow
workflow_id = workflow.save()
print(f"Workflow created with ID: {workflow_id}")
Troubleshooting
| Issue | Possible Cause | Solution |
|---|---|---|
| Agent not found | Incorrect name or version | Verify agent name and version, check visibility settings |
| Version conflict | Version already exists | Use a different version number or update existing version |
| Validation error | Invalid metadata | Check error message and fix metadata issues |
| Access denied | Insufficient permissions | Request access or change visibility settings |
| Registration failed | Missing required fields | Ensure all required metadata fields are provided |
References
- Component Design: Agent Registry & Marketplace Service
- Data Model: Agents
- Marketplace Development Guide
- Development Guide
- Execution & Runtimes
Last updated: 2025-04-18