Skip to content
landjungePublic

About

Safety layer for AI agents — Protect · Route · Prove. Budgets, tool-loop hard stops, failover, chaos DR proof. OpenAI drop-in · MCP · n8n.

Topics

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

TollGate

TollGate

Eine Sicherheitsschranke für KI-Agenten.

TollGate prüft eine Handlung, bevor ein Agent sie ausführt. Es kann Schleifen stoppen, Budgets begrenzen und Ausfälle sichtbar machen.


Aktueller Funktionsstand / Current capabilities

Deutsch: TollGate prüft angeschlossene Modell- und Werkzeugaufrufe vor der Ausführung. Das Gateway bietet Verbrauchsgrenzen, Schleifenschutz, Scopes, Freeze und kontrollierte Weiterleitung. Der lokale Auftragskontrollkern ergänzt dauerhafte Reservierungen und Stopps für ausdrücklich angeschlossene Adapter. Freeze blockiert neue Aufrufe; es beendet keine beliebigen Prozesse und macht bereits ausgelöste Wirkungen nicht rückgängig. Kostenschätzungen sind keine Anbieterabrechnung.

English: TollGate checks connected model and tool calls before execution. The gateway provides usage limits, loop protection, scopes, freeze and controlled routing. Its local workflow-control core adds durable reservations and stop barriers for explicitly connected adapters. Freeze blocks new calls; it does not terminate arbitrary processes or undo effects already sent. Cost estimates are not provider invoices.

Python 3.11+; Paketstand / package version: 1.0.12. Schnellstart / Quick start · Auftragskontrolle und Grenzen / Workflow control and limits.

Für Nutzer

Einfach erklärt

Ein KI-Agent kann Werkzeuge benutzen, Internetdienste aufrufen und dabei Kosten verursachen. Wenn etwas schiefläuft, kann er denselben Aufruf immer wieder ausführen.

TollGate sitzt davor. Es beantwortet eine Frage:

Darf ich handeln?

Was du davon hast

  • Endlosschleifen werden gestoppt.
  • Kosten können begrenzt werden.
  • Zugriffe erhalten klare Regeln.
  • Bei einem ausgefallenen Anbieter kann kontrolliert gewechselt werden.
  • Entscheidungen werden für eine spätere Prüfung festgehalten.

In drei Schritten

  1. Installieren – TollGate lokal einrichten.
  2. Testen – eine ungefährliche Agentenschleife ausführen.
  3. Prüfen – sehen, warum TollGate den Aufruf erlaubt oder blockiert hat.

Was TollGate nicht ist

TollGate ist kein KI-Modell, kein Agent und kein Passwort-Tresor. Es ersetzt auch nicht die Entscheidung des Menschen. Es ist eine eigene Kontrollschicht vor einer Handlung.

Heutiger Stand – ehrlich

Bereich Aktueller Stand
Protect Budgets, Schleifenstopps, Scopes und Freeze
Route Zustandsabhängige Weiterleitung und Failover
Prove Chaos- und Wiederanlauf-Tests mit Nachweisen
Schnittstellen OpenAI-kompatibel, MCP und n8n
Technik Python und FastAPI
Reife In Entwicklung; vor Produktion selbst prüfen

Kontrollumfang / Control scope

Freeze sperrt neue angeschlossene Aufrufe; es beendet keine beliebigen Prozesse und macht bereits versandte Wirkung nicht rückgängig. Tagesgrenzen und grobe USD-Schätzungen sind keine bestätigte Anbieterrechnung. Der neue lokale Auftragskontrollkern reserviert ganzzahlige USD-Microbeträge je KI/Gesamtauftrag dauerhaft und koppelt Stopps an den tatsächlichen angeschlossenen Dispatch. Neustart, Tageswechsel und Timeout geben unklare Reservierungen nicht frei. Die Abnahme nutzt synthetische Adapter; KiraBridge/4AllPass-Livebetrieb und beliebige CLI-Kosten sind damit nicht freigegeben.

Freeze blocks new connected calls; it does not terminate arbitrary processes or undo already sent effects. Daily estimates are not provider invoices. The local workflow-control core adds durable integer-dollar reservations per AI/workflow and an ordered stop/dispatch barrier. Unknown obligations survive restart/day changes. Synthetic acceptance is not a production KiraBridge/4AllPass adapter or a hard cap for arbitrary subscription CLIs.

Produktseite · Schnellstart


Für Entwickler

TollGate ist ein vorgeschaltetes Admission Gate für Tool- und Modellaufrufe. Es entscheidet vor dem Request und hält den Grund der Entscheidung fest.

How this is built / Wie dieses Projekt entsteht

System Designer & Product Architect — Daniel Filipek (landjunge)

Ich arbeite anders: Ich entwickle Systeme und Produkte mit KI als technischem Partner.

Meine Stärke liegt darin, Probleme zu erkennen, Systeme in eigenständige Werkzeuge zu zerlegen und klare Grenzen und Schnittstellen zu definieren. Produktvision, Prioritäten und Architekturentscheidungen kommen von mir. KI ist der technische Partner für Implementierung, Tests und Dokumentation.

Ich bin kein klassischer Softwareentwickler und kein Security-Spezialist. Die technische Umsetzung entsteht gemeinsam mit KI und muss – besonders bei sicherheitskritischen Projekten – überprüfbar sein.

Was ich einbringe: Idee, Systemdenken, Anforderungen, gewünschtes Verhalten, klare Grenzen.
Was überprüfbar sein muss: der Code, die Specs, die Tests. Reviews sind willkommen.

Open Source und öffentlich entwickelt. Kritik, Tests und Beiträge sind willkommen.

TollGate beantwortet „Darf ich handeln?“ — ein eigenes Produkt, kein Plugin der anderen.

AI Agent
   │
   ├── tool call #1
   ├── tool call #2
   ├── tool call #3
   ├── tool call #4
   └── tool call #5

TollGate

🛑 TOOL LOOP LIMIT EXCEEDED

Agent blocked.
Budget remaining: $1.72
Evidence recorded.

10 minutes (cold start)

Primary path: native Python — no Docker. Protect demo needs no provider keys.

git clone https://github.com/landjunge/tollgate.git && cd tollgate
python3 -m venv .venv && .venv/bin/pip install -e .
./scripts/ten-minute.sh
# 60-second Protect story (optional, server on :8787):
./scripts/demo-agent-safety.sh

USB stick / portable desk (venv + data on the volume):

./scripts/portable-setup.sh
./scripts/run.sh
# details: docs/PORTABLE.md

You should experience:

Step What happens
Protect Agent tool-loop → 🛑 REQUEST BLOCKED (no $ required)
Prove Chaos / failover simulation → survived or clear next step
Result tollgate certificate scorecard + dashboard

Start here (3 docs):
Quickstart · Portable / USB · How it works · Production checklist

More: SECURITY.md · OPENAI.md · HILFE.md (DE) · FAQ.md · tollgate help · tollgate doctor

If that path is confusing, stop shipping features — fix the path.


Who it’s for

Teams running agents in production cost · loops · outages · audit · freeze
Agent frameworks (LangGraph, CrewAI, …) sit in front of tools + LLMs
n8n / automation stop workflow agent-loops at the gate

Wedge: LiteLLM connects models. Helicone shows traffic. TollGate keeps agents in line.


Product (short)

Pillar Job
Protect Budgets, tool-loop hard stops, scopes, freeze, audit
Route Health-aware failover, circuits
Prove Chaos/DR tests, resilience score, certificate scorecard

Deep dive: docs/PRODUCT.md · Architecture: docs/ARCHITECTURE.md


Everyday commands (after the 10 minutes)

tollgate status
tollgate certificate --application "Customer Support Agent"
tollgate consumer-budget support-agent --max-usd-day 2 --max-tool-calls 20
tollgate chaos test opencode_zen --requests 10
tollgate freeze --reason "panic"    # blocks new controlled calls; not process termination
tollgate report                     # day brief

Point an agent / OpenAI SDK:

export OPENAI_BASE_URL=http://127.0.0.1:8787/v1
export OPENAI_API_KEY=support-agent   # open mode label, or id:secret

Language / Sprache

Tollgate speaks English and German. English stays the default, so existing scripts that read CLI output keep working.

Way Example
Once tollgate --lang de help
Always export TOLLGATE_LANG=de
Automatic from LC_ALL, LC_MESSAGES or LANG

LANG=C and LANG=POSIX mean "no preference" and are skipped, so a server shell never lands on a language nobody chose.

The section words argparse prints itself (usage:, options:) come from Python and stay English.

The Control Room at /dashboard follows the same choice: ?lang=de picks a language and is remembered in a cookie for a year, otherwise the browser decides. The switch sits in the header and inside the setup wizard, so it is reachable even on a first visit.

Plain or expert wording / Klartext oder Fachsprache

Independent of English/German there are two levels of wording. Plain is the default, expert is opt-in — never the other way round. Whoever knows the terms switches them on; whoever does not is not run over by them.

Way Example
Once tollgate --mode expert control
Always export TOLLGATE_MODE=expert
Control Room switch next to DE/EN, remembered in a cookie for a year
Plain (default) Expert
Leitstand · Nachweis · Protokoll · Anbieter Control Room · Prove · Audit · Provider
"Start Tollgate so agents can reach it" "Run HTTP server (uvicorn)"
Response time · Safety switch · State Latency · Circuit · Health

The level is not guessed from the browser or the environment: plain applies to everyone until someone says otherwise. Both switches carry the other one's choice in their links, so picking EN does not throw the wording level away.

Not yet in expert wording: the twelve handbook topics behind tollgate help <topic>. The switch is wired (<topic>#expert), no topic has a second version yet, so plain stays.

Not yet translated: text that arrives from the API (/v1/control headline and recommendations). Those would need the API to carry codes instead of English sentences — a change to the JSON contract, tracked separately.


Shared rules of the NetzwerkPunkt tools

TollGate, ThreadDesk and 4AllPass share their look and their language rules. Anyone building a new tool takes the same values — they are not taste, they are standards you can look up. 4AllPass is the reference.

Colours (identical in all tools)

Token Value For
--bg #121316 base surface
--bg-panel #1a1b1f surface
--bg-card #1e1f24 card
--fg #e2e4e9 text
--fg-muted #8b909a secondary text
--border #2e3138 divider between surfaces (decoration)
--border-strong #5f646f edge of controls
--accent #8f98a8 accent
--ok / --warn / --err #3d9b6a / #c9a227 / #dc7070 states

In TollGate the same tokens are called --line, --line2, --muted, --acc, --bad — same values, older names.

Shape and size

  • border-radius: 0 everywhere. Round only where the shape means something (map symbols, progress ring, status dot), with a reason in the code.
  • Exactly four font sizes: 13 / 16 / 20 / 25 px. 16px base as recommended for body text on the web, the steps around it at a ratio of 1.25 (major third). Other tokens get deleted, not just avoided.
  • Spacing on an 8px grid: 4 / 8 / 12 / 16 / 24 / 32.
  • Exactly two sizes for controls, no more: --control: 40px for the normal case (button, input, select) and --control-sm: 32px for dense rows and tabs. Both sit on the 8px grid. Button, input and select are the same height.
  • Under @media (pointer: coarse) every target becomes 44px (--control-touch). That is not a third size, it is the same elements under a different input device — the number comes from Apple and Material. The pointer is the right signal, not the window width: a narrow desktop window is not a finger. WCAG 2.2 (2.5.8) asks for 24px as the minimum; all three values are above it.
  • Contrast: 4.5:1 for text, 3:1 for anything else that carries meaning (WCAG 2.2, 1.4.3 and 1.4.11).
  • Selects set appearance: none and draw their own arrow — otherwise the operating system draws the menu, on Windows with a 3D effect.
  • Font: the operating system's. Nothing loaded from elsewhere.

Language

  • Every tool is English and German from the start. Retrofitting is expensive. Visible text belongs in a catalogue, never in the template.
  • Always one language at a time, never both side by side.
  • Resolution: ?lang= → cookie → Accept-Language → default.
  • Plus the two levels of wording: plain is the default, expert is opt-in. An expert version hangs off the same key, separated by #expert — not a dot, otherwise register.expert would be the expert version of register. With no expert version the plain text stays.
  • Every label says what happens. Every field says what it is for. No abbreviation without spelling it out. Errors name the next step.
  • Proper nouns are not translated: TollGate, ThreadDesk, 4AllPass, Gnom-Hub-V1, Grok, Codex, MCP.

A trap that bit twice: argparse builds the help texts when the parser is created, not when it parses. --lang and --mode must therefore be read from argv by hand beforehand, or tollgate --mode expert --help is plain again.


vs gateways (optional reading)

TollGate LiteLLM Helicone
Core job Agent safety + DR proof Multi-provider proxy Observability
Pre-admission hard deny ✅ optional mostly post-hoc
Chaos / prove ✅ first-class DIY —

Docs index

Doc When
HILFE.md Hilfe (Deutsch)
USER_GUIDE.md User guide (English)
FAQ.md FAQ
TEN_MINUTE.md First 10 minutes
DEMO.md Pitch / screen share
GETTING_STARTED.md Setup details
MAP.md · tollgate search Find code
N8N.md · OPENAI.md Integrations
CHANGELOG.md Releases · v1.0.0+

License: All Rights Reserved · Python: ≥ 3.11 · Repo: landjunge/tollgate

Owned CLI stop-only adapter / Auftragseigener CLI-Stopp

An optional trusted process adapter can share the durable workflow stop barrier; CLI cost remains unknown, without a hard dollar cap or invented zero-cost quote. Optionale betreibergebundene Prozessadapter teilen die dauerhafte Auftragssperre; Kosten bleiben unbekannt. DE/EN contract.

About

Safety layer for AI agents — Protect · Route · Prove. Budgets, tool-loop hard stops, failover, chaos DR proof. OpenAI drop-in · MCP · n8n.

Topics

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages