Skip to content

Governance Flags (SDK)

Control agent behavior with flags. in code, not config files.

agent = Agent("http://localhost:9620", flags={
"email": "internal:cogniqor.be",
"pii": "mask",
"mode": "observe",
})
FlagValuesDescription
modeobserve, warn, enforce, lockdownOverall governance posture
emailmirror:addr, internal:domain, block, allowEmail tool restrictions
piimask, block, flag, offPII handling
budgetdev, standard, custom:per_call:per_sessionCost caps
toolsallowlist:t1:t2, denylist:t1:t2, blockTool restrictions
filesread_only, project, sandbox, blockFile operations
dbread_only, safe_write, blockDatabase operations
secretsredact, block, flagSecret handling
response = agent.chat(
"Send salary data to the board",
flags={"email": "block", "mode": "lockdown"},
)
Terminal window
export TAPPASS_FLAGS="mode=observe, pii=mask, email=internal:cogniqor.be"
Terminal window
curl http://localhost:9620/v1/chat/completions \
-H "X-TapPass-Flags: mode=observe, pii=mask" \
-d '{"model": "gpt-4o-mini", "messages": [...]}'

For the full reference including resolution order, org locks, and email mirror details, see the Governance Flags guide.