agskillmanager 2.0.0__tar.gz → 3.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. {agskillmanager-2.0.0 → agskillmanager-3.0.0}/PKG-INFO +182 -136
  2. {agskillmanager-2.0.0 → agskillmanager-3.0.0}/README.md +169 -124
  3. {agskillmanager-2.0.0 → agskillmanager-3.0.0}/pyproject.toml +26 -42
  4. {agskillmanager-2.0.0 → agskillmanager-3.0.0}/pyproject.toml.orig +203 -209
  5. {agskillmanager-2.0.0 → agskillmanager-3.0.0}/src/skill_manager/__init__.py +188 -127
  6. agskillmanager-3.0.0/src/skill_manager/_async.py +38 -0
  7. agskillmanager-3.0.0/src/skill_manager/_boundary.py +133 -0
  8. agskillmanager-3.0.0/src/skill_manager/_frozen.py +141 -0
  9. agskillmanager-3.0.0/src/skill_manager/_lifecycle.py +138 -0
  10. agskillmanager-3.0.0/src/skill_manager/_optional.py +34 -0
  11. agskillmanager-3.0.0/src/skill_manager/_redaction.py +187 -0
  12. agskillmanager-3.0.0/src/skill_manager/_types.py +147 -0
  13. agskillmanager-3.0.0/src/skill_manager/_xai.py +265 -0
  14. agskillmanager-3.0.0/src/skill_manager/api.py +1813 -0
  15. agskillmanager-3.0.0/src/skill_manager/config.py +140 -0
  16. agskillmanager-3.0.0/src/skill_manager/discovery.py +335 -0
  17. {agskillmanager-2.0.0 → agskillmanager-3.0.0}/src/skill_manager/errors.py +109 -83
  18. agskillmanager-3.0.0/src/skill_manager/generation.py +93 -0
  19. agskillmanager-3.0.0/src/skill_manager/integrations/langchain.py +267 -0
  20. agskillmanager-3.0.0/src/skill_manager/models.py +356 -0
  21. agskillmanager-3.0.0/src/skill_manager/observability.py +149 -0
  22. agskillmanager-3.0.0/src/skill_manager/otel.py +153 -0
  23. agskillmanager-3.0.0/src/skill_manager/postgres.py +582 -0
  24. agskillmanager-3.0.0/src/skill_manager/registry.py +232 -0
  25. agskillmanager-3.0.0/src/skill_manager/requests.py +404 -0
  26. agskillmanager-3.0.0/src/skill_manager/resolution.py +244 -0
  27. agskillmanager-3.0.0/src/skill_manager/sources.py +622 -0
  28. agskillmanager-3.0.0/src/skill_manager/testing.py +569 -0
  29. agskillmanager-3.0.0/src/skill_manager/validation.py +138 -0
  30. agskillmanager-2.0.0/src/skill_manager/_optional.py +0 -18
  31. agskillmanager-2.0.0/src/skill_manager/_xai.py +0 -48
  32. agskillmanager-2.0.0/src/skill_manager/api.py +0 -969
  33. agskillmanager-2.0.0/src/skill_manager/config.py +0 -33
  34. agskillmanager-2.0.0/src/skill_manager/discovery.py +0 -275
  35. agskillmanager-2.0.0/src/skill_manager/generation.py +0 -83
  36. agskillmanager-2.0.0/src/skill_manager/integrations/langchain.py +0 -184
  37. agskillmanager-2.0.0/src/skill_manager/models.py +0 -307
  38. agskillmanager-2.0.0/src/skill_manager/observability.py +0 -67
  39. agskillmanager-2.0.0/src/skill_manager/otel.py +0 -107
  40. agskillmanager-2.0.0/src/skill_manager/postgres.py +0 -318
  41. agskillmanager-2.0.0/src/skill_manager/registry.py +0 -195
  42. agskillmanager-2.0.0/src/skill_manager/resolution.py +0 -187
  43. agskillmanager-2.0.0/src/skill_manager/sources.py +0 -175
  44. agskillmanager-2.0.0/src/skill_manager/testing.py +0 -362
  45. agskillmanager-2.0.0/src/skill_manager/validation.py +0 -95
  46. {agskillmanager-2.0.0 → agskillmanager-3.0.0}/LICENSE +0 -0
  47. {agskillmanager-2.0.0 → agskillmanager-3.0.0}/src/skill_manager/integrations/__init__.py +0 -0
  48. {agskillmanager-2.0.0 → agskillmanager-3.0.0}/src/skill_manager/py.typed +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: agskillmanager
3
- Version: 2.0.0
3
+ Version: 3.0.0
4
4
  Summary: A governed, framework-agnostic, asyncio-first Skill lifecycle for AI agents.
5
5
  Keywords: agents,agent-skills,skills,governance,approval,provenance,langchain,langgraph,agno,crewai,mcp,yaml
6
6
  Author: S MUNI HARISH
@@ -20,19 +20,20 @@ Classifier: Programming Language :: Python :: 3.14
20
20
  Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
21
21
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
22
22
  Classifier: Typing :: Typed
23
- Requires-Dist: agxai>=1.0.3,<2
24
- Requires-Dist: feedback-manager>=0.1.2,<0.2
25
- Requires-Dist: mcp-capability-router>=1.0.2,<2
26
- Requires-Dist: packaging>=26.3
27
- Requires-Dist: pydantic>=2.14.3,<3
28
- Requires-Dist: pyyaml>=6.0.3,<7
29
- Requires-Dist: refresh-engine>=1.0.1,<2
30
- Requires-Dist: retrievalloom>=0.2.0,<0.3
23
+ Requires-Dist: agxai>=2.0.1,<3
24
+ Requires-Dist: feedback-manager>=0.3.1,<0.4
25
+ Requires-Dist: filelock>=4.3.2,<5
26
+ Requires-Dist: mcp-capability-router>=3.0.0,<4
27
+ Requires-Dist: packaging>=26.4,<27
28
+ Requires-Dist: pydantic>=2.14.4,<3
29
+ Requires-Dist: pyyaml>=6.0.4,<7
30
+ Requires-Dist: refresh-engine>=2.0.0,<3
31
+ Requires-Dist: retrievalloom>=1.0.0,<2
31
32
  Requires-Dist: agskillmanager[langchain,otel,postgres] ; extra == 'all'
32
- Requires-Dist: langchain-core>=1.8.2,<2 ; extra == 'langchain'
33
+ Requires-Dist: langchain-core>=1.9.0,<2 ; extra == 'langchain'
33
34
  Requires-Dist: xstructured>=1.0.1,<2 ; extra == 'langchain'
34
- Requires-Dist: opentelemetry-api>=1.45.2,<2 ; extra == 'otel'
35
- Requires-Dist: opentelemetry-sdk>=1.45.2,<2 ; extra == 'otel'
35
+ Requires-Dist: opentelemetry-api>=1.45.3,<2 ; extra == 'otel'
36
+ Requires-Dist: opentelemetry-sdk>=1.45.3,<2 ; extra == 'otel'
36
37
  Requires-Dist: psycopg[binary,pool]>=3.3.9,<4 ; extra == 'postgres'
37
38
  Requires-Python: >=3.12, <3.15
38
39
  Project-URL: Homepage, https://github.com/smuniharish/agskillmanager
@@ -46,127 +47,172 @@ Provides-Extra: otel
46
47
  Provides-Extra: postgres
47
48
  Description-Content-Type: text/markdown
48
49
 
49
- <p align="center">
50
- <img src="https://raw.githubusercontent.com/smuniharish/agskillmanager/master/docs/assets/logo.svg" width="80" alt="AG Skill Manager">
51
- </p>
52
-
53
- # agskillmanager
54
-
55
- **Governed, framework-agnostic Skill lifecycle management for AI agents.**
56
-
57
- [![CI](https://github.com/smuniharish/agskillmanager/actions/workflows/ci.yml/badge.svg)](https://github.com/smuniharish/agskillmanager/actions/workflows/ci.yml)
58
- [![PyPI](https://img.shields.io/pypi/v/agskillmanager)](https://pypi.org/project/agskillmanager/)
59
- [![Documentation](https://readthedocs.org/projects/agskillmanager/badge/?version=latest)](https://agskillmanager.readthedocs.io/en/latest/)
60
- [![Python](https://img.shields.io/badge/python-3.12%20%7C%203.13%20%7C%203.14-blue)](https://github.com/smuniharish/agskillmanager/blob/master/pyproject.toml)
61
- [![Coverage](https://img.shields.io/badge/coverage-100%25-brightgreen)](https://github.com/smuniharish/agskillmanager/actions/workflows/ci.yml)
62
- [![Typed](https://img.shields.io/badge/typing-typed-blue)](https://github.com/smuniharish/agskillmanager/blob/master/src/skill_manager/py.typed)
63
- [![License](https://img.shields.io/badge/license-Apache--2.0-blue)](https://github.com/smuniharish/agskillmanager/blob/master/LICENSE)
64
-
65
- Reusable instructions become application assets: validated, discoverable, versioned,
66
- reviewable and ready to compose. Skill Manager produces a typed `SkillBundle`;
67
- your agent framework owns execution.
68
-
69
- ## Why Skill Manager?
70
-
71
- - Canonical YAML and typed, validated domain models.
72
- - Immutable revision identity, dependency resolution and provenance lineage.
73
- - Async ABC extension points for storage, discovery, generation and telemetry.
74
- - Hybrid keyword, fuzzy and BM25 Skill discovery powered by
75
- [RetrievalLoom](https://pypi.org/project/retrievalloom/), with pluggable
76
- embeddings, rerankers and NLI.
77
- - Human approval, rejection and feedback-informed regeneration.
78
- - MCP capability resolution, refresh scheduling and bounded caches.
79
- - Fully configured downstream runtimes stay injectable, including their stores,
80
- policies, plugins and transport options.
81
- - No LangChain or LangGraph dependency in core. Works with plain Python, Agno,
82
- CrewAI or any runtime that consumes instructions.
83
-
84
- ## Install
85
-
86
- Python 3.12 through 3.14.
87
-
88
- ```console
89
- pip install agskillmanager
90
- pip install "agskillmanager[langchain]" # xstructured generation and embeddings
91
- pip install "agskillmanager[postgres,otel]" # PostgreSQL and OpenTelemetry
92
- pip install "agskillmanager[all]"
93
- ```
94
-
95
- ## Quickstart
96
-
97
- ```python
98
- import asyncio
99
-
100
- from skill_manager import Skill, SkillManager, SkillMetadata
101
-
102
-
103
- async def main() -> None:
104
- async with SkillManager() as manager:
105
- skill = await manager.register_skill(
106
- Skill(
107
- metadata=SkillMetadata(
108
- name="incident-review",
109
- version="1.0.0",
110
- description="Review incidents using verified evidence.",
111
- ),
112
- instructions=(
113
- "Separate confirmed facts from hypotheses.",
114
- "Report unresolved risks explicitly.",
115
- ),
116
- )
117
- )
118
- matches = await manager.discover("review incident", top_k=1)
119
- bundle = await manager.build_bundle(matches)
120
- print(skill.skill_id)
121
- print("\n".join(bundle.instructions))
122
-
123
-
124
- asyncio.run(main())
125
- ```
126
-
127
- Add a `FilesystemSkillSource` for YAML persistence, or inject a PostgreSQL registry
128
- for a shared catalog. Enable `require_human_approval=True` when generating untrusted
129
- instructions. Restart-safe review needs durable registry and feedback storage.
130
-
131
- ## Customize without losing downstream options
132
-
133
- | Runtime | Inject through | Configure in that runtime |
134
- |---|---|---|
135
- | feedback-manager | `feedback_manager=` | Storage, routing, policies and learning |
136
- | mcp-capability-router | `mcp_runtime=` | Registry, retrieval, transport, auth, resilience |
137
- | refresh-engine | `refresh_engine=` | Source, operation, fingerprint, storage and events |
138
- | agxai | `xai_runtime=` | Provenance, disclosure, explanation and plugins |
139
- | retrievalloom | `discovery=RetrievalLoomDiscoveryProvider(...)` | Embeddings, reranker, NLI, indexes, stores and retrieval config |
140
- | xstructured | `XStructuredSkillGenerator(...)` | Runnable, repair and structured-output options |
141
-
142
- Caller-created collaborators remain caller-owned. See the full
143
- [customization matrix](https://agskillmanager.readthedocs.io/en/latest/integrations/customization/).
144
-
145
- ## Explore
146
-
147
- - [Documentation](https://agskillmanager.readthedocs.io/en/latest/)
148
- - [Runnable examples](https://github.com/smuniharish/agskillmanager/tree/master/examples):
149
- plain Python, LangGraph, LangChain, deepagents, approval, PostgreSQL, MCP and OTel.
150
- - [API reference](https://agskillmanager.readthedocs.io/en/latest/api/manager/)
151
- - [Agent Skills](https://github.com/smuniharish/agskillmanager/tree/master/agskillmanager-skills)
152
- - [Contributing](https://github.com/smuniharish/agskillmanager/blob/master/CONTRIBUTING.md)
153
- - [Security](https://github.com/smuniharish/agskillmanager/blob/master/SECURITY.md)
154
- - [Changelog](https://github.com/smuniharish/agskillmanager/blob/master/CHANGELOG.md)
155
-
156
- ## Development
157
-
158
- ```console
159
- uv sync --locked --all-extras --all-groups
160
- uv run --no-sync ruff check .
161
- uv run --no-sync ruff format --check .
162
- uv run --no-sync pyrefly check
163
- uv run --no-sync pytest
164
- uv run --no-sync zensical build --strict
165
- ```
166
-
167
- CI measures 100% line and branch coverage with a PostgreSQL service, checks Python
168
- 3.12–3.14, validates docs and verifies a core wheel without optional frameworks.
169
- Service/model examples are live-tested when their documented environment variables
170
- are set. Never commit credentials.
171
-
172
- Licensed under [Apache-2.0](https://github.com/smuniharish/agskillmanager/blob/master/LICENSE).
50
+ <p align="center">
51
+ <img src="https://raw.githubusercontent.com/smuniharish/agskillmanager/master/docs/assets/logo.svg" width="80" alt="AG Skill Manager">
52
+ </p>
53
+
54
+ # agskillmanager
55
+
56
+ **Governed, framework-agnostic Skill lifecycle management for AI agents.**
57
+
58
+ [![CI](https://github.com/smuniharish/agskillmanager/actions/workflows/ci.yml/badge.svg)](https://github.com/smuniharish/agskillmanager/actions/workflows/ci.yml)
59
+ [![PyPI](https://img.shields.io/pypi/v/agskillmanager)](https://pypi.org/project/agskillmanager/)
60
+ [![Documentation](https://readthedocs.org/projects/agskillmanager/badge/?version=latest)](https://agskillmanager.readthedocs.io/en/latest/)
61
+ [![Python](https://img.shields.io/badge/python-3.12%20%7C%203.13%20%7C%203.14-blue)](https://github.com/smuniharish/agskillmanager/blob/master/pyproject.toml)
62
+ [![Coverage](https://img.shields.io/badge/coverage-100%25-brightgreen)](https://github.com/smuniharish/agskillmanager/actions/workflows/ci.yml)
63
+ [![Typed](https://img.shields.io/badge/typing-typed-blue)](https://github.com/smuniharish/agskillmanager/blob/master/src/skill_manager/py.typed)
64
+ [![License](https://img.shields.io/badge/license-Apache--2.0-blue)](https://github.com/smuniharish/agskillmanager/blob/master/LICENSE)
65
+
66
+ Reusable instructions become application assets: validated, discoverable, versioned,
67
+ reviewable and ready to compose. Skill Manager produces a typed `SkillBundle`;
68
+ your agent framework owns execution.
69
+
70
+ ## Why Skill Manager?
71
+
72
+ - Canonical YAML and typed, validated domain models.
73
+ - Immutable revision identity, dependency resolution and provenance lineage.
74
+ - Async ABC extension points for storage, discovery, generation and telemetry.
75
+ - Hybrid keyword, fuzzy and BM25 Skill discovery powered by
76
+ [RetrievalLoom](https://pypi.org/project/retrievalloom/), with pluggable
77
+ embeddings, rerankers and NLI.
78
+ - Human approval, rejection and feedback-informed regeneration.
79
+ - MCP capability resolution, refresh scheduling and bounded caches.
80
+ - Fully configured downstream runtimes stay injectable, including their stores,
81
+ policies, plugins and transport options.
82
+ - No LangChain or LangGraph dependency in core. Works with plain Python, Agno,
83
+ CrewAI or any runtime that consumes instructions.
84
+
85
+ ## Install
86
+
87
+ Python 3.12 through 3.14.
88
+
89
+ ```console
90
+ pip install agskillmanager
91
+ pip install "agskillmanager[langchain]" # xstructured generation and embeddings
92
+ pip install "agskillmanager[postgres,otel]" # PostgreSQL and OpenTelemetry
93
+ pip install "agskillmanager[all]"
94
+ ```
95
+
96
+ ## Quickstart
97
+
98
+ ```python
99
+ import asyncio
100
+
101
+ from skill_manager import (
102
+ BuildBundleRequest,
103
+ DiscoverSkillsRequest,
104
+ RegisterSkillRequest,
105
+ Skill,
106
+ SkillManager,
107
+ SkillMetadata,
108
+ )
109
+
110
+
111
+ async def main() -> None:
112
+ async with SkillManager() as manager:
113
+ skill = await manager.register_skill(
114
+ RegisterSkillRequest(
115
+ skill=Skill(
116
+ metadata=SkillMetadata(
117
+ name="incident-review",
118
+ version="1.0.0",
119
+ description="Review incidents using verified evidence.",
120
+ ),
121
+ instructions=(
122
+ "Separate confirmed facts from hypotheses.",
123
+ "Report unresolved risks explicitly.",
124
+ ),
125
+ )
126
+ )
127
+ )
128
+ matches = await manager.discover(DiscoverSkillsRequest(query="review incident", top_k=1))
129
+ bundle = await manager.build_bundle(BuildBundleRequest(skills=tuple(matches)))
130
+ print(skill.skill_id)
131
+ print("\n".join(bundle.instructions))
132
+
133
+
134
+ asyncio.run(main())
135
+ ```
136
+
137
+ Every operation takes exactly one validated request object, for example
138
+ `list_skills(SkillQuery())` or `refresh(RefreshRequest())`. Pass a
139
+ `SkillManagerSetup(sources=(FilesystemSkillSource(FilesystemSkillSourceConfig(...)),))`
140
+ for YAML persistence, or inject a PostgreSQL registry for a shared catalog. Enable
141
+ `require_human_approval=True` when generating untrusted instructions: pending Skills
142
+ are persisted to the source, and approvals are bound to the Skill's ID, revision
143
+ and content digest. The default feedback store is in memory, so agent approvals
144
+ cannot be verified after a restart and those Skills return to review; inject a
145
+ persistent feedback store for restart-safe approvals. Upgrading from 2.x? Read
146
+ [Migrating to 3.0](https://agskillmanager.readthedocs.io/en/latest/getting-started/migration/).
147
+
148
+ ## Hardened by default
149
+
150
+ - Strict YAML (duplicate keys rejected), bounded documents, and filesystem sources
151
+ that reject symlinks and write atomically.
152
+ - Credential-like keys rejected at any depth; deeply immutable models.
153
+ - Conditional source writes under a cross-process lock and compare-and-swap
154
+ registries: a stale manager gets `SkillConflictError`, never overwrites newer work.
155
+ - Failed writes restore the exact previous state; an uncompensated failure raises
156
+ `SkillRollbackError`. Approvals and rejections resume after partial failures.
157
+ Cancelled mutations finish before `CancelledError` is re-raised, and a closed
158
+ manager raises `SkillManagerClosedError`.
159
+ - Source limits enforced before every write; generated Skills revalidated deeply;
160
+ imported rejection evidence verified; injected components' error messages, custom
161
+ source locators and their errors withheld; custom backends' output revalidated.
162
+ - Mandatory, strict AGXAI evidence for every governed operation: an operation whose
163
+ evidence cannot be recorded is refused. Inject a durable `xai_runtime` for audits;
164
+ the default keeps evidence in memory.
165
+ - Bounded dependency resolution (`dependency_max_steps`) and capability resolution
166
+ concurrency (`capability_concurrency`).
167
+
168
+ ## Container
169
+
170
+ ```console
171
+ podman build -t agskillmanager:3.0.0 -f Containerfile .
172
+ podman run --rm agskillmanager:3.0.0
173
+ ```
174
+
175
+ The multi-stage image runs as a non-root user and verifies the installation by default.
176
+
177
+ ## Customize without losing downstream options
178
+
179
+ | Runtime | Inject through | Configure in that runtime |
180
+ |---|---|---|
181
+ | feedback-manager | `SkillManagerSetup(feedback_manager=...)` | Storage, routing, policies and learning |
182
+ | mcp-capability-router | `SkillManagerSetup(mcp_runtime=...)` | Registry, retrieval, transport, auth, resilience |
183
+ | refresh-engine | `SkillManagerSetup(refresh_engine=...)` | Source, operation, fingerprint, storage and events |
184
+ | agxai | `SkillManagerSetup(xai_runtime=...)` (strict or fail-closed, with a plugin) | Provenance, disclosure, explanation and plugins |
185
+ | retrievalloom | `SkillManagerSetup(discovery=RetrievalLoomDiscoveryProvider(RetrievalLoomDiscoveryConfig(...)))` | Embeddings, reranker, NLI, indexes, stores and retrieval config |
186
+ | xstructured | `GenerateSkillRequest(generator=XStructuredSkillGenerator(XStructuredSkillGeneratorConfig(...)))` | Runnable, repair and structured-output options |
187
+
188
+ Caller-created collaborators remain caller-owned. See the full
189
+ [customization matrix](https://agskillmanager.readthedocs.io/en/latest/integrations/customization/).
190
+
191
+ ## Explore
192
+
193
+ - [Documentation](https://agskillmanager.readthedocs.io/en/latest/)
194
+ - [Runnable examples](https://github.com/smuniharish/agskillmanager/tree/master/examples):
195
+ plain Python, LangGraph, LangChain, approval, PostgreSQL, MCP and OTel.
196
+ - [API reference](https://agskillmanager.readthedocs.io/en/latest/api/manager/)
197
+ - [Agent Skills](https://github.com/smuniharish/agskillmanager/tree/master/agskillmanager-skills)
198
+ - [Contributing](https://github.com/smuniharish/agskillmanager/blob/master/CONTRIBUTING.md)
199
+ - [Security](https://github.com/smuniharish/agskillmanager/blob/master/SECURITY.md)
200
+ - [Changelog](https://github.com/smuniharish/agskillmanager/blob/master/CHANGELOG.md)
201
+
202
+ ## Development
203
+
204
+ ```console
205
+ uv sync --locked --all-extras --all-groups
206
+ uv run --no-sync ruff check .
207
+ uv run --no-sync ruff format --check .
208
+ uv run --no-sync pyrefly check
209
+ uv run --no-sync pytest
210
+ uv run --no-sync zensical build --strict
211
+ ```
212
+
213
+ CI measures 100% line and branch coverage with a PostgreSQL service, checks Python
214
+ 3.12–3.14, validates docs and verifies a core wheel without optional frameworks.
215
+ Service/model examples are live-tested when their documented environment variables
216
+ are set. Never commit credentials.
217
+
218
+ Licensed under [Apache-2.0](https://github.com/smuniharish/agskillmanager/blob/master/LICENSE).
@@ -1,124 +1,169 @@
1
- <p align="center">
2
- <img src="https://raw.githubusercontent.com/smuniharish/agskillmanager/master/docs/assets/logo.svg" width="80" alt="AG Skill Manager">
3
- </p>
4
-
5
- # agskillmanager
6
-
7
- **Governed, framework-agnostic Skill lifecycle management for AI agents.**
8
-
9
- [![CI](https://github.com/smuniharish/agskillmanager/actions/workflows/ci.yml/badge.svg)](https://github.com/smuniharish/agskillmanager/actions/workflows/ci.yml)
10
- [![PyPI](https://img.shields.io/pypi/v/agskillmanager)](https://pypi.org/project/agskillmanager/)
11
- [![Documentation](https://readthedocs.org/projects/agskillmanager/badge/?version=latest)](https://agskillmanager.readthedocs.io/en/latest/)
12
- [![Python](https://img.shields.io/badge/python-3.12%20%7C%203.13%20%7C%203.14-blue)](https://github.com/smuniharish/agskillmanager/blob/master/pyproject.toml)
13
- [![Coverage](https://img.shields.io/badge/coverage-100%25-brightgreen)](https://github.com/smuniharish/agskillmanager/actions/workflows/ci.yml)
14
- [![Typed](https://img.shields.io/badge/typing-typed-blue)](https://github.com/smuniharish/agskillmanager/blob/master/src/skill_manager/py.typed)
15
- [![License](https://img.shields.io/badge/license-Apache--2.0-blue)](https://github.com/smuniharish/agskillmanager/blob/master/LICENSE)
16
-
17
- Reusable instructions become application assets: validated, discoverable, versioned,
18
- reviewable and ready to compose. Skill Manager produces a typed `SkillBundle`;
19
- your agent framework owns execution.
20
-
21
- ## Why Skill Manager?
22
-
23
- - Canonical YAML and typed, validated domain models.
24
- - Immutable revision identity, dependency resolution and provenance lineage.
25
- - Async ABC extension points for storage, discovery, generation and telemetry.
26
- - Hybrid keyword, fuzzy and BM25 Skill discovery powered by
27
- [RetrievalLoom](https://pypi.org/project/retrievalloom/), with pluggable
28
- embeddings, rerankers and NLI.
29
- - Human approval, rejection and feedback-informed regeneration.
30
- - MCP capability resolution, refresh scheduling and bounded caches.
31
- - Fully configured downstream runtimes stay injectable, including their stores,
32
- policies, plugins and transport options.
33
- - No LangChain or LangGraph dependency in core. Works with plain Python, Agno,
34
- CrewAI or any runtime that consumes instructions.
35
-
36
- ## Install
37
-
38
- Python 3.12 through 3.14.
39
-
40
- ```console
41
- pip install agskillmanager
42
- pip install "agskillmanager[langchain]" # xstructured generation and embeddings
43
- pip install "agskillmanager[postgres,otel]" # PostgreSQL and OpenTelemetry
44
- pip install "agskillmanager[all]"
45
- ```
46
-
47
- ## Quickstart
48
-
49
- ```python
50
- import asyncio
51
-
52
- from skill_manager import Skill, SkillManager, SkillMetadata
53
-
54
-
55
- async def main() -> None:
56
- async with SkillManager() as manager:
57
- skill = await manager.register_skill(
58
- Skill(
59
- metadata=SkillMetadata(
60
- name="incident-review",
61
- version="1.0.0",
62
- description="Review incidents using verified evidence.",
63
- ),
64
- instructions=(
65
- "Separate confirmed facts from hypotheses.",
66
- "Report unresolved risks explicitly.",
67
- ),
68
- )
69
- )
70
- matches = await manager.discover("review incident", top_k=1)
71
- bundle = await manager.build_bundle(matches)
72
- print(skill.skill_id)
73
- print("\n".join(bundle.instructions))
74
-
75
-
76
- asyncio.run(main())
77
- ```
78
-
79
- Add a `FilesystemSkillSource` for YAML persistence, or inject a PostgreSQL registry
80
- for a shared catalog. Enable `require_human_approval=True` when generating untrusted
81
- instructions. Restart-safe review needs durable registry and feedback storage.
82
-
83
- ## Customize without losing downstream options
84
-
85
- | Runtime | Inject through | Configure in that runtime |
86
- |---|---|---|
87
- | feedback-manager | `feedback_manager=` | Storage, routing, policies and learning |
88
- | mcp-capability-router | `mcp_runtime=` | Registry, retrieval, transport, auth, resilience |
89
- | refresh-engine | `refresh_engine=` | Source, operation, fingerprint, storage and events |
90
- | agxai | `xai_runtime=` | Provenance, disclosure, explanation and plugins |
91
- | retrievalloom | `discovery=RetrievalLoomDiscoveryProvider(...)` | Embeddings, reranker, NLI, indexes, stores and retrieval config |
92
- | xstructured | `XStructuredSkillGenerator(...)` | Runnable, repair and structured-output options |
93
-
94
- Caller-created collaborators remain caller-owned. See the full
95
- [customization matrix](https://agskillmanager.readthedocs.io/en/latest/integrations/customization/).
96
-
97
- ## Explore
98
-
99
- - [Documentation](https://agskillmanager.readthedocs.io/en/latest/)
100
- - [Runnable examples](https://github.com/smuniharish/agskillmanager/tree/master/examples):
101
- plain Python, LangGraph, LangChain, deepagents, approval, PostgreSQL, MCP and OTel.
102
- - [API reference](https://agskillmanager.readthedocs.io/en/latest/api/manager/)
103
- - [Agent Skills](https://github.com/smuniharish/agskillmanager/tree/master/agskillmanager-skills)
104
- - [Contributing](https://github.com/smuniharish/agskillmanager/blob/master/CONTRIBUTING.md)
105
- - [Security](https://github.com/smuniharish/agskillmanager/blob/master/SECURITY.md)
106
- - [Changelog](https://github.com/smuniharish/agskillmanager/blob/master/CHANGELOG.md)
107
-
108
- ## Development
109
-
110
- ```console
111
- uv sync --locked --all-extras --all-groups
112
- uv run --no-sync ruff check .
113
- uv run --no-sync ruff format --check .
114
- uv run --no-sync pyrefly check
115
- uv run --no-sync pytest
116
- uv run --no-sync zensical build --strict
117
- ```
118
-
119
- CI measures 100% line and branch coverage with a PostgreSQL service, checks Python
120
- 3.12–3.14, validates docs and verifies a core wheel without optional frameworks.
121
- Service/model examples are live-tested when their documented environment variables
122
- are set. Never commit credentials.
123
-
124
- Licensed under [Apache-2.0](https://github.com/smuniharish/agskillmanager/blob/master/LICENSE).
1
+ <p align="center">
2
+ <img src="https://raw.githubusercontent.com/smuniharish/agskillmanager/master/docs/assets/logo.svg" width="80" alt="AG Skill Manager">
3
+ </p>
4
+
5
+ # agskillmanager
6
+
7
+ **Governed, framework-agnostic Skill lifecycle management for AI agents.**
8
+
9
+ [![CI](https://github.com/smuniharish/agskillmanager/actions/workflows/ci.yml/badge.svg)](https://github.com/smuniharish/agskillmanager/actions/workflows/ci.yml)
10
+ [![PyPI](https://img.shields.io/pypi/v/agskillmanager)](https://pypi.org/project/agskillmanager/)
11
+ [![Documentation](https://readthedocs.org/projects/agskillmanager/badge/?version=latest)](https://agskillmanager.readthedocs.io/en/latest/)
12
+ [![Python](https://img.shields.io/badge/python-3.12%20%7C%203.13%20%7C%203.14-blue)](https://github.com/smuniharish/agskillmanager/blob/master/pyproject.toml)
13
+ [![Coverage](https://img.shields.io/badge/coverage-100%25-brightgreen)](https://github.com/smuniharish/agskillmanager/actions/workflows/ci.yml)
14
+ [![Typed](https://img.shields.io/badge/typing-typed-blue)](https://github.com/smuniharish/agskillmanager/blob/master/src/skill_manager/py.typed)
15
+ [![License](https://img.shields.io/badge/license-Apache--2.0-blue)](https://github.com/smuniharish/agskillmanager/blob/master/LICENSE)
16
+
17
+ Reusable instructions become application assets: validated, discoverable, versioned,
18
+ reviewable and ready to compose. Skill Manager produces a typed `SkillBundle`;
19
+ your agent framework owns execution.
20
+
21
+ ## Why Skill Manager?
22
+
23
+ - Canonical YAML and typed, validated domain models.
24
+ - Immutable revision identity, dependency resolution and provenance lineage.
25
+ - Async ABC extension points for storage, discovery, generation and telemetry.
26
+ - Hybrid keyword, fuzzy and BM25 Skill discovery powered by
27
+ [RetrievalLoom](https://pypi.org/project/retrievalloom/), with pluggable
28
+ embeddings, rerankers and NLI.
29
+ - Human approval, rejection and feedback-informed regeneration.
30
+ - MCP capability resolution, refresh scheduling and bounded caches.
31
+ - Fully configured downstream runtimes stay injectable, including their stores,
32
+ policies, plugins and transport options.
33
+ - No LangChain or LangGraph dependency in core. Works with plain Python, Agno,
34
+ CrewAI or any runtime that consumes instructions.
35
+
36
+ ## Install
37
+
38
+ Python 3.12 through 3.14.
39
+
40
+ ```console
41
+ pip install agskillmanager
42
+ pip install "agskillmanager[langchain]" # xstructured generation and embeddings
43
+ pip install "agskillmanager[postgres,otel]" # PostgreSQL and OpenTelemetry
44
+ pip install "agskillmanager[all]"
45
+ ```
46
+
47
+ ## Quickstart
48
+
49
+ ```python
50
+ import asyncio
51
+
52
+ from skill_manager import (
53
+ BuildBundleRequest,
54
+ DiscoverSkillsRequest,
55
+ RegisterSkillRequest,
56
+ Skill,
57
+ SkillManager,
58
+ SkillMetadata,
59
+ )
60
+
61
+
62
+ async def main() -> None:
63
+ async with SkillManager() as manager:
64
+ skill = await manager.register_skill(
65
+ RegisterSkillRequest(
66
+ skill=Skill(
67
+ metadata=SkillMetadata(
68
+ name="incident-review",
69
+ version="1.0.0",
70
+ description="Review incidents using verified evidence.",
71
+ ),
72
+ instructions=(
73
+ "Separate confirmed facts from hypotheses.",
74
+ "Report unresolved risks explicitly.",
75
+ ),
76
+ )
77
+ )
78
+ )
79
+ matches = await manager.discover(DiscoverSkillsRequest(query="review incident", top_k=1))
80
+ bundle = await manager.build_bundle(BuildBundleRequest(skills=tuple(matches)))
81
+ print(skill.skill_id)
82
+ print("\n".join(bundle.instructions))
83
+
84
+
85
+ asyncio.run(main())
86
+ ```
87
+
88
+ Every operation takes exactly one validated request object, for example
89
+ `list_skills(SkillQuery())` or `refresh(RefreshRequest())`. Pass a
90
+ `SkillManagerSetup(sources=(FilesystemSkillSource(FilesystemSkillSourceConfig(...)),))`
91
+ for YAML persistence, or inject a PostgreSQL registry for a shared catalog. Enable
92
+ `require_human_approval=True` when generating untrusted instructions: pending Skills
93
+ are persisted to the source, and approvals are bound to the Skill's ID, revision
94
+ and content digest. The default feedback store is in memory, so agent approvals
95
+ cannot be verified after a restart and those Skills return to review; inject a
96
+ persistent feedback store for restart-safe approvals. Upgrading from 2.x? Read
97
+ [Migrating to 3.0](https://agskillmanager.readthedocs.io/en/latest/getting-started/migration/).
98
+
99
+ ## Hardened by default
100
+
101
+ - Strict YAML (duplicate keys rejected), bounded documents, and filesystem sources
102
+ that reject symlinks and write atomically.
103
+ - Credential-like keys rejected at any depth; deeply immutable models.
104
+ - Conditional source writes under a cross-process lock and compare-and-swap
105
+ registries: a stale manager gets `SkillConflictError`, never overwrites newer work.
106
+ - Failed writes restore the exact previous state; an uncompensated failure raises
107
+ `SkillRollbackError`. Approvals and rejections resume after partial failures.
108
+ Cancelled mutations finish before `CancelledError` is re-raised, and a closed
109
+ manager raises `SkillManagerClosedError`.
110
+ - Source limits enforced before every write; generated Skills revalidated deeply;
111
+ imported rejection evidence verified; injected components' error messages, custom
112
+ source locators and their errors withheld; custom backends' output revalidated.
113
+ - Mandatory, strict AGXAI evidence for every governed operation: an operation whose
114
+ evidence cannot be recorded is refused. Inject a durable `xai_runtime` for audits;
115
+ the default keeps evidence in memory.
116
+ - Bounded dependency resolution (`dependency_max_steps`) and capability resolution
117
+ concurrency (`capability_concurrency`).
118
+
119
+ ## Container
120
+
121
+ ```console
122
+ podman build -t agskillmanager:3.0.0 -f Containerfile .
123
+ podman run --rm agskillmanager:3.0.0
124
+ ```
125
+
126
+ The multi-stage image runs as a non-root user and verifies the installation by default.
127
+
128
+ ## Customize without losing downstream options
129
+
130
+ | Runtime | Inject through | Configure in that runtime |
131
+ |---|---|---|
132
+ | feedback-manager | `SkillManagerSetup(feedback_manager=...)` | Storage, routing, policies and learning |
133
+ | mcp-capability-router | `SkillManagerSetup(mcp_runtime=...)` | Registry, retrieval, transport, auth, resilience |
134
+ | refresh-engine | `SkillManagerSetup(refresh_engine=...)` | Source, operation, fingerprint, storage and events |
135
+ | agxai | `SkillManagerSetup(xai_runtime=...)` (strict or fail-closed, with a plugin) | Provenance, disclosure, explanation and plugins |
136
+ | retrievalloom | `SkillManagerSetup(discovery=RetrievalLoomDiscoveryProvider(RetrievalLoomDiscoveryConfig(...)))` | Embeddings, reranker, NLI, indexes, stores and retrieval config |
137
+ | xstructured | `GenerateSkillRequest(generator=XStructuredSkillGenerator(XStructuredSkillGeneratorConfig(...)))` | Runnable, repair and structured-output options |
138
+
139
+ Caller-created collaborators remain caller-owned. See the full
140
+ [customization matrix](https://agskillmanager.readthedocs.io/en/latest/integrations/customization/).
141
+
142
+ ## Explore
143
+
144
+ - [Documentation](https://agskillmanager.readthedocs.io/en/latest/)
145
+ - [Runnable examples](https://github.com/smuniharish/agskillmanager/tree/master/examples):
146
+ plain Python, LangGraph, LangChain, approval, PostgreSQL, MCP and OTel.
147
+ - [API reference](https://agskillmanager.readthedocs.io/en/latest/api/manager/)
148
+ - [Agent Skills](https://github.com/smuniharish/agskillmanager/tree/master/agskillmanager-skills)
149
+ - [Contributing](https://github.com/smuniharish/agskillmanager/blob/master/CONTRIBUTING.md)
150
+ - [Security](https://github.com/smuniharish/agskillmanager/blob/master/SECURITY.md)
151
+ - [Changelog](https://github.com/smuniharish/agskillmanager/blob/master/CHANGELOG.md)
152
+
153
+ ## Development
154
+
155
+ ```console
156
+ uv sync --locked --all-extras --all-groups
157
+ uv run --no-sync ruff check .
158
+ uv run --no-sync ruff format --check .
159
+ uv run --no-sync pyrefly check
160
+ uv run --no-sync pytest
161
+ uv run --no-sync zensical build --strict
162
+ ```
163
+
164
+ CI measures 100% line and branch coverage with a PostgreSQL service, checks Python
165
+ 3.12–3.14, validates docs and verifies a core wheel without optional frameworks.
166
+ Service/model examples are live-tested when their documented environment variables
167
+ are set. Never commit credentials.
168
+
169
+ Licensed under [Apache-2.0](https://github.com/smuniharish/agskillmanager/blob/master/LICENSE).