registry
Module: vibex/registry
Agent Market - Template system for agent discovery and instantiation
The Agent Market provides access to pre-configured agent templates from vibex/defaults/agents/ directory. Users can browse, preview, and instantiate these templates into their space.
Classes
AgentMarket
View sourceAgentMarket - Manages the agent template marketplace
Methods:
getCategories
View sourceGet agent categories from hub configuration
function getCategories(): Promise<MarketCategory[]>getAllTemplates
View sourceGet all available agent templates from .vibex/defaults/agents/ and custom agents from config
function getAllTemplates(): Promise<AgentTemplate[]>getTemplatesByCategory
View sourceGet templates by category
function getTemplatesByCategory(categoryId: string): Promise<AgentTemplate[]>Parameters:
| Name | Type | Description |
|---|---|---|
categoryId | string |
searchTemplates
View sourceSearch templates by keyword
function searchTemplates(keyword: string): Promise<AgentTemplate[]>Parameters:
| Name | Type | Description |
|---|---|---|
keyword | string |
getTemplate
View sourceGet a specific template by ID
function getTemplate(templateId: string): Promise<AgentTemplate | null>Parameters:
| Name | Type | Description |
|---|---|---|
templateId | string |
instantiateTemplate
View sourceInstantiate a template into a space agent
function instantiateTemplate(templateId: string, customization?: Record<string, any>): Promise<AgentConfig>Parameters:
| Name | Type | Description |
|---|---|---|
templateId | string | - ID of the template to instantiate |
customization | Record<string, any> (optional) | - Custom values for template variables |
Returns: AgentConfig ready to be used
saveAgentInstance
View sourceSave an agent instance to user’s config This creates an instance from a template
function saveAgentInstance(agentConfig: AgentConfig): Promise<void>Parameters:
| Name | Type | Description |
|---|---|---|
agentConfig | AgentConfig |
getTemplateStats
View sourceGet template statistics (for future use)
function getTemplateStats(_templateId: string): Promise<{
downloads: number;
rating: number;
reviews: number;
}>Parameters:
| Name | Type | Description |
|---|---|---|
_templateId | string |
isTemplateInstalled
View sourceCheck if a template is installed in user’s config
function isTemplateInstalled(templateId: string): Promise<boolean>Parameters:
| Name | Type | Description |
|---|---|---|
templateId | string |
getFeaturedTemplates
View sourceGet featured templates (for homepage/dashboard)
function getFeaturedTemplates(limit: number = 6): Promise<AgentTemplate[]>Parameters:
| Name | Type | Description |
|---|---|---|
limit | number | (default: 6) |
Interfaces
AgentTemplate
View sourceAgent template metadata - extends AgentConfig with market-specific fields
Properties:
| Name | Type | Description |
|---|---|---|
category | string | (optional) |
tags | string[] | (optional) |
author | string | (optional) |
version | string | (optional) |
icon | string | (optional) |
usageExamples | string[] | (optional) |
requirements | string[] | (optional) |
variables | object | (optional) |
downloads | number | (optional) |
rating | number | (optional) |
protected | boolean | (optional) |
isCustom | boolean | (optional) |
createdAt | string | (optional) |
updatedAt | string | (optional) |
MarketCategory
View sourceMarket category definition (from hub/categories.yaml)
Properties:
| Name | Type | Description |
|---|---|---|
id | string | |
name | string | |
description | string | (optional) |
icon | string | (optional) |
order | number | (optional) |