Agent Sandbox Policy is a local-first policy engine and visual playground for validating, simulating, and auditing AI-agent tool calls.
ASP provides a reusable, framework-agnostic guardrail layer that evaluates tool request and output events with deterministic policy rules.
- Deterministic policy decisions for agent tool calls
- Policy-as-code with schema validation and test suites
- Replayable traces for incident analysis and compliance trails
- Local-first CLI and UI workflows
- Framework-agnostic architecture (not tied to one agent runtime)
MVP is implemented across:
@asp/core: parser, validator, evaluator, rate-limits, redaction, replay, test runner@asp/cli: validate/eval/replay/test/redact plus interactive mode@asp/ui: Policy Lab playground for evaluation, replay, tests, and redaction preview
Note: ASP currently focuses on policy evaluation and guardrail workflows. Provider/runtime adapters (OpenAI, Anthropic, Gemini, MCP runtime wiring) are planned as integration layers on top.
packages/schemas- schema catalog and manifestpackages/core- deterministic policy enginepackages/cli- command and interactive terminal interfacepackages/ui- web playgrounddocs/adr- architecture decision records
pnpm install
pnpm check:allRun CLI:
bun packages/cli/src/index.tsRun UI:
pnpm --filter @asp/ui dev --host 127.0.0.1 --port 4173pnpm lintpnpm typecheckpnpm testpnpm buildpnpm check:allpnpm compat:nodepnpm compat:bunpnpm --filter @asp/core profile
GitHub Actions workflow is in .github/workflows/ci.yml and runs:
- lint
- typecheck
- test
- build
- Node compatibility check
- Bun compatibility check
See CONTRIBUTING.md for setup, standards, and PR checklist.
MIT - see LICENSE.

