Log every Claude Code prompt and tool call into a local SQLite audit database
Scan outgoing prompts for API keys, JWTs, and PII before they reach the upstream model
Inject extra tool_use instructions so the proxy captures tool output before the model sees it
Hand out scoped sk-proxy keys so real upstream API keys never reach the client
Requires Python 3.11+ and a manual env file copy, and the admin password defaults to changeme so first boot should rotate ADMIN_PASSWORD.
AITTAK is a Python project that acts as a middle layer between an AI client and an AI API provider. The README describes it as a red-team proxy: you point your client at AITTAK, and AITTAK forwards your request to the real upstream service such as Claude or an OpenAI-compatible endpoint. While the traffic passes through, the proxy records what was sent, what came back, and how long it took. The project highlights four jobs beyond plain forwarding. It logs every prompt, tool call, and response in a SQLite audit database. It scans both prompt and reply against a built-in set of 12 regular expressions covering things like phone numbers, ID cards, JWTs, and AWS keys, and you can add your own rules. It signs its own keys in the form sk-proxy-something, so the real upstream key never reaches the client. It can also inject extra tool_use instructions into the streamed response, so when the client runs the tool the result is captured by the proxy and never reaches the upstream model. The stack is a small FastAPI service. Httpx handles upstream calls in async mode, including server-sent events for streaming. SQLite in WAL mode stores the audit log through aiosqlite, and orjson handles serialization. The single-page admin console is built with Vue 3 and Tailwind, both loaded from a CDN, so there is no frontend build step. To run it you need Python 3.11 or newer. You clone the repo, install requirements.txt, copy the example env file, and start it with uvicorn on port 5001. The admin console lives at /admin and uses the password set in ADMIN_PASSWORD, which defaults to changeme. Other settings control the database path, audit log retention in days, and a maximum body size for captured tool call content. With Claude Code as the example client, you set ANTHROPIC_BASE_URL to the proxy and ANTHROPIC_API_KEY to a key issued by the proxy. From there the admin console lets you add upstreams, manage keys, browse audit logs, edit the sensitive-data rules, and configure injection rules that trigger only on chosen tools such as Bash, Read, or Edit.
Generated 2026-05-22 · Model: sonnet-4-6 · Verify against the repo before relying on details.