@skillsvault-io/sdk
v0.1.0
Published
Govern agent skills from any framework — detect, install, gate, audit. Runtime-agnostic (Node, edge, browser, Deno, Bun).
Maintainers
Readme
@skillsvault-io/sdk
Govern agent skills from any framework — LangChain, LangGraph, OpenAI Agents SDK, Vercel AI SDK, Microsoft Copilot / Semantic Kernel, or plain code. These have no skills directory and no harness hook, so they connect through this SDK instead.
Runtime-agnostic: built on Web fetch + WebCrypto, so the same code runs on Node 20+, edge / Vercel Functions, browsers, Deno and Bun. Zero dependencies.
Model
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 throws
before it runs and every use is audited.
import { createSkillsvaultClient } from "@skillsvault-io/sdk";
const skillsvault = createSkillsvaultClient({
baseUrl: "https://skillsvault.io",
org: "acme",
key: process.env.SKILLSVAULT_AGENT_KEY!, // minted in Settings → API keys
harness: "ai-sdk", // free-form framework id
machine: "prod-agent-7",
});
await skillsvault.sync(); // verify the Ed25519-signed bundle
const skills = await skillsvault.listSkills(); // detect org-approved skills
const skill = await skillsvault.getSkill("acme/deploy"); // load SKILL.md + files at runtime
const decision = skillsvault.gate("acme/deploy"); // { decision: "allow" | "warn" | "halt", reason, ... }Framework adapters
governed(skill, fn) returns a wrapped fn — drop it in wherever a framework expects the tool's
execute function.
Vercel AI SDK
import { tool } from "ai";
import { z } from "zod";
const deploy = tool({
description: "Deploy the app",
inputSchema: z.object({ env: z.string() }),
execute: skillsvault.governed("acme/deploy", async ({ env }) => deployTo(env)),
});
// HALT → the tool throws; the model sees the org's reason and stops.LangChain
import { DynamicStructuredTool } from "@langchain/core/tools";
const deploy = new DynamicStructuredTool({
name: "deploy",
description: "Deploy the app",
schema: z.object({ env: z.string() }),
func: skillsvault.governed("acme/deploy", async ({ env }) => deployTo(env)),
});OpenAI Agents SDK
import { tool } from "@openai/agents";
const deploy = tool({
name: "deploy",
description: "Deploy the app",
parameters: z.object({ env: z.string() }),
execute: skillsvault.governed("acme/deploy", async ({ env }) => deployTo(env)),
});LangGraph / plain code
const run = skillsvault.governed("acme/deploy", doDeploy);
await run(args); // throws if banned/halted; audits every callWhy a connector (vs the CLI)
| Client | Integration |
|---|---|
| Coding harness (Claude Code, Codex, Cursor, …) | skillsvault CLI: pull installs skills into its dir + a hook gates at runtime |
| Agent framework / SDK (the above) | this SDK: sync → gate → governed tools, in your agent code |
Same control plane, same signed bundle, same audit. Enforcement is cooperative either way.
Publishing (next)
This proof ships as ESM + hand-authored .d.ts. A published package would add a tsup/tshy dual
ESM+CJS build and per-framework entry points (@skillsvault-io/sdk/ai, /langchain, /openai).
