Loading…
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])