Skip to main content
AFK implements security through four boundaries — policy engine, tool runtime, A2A/MCP bridges, and sandbox. Each boundary enforces least-privilege defaults and requires explicit opt-in for elevated permissions.

Security boundaries

Gate tool calls and agent actions with configurable rules.
Actions: allow (default), deny, request_approval, request_user_input
Every tool call passes through validation, policy checks, and output sanitization.
Sandbox profiles are configured at the runner level, not per-tool:
External communication requires authentication and per-caller authorization.
Hard limits prevent runaway agents.

Default posture

AFK defaults to least privilege:
Cost limits are not set by default. Always configure max_total_cost_usd in production to prevent runaway spending.

Production hardening checklist

Secret isolation

AFK recommends isolating secrets at the environment level. Use separate environment scopes and the runner’s ToolContext.metadata to control which credentials are available to each tool:

Threat model overview

Next steps

Failure Policy Matrix

How errors flow through the system.

Building with AI

Production playbook and anti-patterns.