Govern agent skills from any Python framework — detect, install, gate, audit.
Project description
skillsvault Python SDK
Govern agent skills from any Python framework — LangChain, LangGraph, the OpenAI Agents SDK, LlamaIndex, or plain code. These have no skills directory and no harness hook, so they connect through this SDK instead.
Same control plane as the CLI and the JS SDK: sync() the signed policy bundle
once, then gate(skill) locally before each skill/tool use (no model, no
network on the hot path). governed() wraps a tool so a banned skill raises
before it runs and every use is audited.
pip install skillsvault
Only dependency is cryptography (Ed25519 bundle verification); HTTP uses the
standard library.
Model
from skillsvault import create_client
sv = create_client(
base_url="https://skillsvault.io",
org="acme",
key=os.environ["SKILLSVAULT_AGENT_KEY"], # Settings → API keys
harness="langchain", # free-form framework id
machine="prod-agent-7",
)
sv.sync() # verify the Ed25519-signed bundle
skills = sv.list_skills() # org-approved skills
content = sv.get_skill("acme/deploy") # SKILL.md + files at runtime
decision = sv.gate("acme/deploy") # Decision(decision="allow"|"warn"|"halt", reason, ...)
Framework adapters
governed(skill, fn) returns a wrapped fn — drop it in wherever a framework
expects the tool's function. A halt raises SkillsvaultError before the
tool runs; the model sees the org's reason and stops. Works for sync and
async functions.
LangChain
from langchain_core.tools import StructuredTool
def _deploy(env: str) -> str:
return deploy_to(env)
deploy = StructuredTool.from_function(
name="deploy",
description="Deploy the app",
func=sv.governed("acme/deploy", _deploy),
)
LangGraph
from langgraph.prebuilt import ToolNode
tools = [StructuredTool.from_function(
name="deploy", description="Deploy the app",
func=sv.governed("acme/deploy", _deploy),
)]
tool_node = ToolNode(tools) # a halted skill raises inside the graph node
OpenAI Agents SDK
from agents import function_tool
@function_tool
def deploy(env: str) -> str:
...
# wrap the underlying callable
deploy.on_invoke_tool = sv.governed("acme/deploy", deploy.on_invoke_tool)
Plain code
run = sv.governed("acme/deploy", lambda env: deploy_to(env))
run("prod") # raises SkillsvaultError if the org halts acme/deploy
API
| Call | Description |
|---|---|
create_client(base_url, org, key, *, machine, harness, timeout, retries) |
Construct the client. |
sync() |
Pull + verify the signed policy bundle. Call at startup and to refresh. |
gate(skill) -> Decision |
Local, deterministic allow/warn/halt. |
governed(skill, fn) |
Wrap a tool: gate + audit, raise on halt. Sync or async. |
list_skills() |
The org's approved skills. |
get_skill(name) |
Current-version content (SKILL.md + files), or None. |
audit(event) |
Append an audit event (best-effort). |
evaluate(bundle, skill) |
Pure gate function, if you hold a bundle yourself. |
Decision is a frozen dataclass: decision, reason, policy_id, policy_name.
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file skillsvault-0.1.0.tar.gz.
File metadata
- Download URL: skillsvault-0.1.0.tar.gz
- Upload date:
- Size: 6.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2351870033c403f0862ec34b435fd59477bc52f7fed8101ff4958a3d8d2f02f1
|
|
| MD5 |
aa2b88703b2f361ef93eb906635373e8
|
|
| BLAKE2b-256 |
47eb8233d50584cbffe0e8f4486a5c95216a490ecb0637ad0f2b325b97384340
|
File details
Details for the file skillsvault-0.1.0-py3-none-any.whl.
File metadata
- Download URL: skillsvault-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2e7b0fc999c5454b05a99f8d5dec56114a2c37ed8b467c91b2a72398e31799d4
|
|
| MD5 |
8a6cf2569572f41c10e9f0f7f1d4998e
|
|
| BLAKE2b-256 |
543f0d1afb66cfa1baec145b6bb379450923a8e7efef9e6ca91a5abfac41609a
|