autourgos-skills
Dynamic lazy-loading skill middleware for Autourgos agents. A skill is a
named instruction/knowledge fragment (Markdown, no tools) — only its name and a short description are shown
to the agent upfront; the agent calls load_skill(name) to pull the full content into context when a task
actually needs it.
from autourgos_skills import SkillLibraryMiddleware
from autourgos_agent import Agent
middleware = SkillLibraryMiddleware(skills=["./skills/pdf_editing.md", "./skill_library"])
agent = Agent(llm=my_llm, middleware=[middleware])
result = agent.invoke("Extract the text from this PDF")
Features
- Lazy skill loading — the agent sees only skill names/descriptions upfront, full instructions load on
demand via
load_skill(name) - Three input formats, one loader — a standalone
.mdfile, askill_bookdirectory (one skill bundled with its resources), or a folder-of-skill_books (a library) - Optional frontmatter —
name/descriptionvia a----delimited block; falls back to filename and first line when absent - Clean state per run —
on_agent_end/on_agent_errorfully restore the agent's original prompt; concurrent runs against one middleware instance are isolated per agent - Depends on
autourgos-agent; works with any Autourgos agent
Table of Contents
Why Use This?
Agents that support many different tasks often need many different sets of specialized instructions —
PDF editing, spreadsheet formatting, a particular API's quirks, a house writing style. Dumping all of them
into the system prompt at once wastes tokens on instructions the agent will never use for a given task, and
can push you past the context window before the task even starts. SkillLibraryMiddleware shows only a
catalog of names and one-line descriptions upfront, loading a skill's full content only when the agent
actually decides it's needed.
Install
pip install autourgos-skills
Quick Start
from autourgos_skills import SkillLibraryMiddleware
from autourgos_agent import Agent
middleware = SkillLibraryMiddleware(skills="./skills/pdf_editing.md")
agent = Agent(llm=my_llm, middleware=[middleware])
result = agent.invoke("Extract the text from this PDF")
print(result)
With Agent(verbose=True), this middleware narrates its own actions into the trace:
[Skills] Loaded skill 'pdf-editing' into agent context.
Skill Formats
skills= accepts a single path, a Skill instance, or a list mixing any of these. Each path is
auto-detected as one of three forms:
Standalone .md file — one skill
middleware = SkillLibraryMiddleware(skills="./skills/pdf_editing.md")
skill_book directory — one skill, bundled with resources
A directory containing SKILL.md (the skill's content) plus any number of sibling files — reference docs,
examples, templates — listed as resources when the skill loads (not auto-injected; the agent can read
them with its own file tools if it has any).
pdf_editing/
├── SKILL.md
├── reference.md
└── example_output.pdf
middleware = SkillLibraryMiddleware(skills="./skills/pdf_editing")
Folder-of-skill_books — a library
A directory whose immediate subdirectories are each a skill_book. Subdirectories without a SKILL.md are
skipped (not an error), so a library directory can hold other, unrelated subfolders too.
skill_library/
├── pdf_editing/
│ └── SKILL.md
├── spreadsheet_formatting/
│ ├── SKILL.md
│ └── template.xlsx
└── house_style/
└── SKILL.md
middleware = SkillLibraryMiddleware(skills="./skill_library")
Frontmatter
A SKILL.md/standalone .md file may start with a ----delimited block giving name/description
explicitly:
---
name: pdf-editing
description: Extract text, merge, split, and watermark PDF files.
---
## PDF Editing
Use `pypdf` for text extraction...
Without frontmatter, the skill's name falls back to the filename (without extension) and its description falls back to the first non-empty line of the body.
This is a simple key: value parser, not full YAML — nested lists, multi-line values, and quoted blocks
are not supported; only flat string fields.
Resources
Files in a skill_book directory other than SKILL.md are collected as Skill.resources (a list of file
paths) and listed to the agent when the skill loads, but their contents are never auto-injected — this
keeps a skill's context cost predictable regardless of how many reference files sit alongside it.
Requirements
- Python 3.9+
- Any Autourgos agent with
add_tools(),agent.tools, andagent.system_prompt/agent.prompt_template(requiresautourgos-agent>=2.0.2)
License
Apache License 2.0, Copyright (c) 2026 Jitin Kumar Sengar
Metadata
Release files for autourgos-skills 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| autourgos_skills-1.0.1.tar.gz | 21.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| autourgos_skills-1.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 39.5 kB
Release files / autourgos_skills-1.0.1.tar.gz
| Download URL | autourgos_skills-1.0.1.tar.gz |
|---|---|
| Size | 21.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2ff494c60580ac6057b39776d492b55e20a23b1f4198643b44ebf8c882b88771
|
|
BLAKE2b-256 checksum How to use checksums |
2e691e94119fd8e7a23f81c5a03bef9a3dc2e9902a56f6e0d23e4adfc02386ac
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.9
|
Release files / autourgos_skills-1.0.1-py3-none-any.whl
| Download URL | autourgos_skills-1.0.1-py3-none-any.whl |
|---|---|
| Size | 17.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c4336a7ea951e2e65a91ceaa487391913196da4503dda662f994c9259899ef99
|
|
BLAKE2b-256 checksum How to use checksums |
65cc9af191f65c87681abdc94dbd6151a9eca79c599b7c9fc8620cfafa9faff8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.9
|