HTTP-based skill providers for the Agent Skills format (https://agentskills.io)
Project description
agentskills-http
HTTP static-file skill provider for the Agent Skills SDK.
Serves Agent Skills from any static HTTP file host — S3, Azure Blob, CDN, GitHub Pages, Nginx, etc. Expects the same directory-tree layout as the filesystem provider, served over HTTP.
Installation
pip install agentskills-http
Requires Python 3.12+. Installs agentskills-core, httpx, and pyyaml as dependencies.
Expected URL Layout
https://cdn.example.com/skills/
├── incident-response/
│ ├── SKILL.md
│ ├── references/severity-levels.md
│ ├── scripts/page-oncall.sh
│ └── assets/flowchart.mermaid
└── another-skill/
└── SKILL.md
Usage
from agentskills_core import SkillRegistry
from agentskills_http import HTTPStaticFileSkillProvider
async with HTTPStaticFileSkillProvider("https://cdn.example.com/skills") as provider:
registry = SkillRegistry()
await registry.register("incident-response", provider)
skill = registry.get_skill("incident-response")
meta = await skill.get_metadata()
body = await skill.get_body()
Custom Headers
Pass authentication or other headers:
provider = HTTPStaticFileSkillProvider(
"https://cdn.example.com/skills",
headers={"Authorization": "Bearer <token>"},
)
Bring Your Own Client
Supply a pre-configured httpx.AsyncClient for full control over timeouts, proxies, etc.:
import httpx
client = httpx.AsyncClient(timeout=30, headers={"Authorization": "Bearer <token>"})
provider = HTTPStaticFileSkillProvider("https://cdn.example.com/skills", client=client)
# caller is responsible for closing the client
Note:
clientandheadersare mutually exclusive. Configure headers on the client directly when providing your own.
API
HTTPStaticFileSkillProvider(base_url, *, client=None, headers=None)
| Method | Returns | Description |
|---|---|---|
get_metadata(skill_id) |
dict[str, Any] |
Parsed YAML frontmatter from SKILL.md |
get_body(skill_id) |
str |
Markdown body after the frontmatter |
get_script(skill_id, name) |
bytes |
Raw script content |
get_asset(skill_id, name) |
bytes |
Raw asset content |
get_reference(skill_id, name) |
bytes |
Raw reference content |
aclose() |
None |
Close the HTTP client (if owned by the provider) |
Supports async with for automatic cleanup.
Error Handling
| Scenario | Exception |
|---|---|
404 on SKILL.md |
SkillNotFoundError |
| 404 on a resource | ResourceNotFoundError |
| Other HTTP errors (500, 403, ...) | AgentSkillsError |
| Connection failures | AgentSkillsError |
All exceptions inherit from AgentSkillsError.
License
MIT
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file agentskills_http-0.2.0.tar.gz.
File metadata
- Download URL: agentskills_http-0.2.0.tar.gz
- Upload date:
- Size: 4.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.3.1 CPython/3.13.9 Windows/11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
17966b532cddca9747ade4dbfb86adc74cfb0cdbcad034e10ef00764cebda052
|
|
| MD5 |
06f21abcec8ef8b474e77008449882a1
|
|
| BLAKE2b-256 |
0971ebfa70787e45d78cdb744dc3805bb3732f86cf9e30d5afc200187221f55e
|
File details
Details for the file agentskills_http-0.2.0-py3-none-any.whl.
File metadata
- Download URL: agentskills_http-0.2.0-py3-none-any.whl
- Upload date:
- Size: 5.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.3.1 CPython/3.13.9 Windows/11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
50b7e5d394567ab937b05abe51906c79931cd9c05e0947c8ff793f58aa33e0d2
|
|
| MD5 |
92c5762d3c643e5be635b134ce2bf346
|
|
| BLAKE2b-256 |
d4adf7556ac3740b240429fa22eabff8bb24ed533a1e9350e03eb045a3e33f0e
|