Local-first agent protection

Let agents work.
Stop the loops.

A lightweight gate between your AI agent and its provider. Catch repetitive responses. Stop forwarding the loop.

Your agentKeep your workflow
AIGateInspect on your machine
127.0.0.1:4317
Model providerThrough a supported route

Pre-alpha Loop Breaker is available. Action Sandbox and Cost Cap are planned. See what’s included

More autonomy.
More reason for
a stopping point.

An agent can keep working long after it stops making progress. Put a check in the path of the next request.

The same response. Again.

Repeated reasoning becomes repeated API calls. AIGate looks for consecutive output replays and closes the loop.

Addressed by Loop Breaker

Local actions need local guardrails.

A model provider cannot approve shell commands on your laptop. Command-level protection needs its own layer.

Action Sandbox is planned

Different tools. Separate contexts.

Moving between agents fragments your work. Shared memory is a future direction, outside the current release.

Shared memory is not included

Built around a stopping point

A small layer.
A clear boundary.

One local proxy, with an explicit distinction between what works today and what comes next.

Available in pre-alpha

Loop Breaker

Identifies consecutive repeated responses using n-gram fingerprints. Once the threshold is reached, the proxy blocks further requests for its lifetime.

Explore the simulation
3matching responses

Default replay threshold. Configurable in aigate.toml.

Planned

Action Sandbox

Command-level checks and human approval for sensitive actions. This protection is not enforced in the current release.

Planned

Cost Cap

Spending limits per session and per day. The current Loop Breaker does not enforce a dollar budget.

Interactive simulation

Same loop.
Different ending.

Run the scenario with or without a loop breaker.
Simulated traffic. Illustrative costs. No API calls.

AIGate playgroundOpen full screen (new tab)

This browser illustration uses a three-response rule. It does not execute the Go detector or terminate a real agent.

Local by design.
Yours to inspect.

Start from the source checkout. Build the proxy, review its configuration, then connect a compatible client.

  1. 1
    Build from source

    Go 1.22 or newer is required.

  2. 2
    Review the configuration

    Keep planned protections disabled.

  3. 3
    Connect your client

    Use the local endpoint and a client token.

In the AIGate source directory
go build -o ./bin/aigate ./cmd/aigate
./bin/aigate --config aigate.toml --validate

Builds the local binary and validates the configuration. Validation does not start the proxy.

Pre-alpha setup. Review compatibility before routing an agent.
Routing surface · V0.1.0 A controlled proxy, not a passthrough. 8 of 8 runtime assertions pass on darwin/arm64.
GET /health 200 Body {"status":"ok","version":"0.1.0"}. No auth required.
POST /v1/chat/completions 200 Forwarded to provider, response inspected before being sent back. The Loop Breaker runs on every assistant message.
POST /v1/chat/completions (no auth) 401 Missing or wrong Authorization: Bearer $AIGATE_CLIENT_TOKEN.
POST /v1/chat/completions (loop) 429 3 identical assistant messages → kill. Sticky until the binary is restarted. Body names the reason.
POST /v1/models 404 Only /v1/chat/completions is forwarded. Other routes are refused.
GET /v1/chat/completions 405 POST only. The wrong method is rejected before content-type parsing.
POST /v1/chat/completions (>2 MiB) 413 Body cap is 2 MiB. Larger bodies are refused before authentication.
Auth is mandatory on the proxy route. aigate init writes ~/.aigate/token at mode 0600 and prints the matching export command. No token, no forward.

Open source.
On your terms.

The current release is a single, free, Apache 2.0-licensed product. Inspect it, run it locally, make it your own.

Paid plans may follow future features. There is no Pro or Team subscription in the current release.

Open Source

Apache 2.0 license
$0for the current open-source release
  • Loop Breaker with configurable replay threshold
  • Local token authentication and loopback binding
  • OpenAI-compatible chat completions route
  • Local operation without an AIGate cloud account
  • Source available to inspect and modify
Explore the source

Provider usage is billed separately by your provider.

Give your agent
a stopping point.

Start with AIGate