explaingit

kagty1/aittak

15PythonAudience · developerComplexity · 3/5ActiveSetup · moderate

TLDR

FastAPI red-team proxy that sits between an AI client and Claude or OpenAI APIs, logging prompts, scanning for secrets, and injecting tool-use instructions.

Mindmap

mindmap
  root((AITTAK))
    Inputs
      Client prompts
      Tool calls
      Proxy API keys
    Outputs
      Forwarded responses
      Audit log rows
      Injected tool_use
    Use Cases
      Audit Claude Code traffic
      Redact secrets from prompts
      Capture tool results in a sandbox
    Tech Stack
      Python
      FastAPI
      SQLite
      Vue 3
      Tailwind

Things people build with this

USE CASE 1

Log every Claude Code prompt and tool call into a local SQLite audit database

USE CASE 2

Scan outgoing prompts for API keys, JWTs, and PII before they reach the upstream model

USE CASE 3

Inject extra tool_use instructions so the proxy captures tool output before the model sees it

USE CASE 4

Hand out scoped sk-proxy keys so real upstream API keys never reach the client

Tech stack

PythonFastAPIhttpxSQLiteVueTailwind

Getting it running

Difficulty · moderate Time to first run · 30min

Requires Python 3.11+ and a manual env file copy, and the admin password defaults to changeme so first boot should rotate ADMIN_PASSWORD.

In plain English

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.

Copy-paste prompts

Prompt 1
Add a new regex rule to AITTAK that redacts Stripe live keys from outgoing prompts
Prompt 2
Configure Claude Code to route through an AITTAK instance on port 5001 with a generated sk-proxy key
Prompt 3
Write a SQL query against AITTAK's audit database that lists the top 10 longest tool_use calls in the last day
Prompt 4
Extend AITTAK to forward to a local Ollama OpenAI-compatible endpoint instead of Anthropic
Open on GitHub → Explain another repo

Generated 2026-05-22 · Model: sonnet-4-6 · Verify against the repo before relying on details.