The centralized catalog of all available agents, their capabilities, and current status—enabling dynamic discovery and orchestration.
The Agent Registry is a service that maintains a live catalog of all agents in your system. Coordinators query the registry to find agents capable of handling specific tasks, and the system uses it for health monitoring.
┌─────────────────────────────────────────────────────────────┐ │ AGENT REGISTRY │ ├─────────────────────────────────────────────────────────────┤ │ │ │ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │ │ │ Pricing │ │ Comms │ │ Availability│ │ │ │ Agent │ │ Agent │ │ Agent │ │ │ │ ─────── │ │ ─────── │ │ ─────── │ │ │ │ Status: ✓ │ │ Status: ✓ │ │ Status: ✓ │ │ │ │ Load: 3/10 │ │ Load: 7/10 │ │ Load: 1/10 │ │ │ │ Caps: 4 │ │ Caps: 3 │ │ Caps: 2 │ │ │ └─────────────┘ └─────────────┘ └─────────────┘ │ │ │ │ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │ │ │ Market │ │ Content │ │ Support │ │ │ │ Analyst │ │ Writer │ │ Agent │ │ │ │ ─────── │ │ ─────── │ │ ─────── │ │ │ │ Status: ✓ │ │ Status: ⚠ │ │ Status: ✓ │ │ │ │ Load: 5/10 │ │ Load: 9/10 │ │ Load: 2/10 │ │ │ │ Caps: 5 │ │ Caps: 4 │ │ Caps: 3 │ │ │ └─────────────┘ └─────────────┘ └─────────────┘ │ │ │ └─────────────────────────────────────────────────────────────┘
// Using the consolidated agent system
const system = agentSystem
// Register a new agent
await system.registerAgent({
id: "pricing-specialist-001",
name: "Pricing Specialist",
type: "specialist",
// What this agent can do
capabilities: [
"pricing_optimization",
"competitor_analysis",
"discount_calculation",
"revenue_forecasting",
"demand_prediction"
],
// Operational limits
constraints: {
maxConcurrentTasks: 10,
maxTokensPerRequest: 4000,
timeoutMs: 30000,
cooldownMs: 1000
},
// Model configuration
model: {
provider: "openai",
model: "gpt-4o",
temperature: 0.3
},
// Metadata
metadata: {
version: "2.1.0",
owner: "pricing-team",
tags: ["pricing", "revenue", "optimization"]
}
})// Find agents by capability
const pricingAgents = await agentSystem.findAgentsByCapability("pricing_optimization")
// Returns: [{ id: "pricing-specialist-001", ... }]
// Find agents by multiple capabilities (AND)
const experts = await agentSystem.findAgentsByCapabilities([
"pricing_optimization",
"competitor_analysis"
], { matchAll: true })
// Find agents by type
const specialists = await agentSystem.findAgentsByType("specialist")
// Find agents by tag
const revenueAgents = await agentSystem.findAgentsByTag("revenue")
// Complex query with filters
const agents = await agentSystem.queryAgents({
capabilities: ["content_generation"],
type: "specialist",
status: "healthy",
maxLoad: 0.7, // Under 70% capacity
tags: ["marketing"]
})// Get agent status
const status = await agentSystem.getAgentStatus("pricing-specialist-001")
// {
// status: "healthy",
// currentLoad: 3,
// maxLoad: 10,
// loadPercentage: 0.3,
// lastHeartbeat: "2024-01-15T10:30:00Z",
// metrics: {
// tasksCompleted: 1250,
// avgResponseTime: 2100,
// successRate: 0.98
// }
// }
// Get all agent statuses
const allStatuses = await agentSystem.getAllAgentStatuses()
// Subscribe to health changes
agentSystem.onAgentHealthChange((agentId, oldStatus, newStatus) => {
if (newStatus === "unhealthy") {
alertOps(`Agent ${agentId} is unhealthy`)
}
})// Update agent configuration
await agentSystem.updateAgent("pricing-specialist-001", {
constraints: {
maxConcurrentTasks: 15 // Increased capacity
},
metadata: {
version: "2.2.0"
}
})
// Add capabilities
await agentSystem.addCapabilitiesToAgent("pricing-specialist-001", [
"bundle_pricing",
"promotional_offers"
])
// Remove capabilities
await agentSystem.removeCapabilitiesFromAgent("pricing-specialist-001", [
"legacy_pricing"
])
// Temporarily disable agent
await agentSystem.setAgentStatus("pricing-specialist-001", "maintenance")// Graceful deregistration (waits for active tasks)
await agentSystem.deregisterAgent("pricing-specialist-001", {
graceful: true,
timeout: 60000 // Wait up to 60s for tasks to complete
})
// Force deregistration (immediate)
await agentSystem.deregisterAgent("pricing-specialist-001", {
graceful: false,
reassignTasks: true // Reassign active tasks to other agents
})interface RegisteredAgent {
// Identification
id: string // Unique agent ID
name: string // Human-readable name
type: AgentType // "coordinator" | "specialist" | "scheduled"
// Capabilities
capabilities: string[] // What this agent can do
primaryCapability?: string // Main expertise area
// Constraints
constraints: {
maxConcurrentTasks: number // Max parallel tasks
maxTokensPerRequest: number // Token limit per request
timeoutMs: number // Max execution time
cooldownMs: number // Min time between tasks
maxDailyTasks?: number // Daily rate limit
}
// Model Configuration
model: {
provider: string // "openai" | "anthropic" | etc.
model: string // Model identifier
temperature: number // 0-1 creativity scale
systemPrompt?: string // Base instructions
}
// Runtime Status
status: AgentStatus // "healthy" | "degraded" | "unhealthy" | "maintenance"
currentLoad: number // Active tasks
metrics: AgentMetrics // Performance data
lastHeartbeat: Date // Last health check
// Metadata
metadata: {
version: string // Agent version
owner: string // Team/person responsible
tags: string[] // Categorization tags
description?: string // What this agent does
createdAt: Date
updatedAt: Date
}
}Use standardized capability names for better agent discovery and matching:
content_generationemail_draftingresponse_personalizationtranslationtone_adjustmentmarket_analysiscompetitor_analysissentiment_analysisdata_extractiontrend_detectionpricing_optimizationavailability_checkbooking_managementschedule_optimizationresource_allocationapi_integrationdata_syncwebhook_handlingcalendar_syncpayment_processingFollow the taxonomy to ensure agents can be discovered consistently
Base limits on actual performance testing, not guesses
Set up alerts for agents going unhealthy or high load
Track changes over time and enable rollbacks
Group related agents for easier management and discovery