AI agents can't discover tools by capability
Decentralized tool discovery registry with capability-based search, trust verification, and automatic routing. No hardcoded service catalogs.
Hardcoded Tool Names, No Trust Levels, No Schema Validation
AI agents rely on hardcoded service catalogs to invoke external tools. Tool names are static strings, trust levels are undefined, and schema mismatches cause runtime failures.
Tool Registry with Capability Search, Trust Levels, Discovery
xRegistry provides a decentralized discovery system where agents register tool schemas with capabilities and trust levels. Other agents search by capability, filter by trust, and auto-discover compatible tools.
import { ToolRegistry } from '@private.me/xregistry'; const registry = new ToolRegistry(); // Register tool with schema, capabilities, trust level const result = await registry.register({ name: 'stripe:createCharge', description: 'Create a payment charge', schema: { type: 'object', properties: { amount: { type: 'number' }, currency: { type: 'string' } }, required: ['amount', 'currency'] }, trustLevel: 'verified', endpoint: 'https://api.stripe.com/v1/charges', capabilities: ['payment', 'charge', 'stripe'], owner: 'did:key:z6Mk...', version: '1.0.0' });
import { discover } from '@private.me/xregistry'; // Search for payment tools, filter by trust level const result = discover('payment', registry, { minTrustLevel: 'verified', limit: 5 }); if (result.primary) { console.log('Primary match:', result.primary.name); console.log('Endpoint:', result.primary.endpoint); console.log('Schema:', result.primary.schema); }
agent.call(), xRegistry enables automatic tool resolution. Agents can call tools by capability name, and xRegistry discovers compatible implementations, ranks by trust level, and routes invocations automatically.
Service Discovery & Registration
Capability-Based Discovery
Trust-Based Classification, Schema Validation, Auto-Discovery
Trust Levels
Three-tier trust classification guides agent decision-making:
| Trust Level | Verification | Use Case |
|---|---|---|
| verified | Cryptographically verified by registry authority | Production use, critical operations |
| community | Community-attested via peer review | General use, non-critical operations |
| experimental | Self-registered, no verification | Development, testing only |
Capability-Based Search
Tools register with capability tags describing what they do. Agents search by natural language capability queries, not hardcoded tool names.
// Find all payment processing tools const paymentTools = registry.search('payment processing'); // Filter by trust level const verified = registry.listByTrustLevel('verified'); // Get specific tool const stripe = registry.get('stripe:createCharge');
Schema Validation
Every tool registers with a JSON Schema describing inputs and outputs. Agents validate arguments at discovery time, preventing runtime type mismatches.
Automatic Routing
When integrated with xLink, registry enables zero-config tool resolution. Agents call by capability, registry discovers implementations, xLink routes invocations.
Register, Search, Discover
pnpm add @private.me/xregistry
import { ToolRegistry } from '@private.me/xregistry'; const registry = new ToolRegistry(); // Register a tool await registry.register({ name: 'json-transformer', description: 'Transform JSON data structures', schema: { type: 'object', properties: { data: { type: 'object' }, template: { type: 'object' } }, required: ['data', 'template'] }, trustLevel: 'community', endpoint: 'did:xail:transformer-service', capabilities: ['data-transform', 'json'], owner: 'did:key:z6Mk...', version: '1.0.0' }); // Search by capability const tools = registry.search('json transform'); console.log(`Found ${tools.length} tools`);
ToolRegistry Class & Discovery Functions
Registry Operations
Discovery Functions
Automatic Tool Discovery with agent.call()
Integrate xRegistry with xLink's agent communication layer for zero-config tool resolution.
import { setToolRegistry, call } from '@private.me/xlink'; import { ToolRegistry } from '@private.me/xregistry'; const registry = new ToolRegistry(); // Register tools await registry.register({ name: 'stripe:createCharge', capabilities: ['payment', 'charge'], trustLevel: 'verified', /* ... */ }); // Enable registry for agent.call() setToolRegistry(registry); // Now agent.call() auto-discovers tools const result = await call('payment', { amount: 100, currency: 'usd' });
Integration Benefits
- Zero-config resolution: No hardcoded endpoints
- Trust ranking: Verified tools preferred automatically
- Capability search: Find tools by what they do
- Graceful degradation: Falls back to original alias if discovery fails
- Alternative suggestions: Shows other options via progress callback
Free for All Developers
xRegistry is a free developer tool. No credit card required, no trial period, no subscription. Install and start discovering tools immediately.
pnpm add @private.me/xregistry
For custom deployments or enterprise support, contact contact@private.me.