Skip to main content

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.

License: MIT Python 3.11+


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_URL and 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
Email 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

wiretaps.ai

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

wiretaps-0.4.3.tar.gz (175.2 kB view details)

Uploaded Source

Built Distribution

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

wiretaps-0.4.3-py3-none-any.whl (19.0 kB view details)

Uploaded Python 3

File details

Details for the file wiretaps-0.4.3.tar.gz.

File metadata

  • Download URL: wiretaps-0.4.3.tar.gz
  • Upload date:
  • Size: 175.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.17 {"installer":{"name":"uv","version":"0.9.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for wiretaps-0.4.3.tar.gz
Algorithm Hash digest
SHA256 d14559afe050db3a21c836c6431600ae491eaa63e23f38fd8d5cad59ec156cdf
MD5 fc54716259582b86e37f47050b59d879
BLAKE2b-256 6b3659e8ee0f3ddee2b3cafbdcde1d4798c3fa74a935fd2502cab7ba3bda0203

See more details on using hashes here.

File details

Details for the file wiretaps-0.4.3-py3-none-any.whl.

File metadata

  • Download URL: wiretaps-0.4.3-py3-none-any.whl
  • Upload date:
  • Size: 19.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.17 {"installer":{"name":"uv","version":"0.9.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for wiretaps-0.4.3-py3-none-any.whl
Algorithm Hash digest
SHA256 cb1da1f33ab60d5fab8382dbddfdaec67569154532f786bd312f1c6d9728513c
MD5 554e09aed3f6ea5e933cc794d10be2cf
BLAKE2b-256 d6f9236e9e6502a8035de7b13539cb1aa74a267e7bb439ca580fa54201f6a4b7

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