Connect your agent in three steps
Our small helper kits drop into your agent project and connect it to Gatesi.
- Try it offline. Download
agentgate.pyand run it on your own computer or in a Python notebook such as Colab. No account needed. Tools that match a deny pattern are refused, and tools that match an approval pattern ask you for a yes or no. - Connect to Gatesi. Open the Setup tab in the app to get your address and your
agk_key. Swap the offline line for the constructor that uses them. - Run. Safe calls pass straight through. Risky calls wait for your approval in Telegram.
import urllib.request
req = urllib.request.Request("https://gatesi.io/sdk/agentgate.py", headers={"User-Agent": "Mozilla/5.0"})
open("agentgate.py", "wb").write(urllib.request.urlopen(req).read())
from agentgate import AgentGate, Denied
gate = AgentGate.local({"deny_tools": ["delete*"], "approve_tools": ["*send*"]}, approve="ask")
@gate.tool("send_email")
def send_email(to, subject):
return "sent"
print(send_email("a@b.com", "Hi")) # asks you y/n first
More ways in
- JavaScript for Node 18 and later, Deno and Bun.
- Claude Code hook.
- Plain HTTP from any language.
The Python and JavaScript kits, the Claude Code hook, the receipt format, the offline checkers and the examples are MIT licensed. See the licence notice.