See what your AI agents are sending to LLMs. MitM proxy for auditing, PII detection, and compliance.
Project description
๐ wiretaps
See what your AI agents are sending to LLMs.
A transparent MitM proxy for auditing AI agent traffic. Logs every prompt, response, and tool call. Auto-detects PII, credentials, and crypto wallet addresses.
Why?
AI agents have access to your emails, files, and credentials. But do you know what they're actually sending to OpenAI, Anthropic, or other LLM APIs?
wiretaps sits between your agent and the LLM, giving you complete visibility:
โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ
โ AI Agent โโโโโโถโ wiretaps โโโโโโถโ LLM API โ
โ (any agent) โ โ โ โ (OpenAI,..) โ
โโโโโโโโโโโโโโโ โโโโโโโโฌโโโโโโโโ โโโโโโโโโโโโโโโ
โ
โผ
๐ Audit Logs
๐จ PII Alerts
๐ Dashboard
Features
- ๐ Full Visibility โ Log every prompt, response, and tool call
- ๐จ PII Detection โ Auto-detect emails, phone numbers, SSNs, credit cards
- โฟ Crypto Detection โ Flag wallet addresses, private keys, seed phrases
- ๐ Live Dashboard โ Terminal UI to monitor traffic in real-time
- ๐ Zero Code Changes โ Just set
OPENAI_BASE_URLand go - ๐ Self-Hosted โ Your data never leaves your machine
- ๐ฆ SQLite Default โ Zero dependencies, instant setup
Quick Start
# Install
pip install wiretaps
# Start the proxy
wiretaps start
# Point your agent to the proxy
export OPENAI_BASE_URL=http://localhost:8080/v1
# Run your agent as usual
python my_agent.py
# View logs
wiretaps logs
Dashboard
wiretaps dashboard
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ wiretaps v0.1.0 Requests: 1,234 โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ 14:23:01 โ POST /chat/completions โ 1,200 tk โ โ ๏ธ PII: email โ
โ 14:22:58 โ POST /chat/completions โ 856 tk โ โ clean โ
โ 14:22:45 โ POST /chat/completions โ 2,100 tk โ โ ๏ธ PII: phone โ
โ 14:22:30 โ POST /embeddings โ 128 tk โ โ clean โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
PII Detection
wiretaps automatically scans for sensitive data:
| Pattern | Example |
|---|---|
user@example.com |
|
| Phone | +1 (555) 123-4567 |
| SSN | 123-45-6789 |
| Credit Card | 4111-1111-1111-1111 |
| CPF (Brazil) | 123.456.789-00 |
| BTC Address | bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh |
| ETH Address | 0x71C7656EC7ab88b098defB751B7401B5f6d8976F |
| Private Key | 0x... (64 hex chars) |
| Seed Phrase | 12/24 BIP-39 words |
Add custom patterns:
# ~/.wiretaps/patterns.yaml
patterns:
- name: internal_id
regex: "INTERNAL-[A-Z]{3}-[0-9]{6}"
severity: high
Supported LLM APIs
- โ
OpenAI (
api.openai.com) - โ
Anthropic (
api.anthropic.com) - โ Azure OpenAI
- โ Google AI (Gemini)
- โ Local models (Ollama, vLLM, etc.)
- โ Any OpenAI-compatible API
Configuration
# Generate default config
wiretaps init
# Edit config
vim ~/.wiretaps/config.yaml
# ~/.wiretaps/config.yaml
proxy:
host: 127.0.0.1
port: 8080
storage:
type: sqlite # or postgresql
path: ~/.wiretaps/logs.db
pii:
enabled: true
patterns:
- email
- phone
- credit_card
- crypto_address
# Auto-redact before sending to LLM (enterprise)
redact: false
alerts:
# Webhook on PII detection
webhook: https://your-server.com/alerts
Use Cases
Compliance & Audit
Keep audit logs of all AI interactions for GDPR, LGPD, SOC2 compliance.
Security Review
Ensure your agents aren't leaking credentials, API keys, or sensitive data.
Crypto/Fintech
Detect wallet addresses and private keys before they reach external APIs.
Development
Debug exactly what your agent is sending without modifying code.
Integrations
Clawdbot
# clawdbot.yaml
llm:
baseUrl: http://localhost:8080/v1
LangChain
from langchain_openai import ChatOpenAI
llm = ChatOpenAI(
base_url="http://localhost:8080/v1"
)
Any OpenAI SDK
import openai
client = openai.OpenAI(
base_url="http://localhost:8080/v1"
)
Enterprise
Self-hosted open source not enough? wiretaps Enterprise adds:
- ๐ Web dashboard with auth
- ๐ SSO (SAML, OIDC)
- ๐ฅ RBAC (role-based access)
- ๐ Compliance reports (LGPD, GDPR, SOC2)
- ๐ Alerts (Slack, email, webhook)
- โ๏ธ Managed hosting option
Contact: hello@wiretaps.ai
Contributing
Contributions welcome! See CONTRIBUTING.md.
# Clone
git clone https://github.com/marcosgabbardo/wiretaps
cd wiretaps
# Install dev dependencies
pip install -e ".[dev]"
# Run tests
pytest
# Run linter
ruff check .
License
MIT โ use it however you want.
Built with ๐ by @marcosgabbardo
Project details
Release history Release notifications | RSS feed
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 wiretaps-0.3.0.tar.gz.
File metadata
- Download URL: wiretaps-0.3.0.tar.gz
- Upload date:
- Size: 18.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ed7e51558289050e70b923445b2543eca4c31c14d9012fee0978386b1843a389
|
|
| MD5 |
b00c7e2a1cf765cfcbdc19ae983e789d
|
|
| BLAKE2b-256 |
12b9e62fbfc1f7cf5b2881548ebb63dade9341e144066d20083f932a6290b080
|
File details
Details for the file wiretaps-0.3.0-py3-none-any.whl.
File metadata
- Download URL: wiretaps-0.3.0-py3-none-any.whl
- Upload date:
- Size: 16.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cd851f1645daa8c9823f2171ba73d2eca19c76922bd744c59ff80638cf93ed4e
|
|
| MD5 |
a201208d9aeb2eafb11d39f033a06b9a
|
|
| BLAKE2b-256 |
fb3169666baacfb7a809f18d4b5a84070a87971f49418e7cf546301efb8f84af
|