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
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sentinel_gateway-0.2.1.tar.gz.
File metadata
- Download URL: sentinel_gateway-0.2.1.tar.gz
- Upload date:
- Size: 13.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
35bc25c5788a62cb7455df9f2a286b6b5c21d10e1393396e7f1a014aec4ca947
|
|
| MD5 |
f64b92f64e4ac786f6a8f7a856ea266b
|
|
| BLAKE2b-256 |
6733b6061ee6763f2883e8db3fd0145f40b32b8af6ae774fd4658c1c64e7ddf9
|
File details
Details for the file sentinel_gateway-0.2.1-py3-none-any.whl.
File metadata
- Download URL: sentinel_gateway-0.2.1-py3-none-any.whl
- Upload date:
- Size: 12.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dd62ca7019731ce72eff03aed0e136f18e3ff323ca91e57f2fde7bfd54b24f37
|
|
| MD5 |
39e4fb2c8a4c64a33e02092102490fc3
|
|
| BLAKE2b-256 |
1145f5efa079cefd79c3345a49872aaa63a09db5d01d40fdd5f085ed76d728a6
|