Skip to main content

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: client and headers are 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

agentskills_http-0.1.0.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

agentskills_http-0.1.0-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

Details for the file agentskills_http-0.1.0.tar.gz.

File metadata

  • Download URL: agentskills_http-0.1.0.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.1 CPython/3.13.9 Windows/11

File hashes

Hashes for agentskills_http-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6298a5755c784a4fca862edf6e59b968a9ab503163b78e56f53156ca64f989ae
MD5 12a8096e5495ec0032594455179ba96b
BLAKE2b-256 baca0b1daf5e1f534dde8981d01190a1b52e816edb311e1f47c72db579465bc4

See more details on using hashes here.

File details

Details for the file agentskills_http-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: agentskills_http-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.1 CPython/3.13.9 Windows/11

File hashes

Hashes for agentskills_http-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2ebcf7b79241406a9262079eb9224e76fb5692b06f9c2c137c630c42f7c526ef
MD5 755921aa2e92c4d993e87713bc37d148
BLAKE2b-256 7284eaffac79aeced1fdf48d006d72908d91facba4d8f62efe85203b18de438c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page