agentskills-agentframework
Microsoft Agent Framework integration for the Agent Skills SDK - turn a skill registry into Agent Framework tools.
Generates a set of Microsoft Agent Framework FunctionTool instances from a SkillRegistry, ready to be passed to any Agent Framework agent.
Installation
pip install agentskills-agentframework
Requires Python 3.12 or newer. Installs agentskills-core and agent-framework as dependencies.
Note:
agent-frameworkis currently a pre-release dependency (>=1.0.0rc3). The constraint will be updated once a stable release is published.
Usage
Context Provider (recommended)
The simplest way to integrate is via AgentSkillsContextProvider. It plugs into the Agent Framework lifecycle and automatically injects the skill catalog and tools on every agent.run() call — no manual system-prompt assembly required.
from pathlib import Path
from agent_framework import Agent
from agentskills_core import SkillRegistry
from agentskills_fs import LocalFileSystemSkillProvider
from agentskills_agentframework import AgentSkillsContextProvider
# Set up registry
provider = LocalFileSystemSkillProvider(Path("./skills"))
registry = SkillRegistry()
await registry.register("incident-response", provider)
# Create context provider
skills_context_provider = AgentSkillsContextProvider(registry)
# Pass it to the agent — catalog + tools are injected automatically
agent = Agent(
client=client, # any Agent Framework chat client
name="SREAssistant",
instructions="You are an SRE assistant.",
context_providers=[skills_context_provider],
)
response = await agent.run("What severity is a full DB outage?")
See examples/agent-framework/ for full working demos including client setup.
| Parameter | Default | Description |
|---|---|---|
skills_instruction_prompt |
Built-in template | Custom prompt template. Must contain {skills_catalog} and {tools_usage_instructions} placeholders. |
skills_catalog_format |
"xml" |
Skills catalog format — "xml" or "markdown". |
source_id |
"agentskills" |
Unique identifier for this provider instance. |
Manual Tools
For full control over system-prompt construction, use get_tools() directly:
from pathlib import Path
from agent_framework import Agent
from agentskills_core import SkillRegistry
from agentskills_fs import LocalFileSystemSkillProvider
from agentskills_agentframework import get_tools, get_tools_usage_instructions
# Set up registry
provider = LocalFileSystemSkillProvider(Path("./skills"))
registry = SkillRegistry()
await registry.register("incident-response", provider)
# Build tools + system prompt
tools = get_tools(registry)
catalog = await registry.get_skills_catalog(format="xml")
instructions = get_tools_usage_instructions()
# Pass to agent
agent = Agent(
client=client, # any Agent Framework chat client
name="SREAssistant",
instructions=f"{catalog}\n\n{instructions}",
tools=tools,
)
The catalog tells the agent what skills exist; the usage instructions tell it how to use the tools.
See examples/agent-framework/ for full working demos including client setup.
Generated Tools
| Tool | Parameters | Description |
|---|---|---|
get_skill_metadata |
skill_id |
Get structured metadata (name, description, etc.) |
get_skill_body |
skill_id |
Load the full markdown instructions |
list_skill_resources |
skill_id |
List bundled references, scripts and assets |
get_skill_reference |
skill_id, name |
Read a reference document |
get_skill_script |
skill_id, name |
Read a script |
get_skill_asset |
skill_id, name |
Read an asset |
All tools are async-compatible (FunctionTool with @tool decorator).
list_skill_resources returns a JSON object keyed by resource kind. Not every backend can enumerate resources — a plain static HTTP host cannot. Rather than surfacing an exception, the tool returns {"supported": false, "note": "..."} in that case: "this cannot be listed" is something the model can act on by falling back to the names in the skill body, not an error worth retrying.
API
AgentSkillsContextProvider(registry, *, skills_instruction_prompt=None, skills_catalog_format="xml", source_id=None)
A ContextProvider that injects skill catalog + tools into the agent session automatically via before_run(). Skips injection when the registry has no skills.
get_tools(registry: SkillRegistry, *, max_inline_binary_bytes: int = 65536) -> list[FunctionTool]
Returns a list of Agent Framework function tools bound to the given registry.
get_tools_usage_instructions() -> str
Returns a markdown string explaining the progressive-disclosure workflow - read metadata, then body, then fetch resources on demand. Designed for system-prompt injection alongside the skill catalog.
Comparison with Agent Framework's built-in provider
Agent Framework ships its own FileAgentSkillsProvider. Both plug into the same lifecycle, but they solve different problems:
FileAgentSkillsProvider (built-in) |
AgentSkillsContextProvider (this package) |
|
|---|---|---|
| Backends | Filesystem only | Any SkillProvider - filesystem, HTTP, custom |
| Tool surface | 2 generic tools (load_skill, read_skill_resource) |
5 typed tools (metadata, body, reference, script, asset) |
| Resource semantics | Flat - all resources accessed by path | Typed - the agent knows the category of what it is reading |
| Discovery / parsing | Built into the framework | Delegated to agentskills-core |
| Composability | Single provider | Mix multiple providers in one registry |
| Setup | Point at a folder | Register skills explicitly |
If all you need is skills in a local folder, the built-in provider is already installed and is the simpler choice. Reach for this package when skills come from somewhere other than disk, when you need several sources in one catalog, or when you want the agent to distinguish a script from a reference document.
Example
See examples/agent-framework/ for full working demos.
Error Handling
| Scenario | Exception |
|---|---|
| Skill not found in registry | SkillNotFoundError |
| Resource not found in skill | ResourceNotFoundError |
| Provider errors (HTTP, filesystem) | AgentSkillsError |
All exceptions inherit from AgentSkillsError (from agentskills-core).
Binary Resources
Skill resources may be arbitrary files. Valid UTF-8 is returned as-is; anything else is returned as a JSON envelope, so a binary payload is never silently mangled into replacement characters:
{
"name": "architecture.png",
"media_type": "image/png",
"size_bytes": 20481,
"encoding": "base64",
"content": "iVBORw0KGgo..."
}
Base64 costs roughly 1.37 characters per byte, so binaries above 64 KiB are described rather than inlined - "encoding": "none" plus a note explaining the omission. Adjust the ceiling with:
tools = get_tools(registry, max_inline_binary_bytes=256 * 1024)
License
MIT
Metadata
Release files for agentskills-agentframework 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| agentskills_agentframework-0.4.0.tar.gz | 8.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| agentskills_agentframework-0.4.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 18.3 kB
Release files / agentskills_agentframework-0.4.0.tar.gz
| Download URL | agentskills_agentframework-0.4.0.tar.gz |
|---|---|
| Size | 8.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3eba62aaf9d9f52c849ca7d6bbbc7dccc5838e86144ffa83bf496b6de618b102
|
|
BLAKE2b-256 checksum How to use checksums |
f9a7c46da1eaf853772cd3e77eb6dfe1deb99d458b7b71a456e5ad664ce083a6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 17, 2026.
Transparency logRelease files / agentskills_agentframework-0.4.0-py3-none-any.whl
| Download URL | agentskills_agentframework-0.4.0-py3-none-any.whl |
|---|---|
| Size | 10.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8dad59d628ea861c603850449e8b21757606856428120f40de8b23ddefcd5a75
|
|
BLAKE2b-256 checksum How to use checksums |
abe4d9408fd8625a9a2ec4ce4cc8aaa2d504558d5b62fdc0562808192abfa454
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 17, 2026.
Transparency log