5D integration

5D for OpenAI tool guardrails and tripwires

Treat risky tool calls as tripwires and let 5D return a normalized `allow` / `review` / `deny` decision that your OpenAI runtime can act on.

Pain it solves

OpenAI’s tool guardrail ideas are useful, but most teams still need their own provider-neutral decision layer for tool execution, review handoff, and local policy control.

Best when you want tripwire-style semantics around tool calls without tying your whole runtime policy story to one provider SDK.

When to use 5D

Use 5D when your agent can write files, run shell, call external APIs, or touch sensitive tools.

In this setup, 5D returns a normalized runtime decision: allow, review, or deny, plus a tripwire_triggered flag for runtimes that want a simpler guardrail signal.

Install

git clone https://github.com/theDoc001/fivedrisk.git
cd fivedrisk
python3 -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"

Minimal example

from fivedrisk import DecisionLog, evaluate_action, load_policy

policy = load_policy("policy.yaml")
log = DecisionLog("fivedrisk.db")

outcome = evaluate_action(
    tool_name="Bash",
    tool_input={"command": "docker compose restart"},
    policy=policy,
    log=log,
    source="openai-agents",
)

payload = {
    "decision": "deny" if outcome.denied else "review" if outcome.requires_review else "allow",
    "tripwire_triggered": outcome.tripwire_triggered,
    "score": outcome.to_dict(),
}

Next step

Try the integration, then keep the policy layer yours.

5D gives you a portable policy layer you can run locally, keep provider-neutral, and hand off to a user or external review agent when needed.

Open source under Apache-2.0 and provided as-is. You are responsible for review, testing, configuration, sandboxing, and deployment in your own environment.