Well-Known Provider
The Well-Known Provider discovers skills from websites that publish an RFC 8615/.well-known/agent-skills.json manifest. This enables decentralized skill discovery from any website.
createWellKnownProvider
Create a well-known endpoint skill provider.Type Signature
Parameters
List of domains to query (e.g.,
["example.com", "skills.mycompany.io"]).Optional configuration.
Returns
ASkillProvider backed by well-known endpoints.
Example Usage
Basic Usage
Multiple Domains
Custom Timeout and Cache
RFC 8615 Well-Known Endpoints
The provider follows RFC 8615 for well-known URIs. It fetches skill manifests from:Manifest Format
The manifest must be a JSON object with askills array:
Required Fields
skills(array): List of skill objects
Skill Object Fields
| Field | Type | Required | Description |
|---|---|---|---|
id | string | No | Unique identifier (falls back to name) |
name | string | Yes | Skill name |
description | string | No | What the skill does |
author | string | No | Skill author (falls back to domain) |
version | string | No | Skill version |
tags | string[] | No | Skill tags |
url | string | No | Skill source URL |
compatible_agents | string[] | No | Compatible agent names |
How It Works
Fetch and Cache Algorithm
- Check cache: Return cached manifest if within TTL
- Fetch manifest: Request
https://{domain}/.well-known/agent-skills.json - Validate structure: Ensure
skillsis an array - Cache result: Store in memory with timestamp
- Return skills: Convert to
SkillSearchResult[]
Search Algorithm
- Fetch from all domains: Query each domain’s manifest (with caching)
- Filter skills: Match query against name, description, tags
- Merge results: Combine results from all domains
- Truncate: Return up to
limitresults
Caching Strategy
- In-memory cache: No persistence between process restarts
- Per-domain: Each domain cached independently
- TTL-based: Cache expires after
cacheTtlseconds - Automatic refresh: Expired entries fetched on next request
Return Values
SkillSearchResult
Empty Results
The provider returns an empty array if:- No domains configured
- All domains fail to respond
- Manifests contain no matching skills
- Query matches no skills
Provider Methods
search(query, limit?)
Search for skills matching a query across all domains.query(string): Search keywords (matches name, description, tags)limit(number): Maximum results (default 10)
Promise<SkillSearchResult[]>
getSkillDetails(skillId)
Get detailed information about a specific skill.skillId(string): The skill identifier (matchesmanifest.idormanifest.name)
Promise<SkillSearchResult | null>
isAvailable()
Check if the provider is available.boolean (true if at least one domain configured)
Error Handling
The provider handles errors gracefully:- Network failures: Logs debug message, returns empty array
- Timeouts: Logs debug message, returns empty array
- Invalid JSON: Logs warning, returns empty array
- Invalid manifest: Logs warning, returns empty array
- Missing
skillsarray: Logs warning, returns empty array
Security Considerations
HTTPS Only
The provider only fetches from HTTPS endpoints. This ensures:- Encryption in transit
- Server authentication
- Protection against MITM attacks
No Code Execution
The provider only reads metadata manifests. It does not:- Execute code from remote sources
- Download SKILL.md files automatically
- Install skills without user confirmation
Request Timeout
All HTTP requests have a configurable timeout to prevent:- Hanging requests
- Resource exhaustion
- Denial of service
Performance Considerations
Caching Benefits
- Reduced latency: Cached manifests served instantly
- Reduced bandwidth: No repeated fetches within TTL
- Reduced load: Fewer requests to remote servers
Cache Tuning
Parallel Fetching
When searching multiple domains, fetches happen sequentially (not in parallel). For many domains, consider:- Reducing the domain list
- Increasing the timeout
- Implementing parallel fetching (custom provider)
Publishing Your Own Manifest
To make your skills discoverable:- Create manifest:
/.well-known/agent-skills.json - Serve over HTTPS: Required for security
- Set CORS headers: If accessed from browsers
- Follow manifest format: Include required fields
- Add to provider: Configure domain in consumers
Source Code Reference
Implementation:src/core/providers/wellknown-provider.ts:119-234
RFC 8615: Well-Known URIs