Token budgets, approved tool use, and brand-safe output — prove every client-facing agent action stayed inside the agreed rules.
For: Agencies and teams shipping client agents
Checks agent output against client brand and safety constraints.
Restrains agent runs that exceed the allocated project token wallet.
Blocks tool calls outside the approved client software list.
# AI Agency Pack
# Fork: the three gates from the ai_agency starter pack, with your budgets.
apiVersion: decionis.dev/v1
kind: PolicyPack
metadata:
name: ai-agency-pack
surface: langchain
policy_pack_id: ai_agency
standards: [SOC2-CC7.2, ISO27001-A.8.9]
defaults:
mode: shadow
emit_dossier: true
rules:
- name: ethics_and_tone_filter
when: "action == 'agent.publish_output'"
decision: |
BLOCK IF output.violates_brand_constraints == true
ESCALATE IF output.tone_confidence < 0.8
ALLOW OTHERWISE
reason_code: output_outside_brand_constraints
- name: token_budgeting
when: "action == 'agent.run'"
decision: |
RESTRAIN IF token_count > 50000
ALLOW OTHERWISE
reason_code: project_token_wallet_exceeded
- name: tool_use_whitelist
when: "action == 'agent.tool_call'"
decision: |
BLOCK IF tool_approved == false
ALLOW OTHERWISE
reason_code: tool_not_on_approved_list
Fork it, change the thresholds to match your environment, and deploy in shadow mode first — it defaults to listen-only so nothing in your live pipeline changes.
Wraps any LangChain BaseTool. The LLM still picks the tool on the same prompt; Decionis decides if the call fires.
# pip install decionis-langchain
from decionis import DecionisClient
from decionis_langchain import DecionisGateTool
client = DecionisClient(api_key="...", base_url="https://api.decionis.com")
gated_refund = DecionisGateTool.wrap(
inner_tool=send_refund,
client=client,
tenant_id="org-uuid",
workflow_key="refund_execution",
shadow_mode=True, # ← every verdict recorded; inner tool always runs
site_base_url="https://decionis.com",
)
agent.bind_tools([gated_refund])
Ships in shadow mode — every verdict is recorded, nothing is blocked.
This recipe is one step in a path. The same five steps apply to every recipe in the exchange.
Run the policy against a realistic action in the browser. Push it past what the rules allow and watch the verdict come back. No account.
See exactly what was decided and why: the rule that fired, the evidence it read, the policy version in force, and an Ed25519 signature you can verify yourself.
Measure what the policy would have caught on your own traffic without touching the live path. Every recipe defaults to shadow, so the first deployment carries no execution risk.
Point the same policy at the system where the action actually originates — a checkout, an ERP posting, a Zap, an agent's tool call.
Publish the proof: a public verification link, an embeddable badge, a PR comment, or an anonymized shadow-mode finding. This is how the next person discovers Decionis.