Skills governance
Use the concrete policy engine for invocations, consent, limits and audit.
The dedicated skills-policy packages live under openagent-sdk/crates/openagent-skills-policy. They parse policy/skills manifests and evaluate invocation context. The unified SDK's small SkillsPolicy interface is a separate adapter boundary; it does not automatically enable every rule in the dedicated engine.
Policy dimensions
| Rule | Purpose |
|---|---|
| Allow/deny | Gate a named skill |
| Rate limit | Bound invocation frequency |
| Argument constraints | Validate invocation arguments |
| Time windows | Restrict permitted time periods |
| Consent | Require the configured approval |
| Audit level | Select none, hash or full payload recording |
TypeScript engine
The source exports SkillsPolicy, InvocationContext, Did, SkillsManifest, typed errors, a rate limiter and audit helpers. For example, this creates an explicit policy and records an invocation under it:
import { Did, InvocationContext, SkillsPolicy } from '@openagentid/skills-policy';
const policy = SkillsPolicy.fromYaml(`
version: 1
agent: did:oas:example:agent:docs-bot
skills:
read-documentation:
allow: true
audit_level: hash
default:
allow: false
`);
const context = new InvocationContext({
agentDid: Did.parse('did:oas:example:agent:docs-bot'),
sessionId: 'local-docs-example',
arguments: { path: '/essentials/quickstart' },
});
const receipt = policy.recordInvocation('read-documentation', context);Install this package from the source path in the catalog. The example configures policy only; it does not authenticate the DID or invoke a remote tool. The application must ensure the policy decision precedes the actual action and that context comes from authenticated state.
Audit and enforcement
A hash chain can verify linkage relative to retained history. It does not make in-memory receipts durable or prove every invocation was recorded. Configure persistence and redaction. Full argument capture may contain sensitive data; choose it deliberately.
See exact TypeScript policy exports, Rust policy modules, and framework hooks.