Use Cases
APF is built for scenarios where an organization, not the person running the agent, decides what the agent may reach, which tool calls it may make, and what content may leave the sandbox. This page introduces representative scenarios. Each one links to a walkthrough in Tutorials that covers setup, policy configuration, expected behavior, and audit verification.
Who Uses APF
APF separates who writes policy, who distributes it, and who enforces it.
Scenarios at a Glance
Governed Coding Agents
Coding agents need source control and model access to be useful, and those same paths are where code and credentials can leak. The demo bundle in the APF repository shows the pattern:
- The sandbox policy allows
api.github.com:443with theread-onlyaccess preset, so only read methods reach GitHub at Layer 1. - The
github-grantsrule permits only thegithub_repo_readtool call. There is no permit for a write tool, so an MCP write call is denied by default. - Provider profiles name the inference and GitHub endpoints and declare how OpenShell injects each credential.
Sensitive-Data Workflows
The security team owns detection and the content gate. Other teams’ rules benefit without coordinating with them.
- The
secret-detectorannotator flags known credential shapes and labels the kind, for examplegithub_patoraws_access_key. - The
security-content-gatecontrol rule denies an MCP tool call that carries a secret and replaces the body of a plain HTTP request that carries one. - The
pii-detectorannotator and theredact-pii-bodyeffect withhold personal data from plain HTTP requests by replacing the top-leveltextfield of an outbound JSON body. A plain request with personal data but notextfield is denied, because the redaction cannot be applied. The demo does not redact or deny personal data in MCP tool calls. - The
secret-detectedfinding records each detection withcriticalseverity in the audit trail, whether the request was allowed or denied.
Approved-Channel Posting
The slack-grants rule in the demo bundle permits the slack_chat_post tool only when the channel argument equals an approved channel and a textLen argument stays under a limit. The caller must supply textLen. Rules of your own can use the text_len attribute APF derives from a text argument. Both values live in the rule’s data block, so an operator changes the approved channel by editing data, not Cedar.
Policy Lifecycle Scenarios
Two scenarios apply to every deployment, regardless of agent type.
- Change policy safely. Edit a document, increase
policy_revision, re-sign, and reload the policy service withPOST /v1/refresh, a restart, or the HTTP source’s next poll. The gateway then swaps its evaluator. Refer to Update a Signed Policy. - Refuse tampered policy. Any change to a signed member, the manifest, or the signature causes the whole bundle to be rejected. Refer to Reject a Tampered Bundle.
Common Risks and Controls
Each row is a way an agent can go wrong and the control that answers it. Every row is available on the main branch of the repository.
Next Steps
- To see where each control runs, refer to The Governed Path.
- To write your own rules, refer to Policy Model.