Skip to main content

autourgos-skills

Framework: Autourgos Python License: Apache 2.0 Author Contributor Contributor

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 SkillLibrary
from autourgos_agent import Agent

skill_library = SkillLibrary(skills=["./skills/pdf_editing.md", "./skill_library"])
agent = Agent(llm=my_llm, middleware=[skill_library])
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 .md file, a skill_book directory (one skill bundled with its resources), or a folder-of-skill_books (a library)
  • Safe to share across agents — one SkillLibrary instance can serve multiple concurrent Agents; per-agent state is isolated (autourgos-core's PerAgentRegistry)
  • Optional frontmatter — name/description via a ----delimited block; falls back to filename and first line when absent
  • Clean state per run — on_agent_end/on_agent_error fully 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. SkillLibrary 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 SkillLibrary
from autourgos_agent import Agent

skill_library = SkillLibrary(skills="./skills/pdf_editing.md")
agent = Agent(llm=my_llm, middleware=[skill_library])

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

skill_library = SkillLibrary(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
skill_library = SkillLibrary(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
skill_library = SkillLibrary(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, and agent.system_prompt / agent.prompt_template (requires autourgos-agent>=2.0.2)

License

Apache License 2.0, Copyright (c) 2026 Jitin Kumar Sengar

Metadata

Release files for autourgos-skills 1.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for autourgos-skills 1.3.0
File Size Uploaded
autourgos_skills-1.3.0.tar.gz 24.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for autourgos-skills 1.3.0
File Interpreter ABI Platform
autourgos_skills-1.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 43.4 kB

Release files / autourgos_skills-1.3.0.tar.gz

Download URL autourgos_skills-1.3.0.tar.gz
Size 24.3 kB
Tags Source
SHA-256 checksum
How to use checksums
8aff08477ceca69a1cf3c2fe65d5a7c63aeabedc58d9d06b96925aed6e94c5a6
BLAKE2b-256 checksum
How to use checksums
83507d91d99abcbdb620fcd633b8aa8c471cc2e5baf42f66883aa1b5b4c97376
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.3.0-py3-none-any.whl

Download URL autourgos_skills-1.3.0-py3-none-any.whl
Size 19.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8eb127521abdecadaa89fb72e718d8ad8c434720747e97374fa3e543b6672ecf
BLAKE2b-256 checksum
How to use checksums
2d039e953993fdb03a4e9771a8e81bd48797e385f2a966d2f85b34326450ae7c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.9

Release history Release notifications | RSS feed

This release

1.3.0 This release

2 release files

1.1.0

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page