Architecture
Turen runs entirely on your infrastructure. Each developer’s Mac gets a lightweight agent, and your organization’s data stays under your control.
The Proxy
The Turen proxy is a local HTTP server that sits between Claude Code and the Anthropic API. When Claude Code makes an API call, the proxy:- Evaluates security rules: checks for dangerous commands, prompt injections, and secrets.
- Injects policy rules: adds organization-specific instructions to the LLM prompt if configured.
- Forwards the request to the Anthropic API.
- Captures telemetry: records token counts, latency, model, and cost data.
- Returns the response to Claude Code.
managed-settings.json: setting environment variables, proxy routing, and hooks. No manual setup required.
The Daemon
The Turen daemon is a background service that handles everything else:- Registration: one-time setup that links the Mac to your organization.
- Policy sync: periodically fetches the latest rules from your Turen dashboard.
- Check-ins: sends heartbeats so the dashboard knows which agents are online.
- Session collection: scans for Claude Code session files and uploads them encrypted.
- Proxy supervision: monitors the proxy process and restarts it if needed.
Security Rules
Turen ships with 96 built-in rules across three categories:| Category | Count | What it catches |
|---|---|---|
| Command Validation | 61 | Dangerous shell commands (rm -rf /, DROP TABLE, kubectl delete, etc.) |
| Prompt Injection | 20 | Attempts to override agent instructions via malicious input |
| Secret Detection | 15 | API keys, credentials, and sensitive files in prompts or outputs |
Session Recording
Every Claude Code session is automatically recorded and uploaded to your Turen organization. Sessions capture:- All user messages and assistant responses
- Tool invocations and their results
- Token usage and timing data