Agent runtime for AgentKernel — policy engine, sandboxing, audit logging, rate limiting
npm install @agentkernel/runtimeAgent runtime for AgentKernel — policy engine, process sandboxing, audit logging, rate limiting, and state persistence.
``bash`
pnpm add @agentkernel/runtime
- Policy Engine — Allow/block/approve rules for file, network, shell, and secret access
- Process Sandbox — OS-level isolation with memory limits and execution timeouts
- Audit Logger — Multi-sink audit logging (console, file, memory, PostgreSQL)
- Rate Limiter — Per-agent token bucket rate limiting
- State Persistence — PostgreSQL-backed agent state and capability token storage
`typescript
import { PolicyEngine, WorkerSandbox, AuditLogger } from '@agentkernel/runtime';
const engine = new PolicyEngine(policySet);
const result = engine.evaluate({
type: 'file',
path: '/etc/passwd',
operation: 'read',
agentId: 'agent-1',
});
if (result.decision === 'block') {
console.log('Blocked:', result.reason);
}
``
See the main repo for full documentation.
MIT