Skip to main content

Local AI security gateway. Intercepts AI traffic, blocks secrets before they leave your machine.

Project description

Sentinel Gateway

You can see what your agents cost. You can't see what they're sending. Sentinel shows you both — and catches your secrets before they leave your machine.


Why This Exists

Every time you run Claude Code, Cursor, or Aider, your agent is sending requests to an AI provider. Those requests contain your code, your context, and sometimes your credentials.

You have no idea what's actually in them.

  • Your AWS keys, database passwords, and API tokens can silently end up in prompts
  • A single runaway agent can burn $50 in minutes — you find out when the bill arrives
  • 29 million secrets were leaked via AI tools in 2025. Most developers never knew.

Other monitoring tools fix this by routing your traffic through their servers.
That means your prompts, your code, and your secrets travel through a third party.

Sentinel intercepts at the source — on your machine, before anything leaves.
Nothing routes through external servers. Ever.

See It In Action

Sentinel redacting an AWS key


Who This Is For

  • Claude Code / Aider users — you're sending raw context to the API. Do you know what's in it?
  • Cursor BYOK users — one surprise bill is enough. Know exactly where every dollar goes.
  • Multi-agent pipeline builders — when 6 agents run in parallel, which one caused the spike?
  • Anyone who's accidentally committed an API key — Sentinel catches it before the AI ever sees it.

What's Built Today ✅

Feature Status
Secret & credential detection before transmission ✅ Live
Catches AWS keys, Stripe keys, SSNs, passwords in prompts ✅ Live
Permanent audit log of every request/response ✅ Live
Multi-provider support — Anthropic, OpenAI, Groq ✅ Live
Works with Claude Code, Cline, Cursor BYOK, Aider ✅ Live
Runs entirely locally — nothing sent to any cloud ✅ Live

What's Coming 🔜

Feature ETA
pip install sentinel-gateway — one command setup This week
Live dashboard — real-time spend per agent per session Next
Auto-pause — hard stop when spend hits your threshold Next
Anomaly detection — get notified when an agent behaves unusually Roadmap
Agent movement tracking — see every tool call, every decision Roadmap
Automatic interception for Cursor Auto Mode Roadmap
Team mode — shared audit log for small teams Roadmap

Install

5 steps. Under 2 minutes.

1. Clone the repo

git clone https://github.com/ujwalpathadex/sentinel-gateway
cd sentinel-gateway

2. Install dependencies

pip install -r requirements.txt

3. Add your API keys

cp .env.example .env

Open .env and replace the placeholder values with your actual keys.

4. Run Sentinel

python gateway.py

Gateway starts on http://localhost:8080

5. Connect your tools — one line each

Claude Code (Mac/Linux — add to ~/.zshrc or ~/.bashrc):

export ANTHROPIC_BASE_URL=http://localhost:8080/anthropic

Claude Code (Windows — add to System Environment Variables):

ANTHROPIC_BASE_URL=http://localhost:8080/anthropic

Cursor BYOK / Cline / Aider:

export ANTHROPIC_BASE_URL=http://localhost:8080/anthropic
export OPENAI_BASE_URL=http://localhost:8080/openai

Restart your tool after setting. All requests automatically pass through Sentinel.

⚠️ Cursor Auto Mode routes through Cursor's own servers and is not currently interceptable. BYOK mode only. Auto Mode support is on the roadmap.


What It Catches

Sentinel's DLP engine intercepts these before they reach any AI provider:

Secret Type Pattern
AWS Access Keys AKIA...
Stripe Live Keys sk_live_...
Social Security Numbers XXX-XX-XXXX
Generic API keys & tokens Pattern matched
Passwords in code Pattern matched

If a secret is detected — it is redacted in the request and flagged in your audit log. The AI never sees it.


Check Your Audit Log

cat sentinel.log

Every request and response is permanently logged with timestamp, provider, token count, and any secrets detected.


Architecture

Your Agent
    ↓
[ Sentinel — running locally ]
    ↓ intercepts here
    • scans for secrets → redacts
    • logs request + response
    • measures tokens + cost
    ↓
AI Provider (Anthropic / OpenAI / Groq)

The proxy intercepts every outbound HTTP request. Your data never touches Sentinel's servers — because there are no Sentinel servers.


License

Licensed under FSL-1.1-MIT — free to use personally and commercially. Converts to MIT in 2 years. See LICENSE.md

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sentinel_gateway-0.1.0.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sentinel_gateway-0.1.0-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

Details for the file sentinel_gateway-0.1.0.tar.gz.

File metadata

  • Download URL: sentinel_gateway-0.1.0.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.9

File hashes

Hashes for sentinel_gateway-0.1.0.tar.gz
Algorithm Hash digest
SHA256 2214889993a4dc88bbdc72cc4845fa8730331d398f63ba7a3718e42bdc16608d
MD5 be3601a74a4d2a8c46f6439fcbb46d30
BLAKE2b-256 4f1a2d92853c9352229cc9615c503e98a6d5347427d4a7d3bb83b223f0ce35c7

See more details on using hashes here.

File details

Details for the file sentinel_gateway-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for sentinel_gateway-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d5dfa060023b5f8f75f1bb9b1400454a57232b9ee2b3addb3a10fd9f67ca8d05
MD5 cc351570aa29c9e41d8bc3c3a54ace99
BLAKE2b-256 43b9af8ea37604b983c32a0cddb722742275a711d0b92e885e6b8824696d636b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page