agentskit.js
Security

Security

Six primitives for production agents: PII redaction, injection detection, rate limiting, audit log, sandbox enforcement, and HITL approvals.

Agents that reach production face threats unit tests don't cover β€” sensitive data leaking into logs, user inputs that hijack the system prompt, runaway API costs, and tool calls that modify infrastructure. These primitives address each class of risk at the boundary closest to where it appears.

#Primitives

  • PII redaction β€” createPIIRedactor + DEFAULT_PII_RULES. Recipe.
  • Prompt injection detector β€” heuristics + pluggable model classifier. Recipe.
  • Rate limiting β€” token-bucket by user / IP / key. Recipe.
  • Signed audit log β€” hash-chain + HMAC. Recipe.
  • Mandatory sandbox β€” allow / deny / require / validators across every tool. Recipe.
  • Human-in-the-loop approvals β€” pause / resume / approve with persisted state. Recipe.

Explore nearby

✎ Edit this page on GitHubΒ·Found a problem? Open an issue β†’Β·How to contribute β†’

On this page