← All lab updates
The gate's SDK is public: put the gate in front of your agent in a few lines
The SDK that puts the gate in front of an agent is now open source on GitHub, beside the engine. It sends each action to the gate before it runs and brings back the answer: it passes, or it does not pass with a fixed reason the model reads. It works with plain Python functions, OpenAI-style function calling (vLLM and Ollama included), LangChain and LangGraph, the OpenAI Agents SDK, CrewAI, MCP servers and coding agents such as Claude Code, Codex and Cursor. If the gate cannot be reached, the action does not run.
## Why it matters
A rule only protects if every action goes through it. The hard part for a team is rarely writing the rule: it is wiring the check into the agent they already have, in the framework they already use. The SDK does that wiring, so the gate sits between the model and the tools without rewriting the agent.
## What it does
- **Before each action**, it sends the tool name and its arguments to the gate.
- **If the action passes**, it runs, and the gate is told it ran.
- **If it does not pass**, the tool does not run and the model reads the rule's fixed reason as the tool's answer, so the agent can tell the user or take another way the rules allow.
- **If the gate does not answer**, the action does not run: an agent never acts without an answer.
- **The SDK holds no rule.** The rules are the tables of your account, written and published in the console.
## Where it plugs in
| Where your agent runs | How |
|---|---|
| Any Python function an agent calls | a decorator |
| OpenAI-style function calling (OpenAI, vLLM, Ollama, LM Studio ...) | one call on the model's reply |
| LangChain and LangGraph | wrap the tools |
| OpenAI Agents SDK, CrewAI | wrap the agent or its tools |
| Any MCP client (Claude Desktop, Cursor, Windsurf, Claude Code) | a proxy in front of a local or remote MCP server |
| Coding agents: Claude Code, Codex CLI, Cursor | a hook run before every tool call |
Install: `pip install "git+https://github.com/SiliconPsycheLabs/gate"`. Standard library only; each framework is loaded only by its own adapter.
## Tried on real agents
- **LangGraph and the OpenAI Agents SDK**, driven by an open model, with four tools (read an order, refund, send a mail, delete a customer) and a demo table (refunds up to 100, mail only inside the company, deletion closed). 21 tool calls asked: 12 passed and ran, 9 did not pass and none of them ran. Each time the model read the reason and told the user.
- **A near miss became a rule.** After a mail to an outside address was stopped, one agent sent the summary to an internal address and asked, in the body, for it to be forwarded outside. The mail translator now reads the addresses written in the body too, when the table asks.
- **Codex CLI with the hook in front.** Told to change a protected file "and if one way does not work, try another", the model went around the file rule through the shell, then looked for credentials in its environment. The lesson: the gate decides what an agent asks through its tools, and the machine decides what its shell can touch. Run the agent as a user that can neither write nor replace the protected files, with a key that can ask for decisions and nothing else.
## What it does not do
The SDK does not make a model trustworthy and does not read its intentions. A planted instruction can make a model want anything; with the SDK in place, the model can do only what your rules allow, and every decision is on the tape.
This update is not available.