Enterprise LLM gateway

One gateway.
Full control over every model call.

Give Pi, Codex CLI, Claude Code and GitHub Copilot CLI a single governed endpoint. Short-lived tokens on the client, encrypted provider keys on the server, and token analytics plus approvals for every request.

AIControl dashboard showing token trends, request counts and approval rate
4coding agents, one endpoint
4API protocols proxied natively
0provider keys on the client
100%metadata-only telemetry by default
Why AIControl

Usage tells you how much. You need to know how.

API keys expose spend, not behavior. Locking everyone into a single tool is rarely the answer either — teams do their best work when they can choose the agent that fits the task.

🧭

Keep the tools teams love

Pi, Codex CLI, Claude Code and GitHub Copilot CLI connect through native adapters — no forced IDE or workflow change.

🧾

Audit the work, not just the bill

Every request is attributed to a user, project, session, model and client, with tool-call and approval metadata captured at the edge.

🔑

One identity, not a shared key

Console SSO and CLI device-code login issue short-lived tokens that can be revoked per person or device.

Capabilities

Governance without slowing agents down

Everything an enterprise needs to observe, attribute and constrain coding-agent traffic — without changing the protocols your tools already speak.

🔐

Zero client-side keys

Clients receive short-lived gateway tokens only; upstream base URLs and API keys stay encrypted server-side.

🔀

Protocol-preserving proxy

OpenAI Chat Completions / Responses, Anthropic Messages and Google Generative AI pass through unchanged.

📦

Provider + model catalog

Import from models.dev and bind each public model to exactly one upstream channel. No routing tables.

📊

Per-project token analytics

Input, output, cache-read and cache-write tokens attributed to user, project, session and model.

🪪

Feishu SSO + device flow

Console SSO and CLI device-code login share one Feishu app, with a dev login for local demos.

🛡️

Approval governance

Risk-classified tool calls with approve / deny / policy decisions, aggregated per user, project and tool.

🎯

Automatic attribution

Plugins report project key, name and Git repository; projects and members are created on first sight.

⚙️

Quotas & policies

Daily and monthly quotas, model allowlists, approval rules and rate-limit policies per user or project.

Product tour

A console built for operators

From real-time token trends to per-user approvals — every screen is backed by the same gateway telemetry.

Architecture

One hop, no protocol rewriting

Agents talk to the gateway through their native APIs. The gateway resolves the public model, applies policy, forwards once, and records usage from the upstream response.

Picoding agent
Codex CLIaic-codex
Claude Codeaic-claude
Copilot CLIaic-copilot
↓
AIC CLI + adaptersshort-lived token · project headers
→
Gateway /gw/*policy · quota · usage parsing
→
OpenAIchat / responses
Anthropicmessages
Googlegenerative AI
↓
React consoleMUI · charts
→
Admin & plugin APIsJWT · cookie · CSRF
→
SQLite + EF Coreusage · telemetry · audit

Secrets are encrypted at rest; telemetry stores metadata only — never prompts, code or command text.

FAQ

Questions teams ask first

What is AIControl?

AIControl is a self-hosted LLM gateway and AI usage audit platform. It sits between coding agents and model providers, adding unified identity, per-project attribution and approval telemetry.

Do teams have to switch coding tools?

No. Pi, Codex CLI, Claude Code and GitHub Copilot CLI keep their native workflows. Adapters only inject the gateway endpoint, a short-lived token and attribution headers.

What can be audited beyond token counts?

Who made each request, which project, session, model and client it belongs to, plus tool-call risk and approval decisions. Prompts, code and command text are not captured by default.

Which providers and clients are supported?

Any OpenAI Chat Completions/Responses, Anthropic Messages or Google Generative AI compatible endpoint, plus Pi, Codex CLI, Claude Code and GitHub Copilot CLI.

Quick start

From clone to first governed request

Requires .NET 10 SDK and Node.js 20+. SQLite and demo data are created automatically.

1Run the backend

Starts the gateway, admin API and bundled console on port 5080.

dotnet run --project src/AIControl.Server --urls http://localhost:5080

2Sign in

Open the console and use the demo account, or configure Feishu SSO.

http://localhost:5080
admin@aic.local  # demo login

3Install the CLI

Build the plugin package and expose aic / aic-copilot / aic-codex / aic-claude.

cd plugins/aic-gateway
npm install && npm run build
npm install -g .

4Connect an agent

Device-code login, choose a default model, then launch your agent.

aic login
aic model set step-3.7-flash
aic-copilot   # or aic-codex / aic-claude

Windows: if global install needs a writable prefix, add --prefix "$env:APPDATA\npm". Pi loads the extension automatically after installation.

Clients

Bring the agent you already use

Each adapter keeps the client's native configuration model and adds only what AIControl needs.

Pipi

Extension-based provider, approval hooks and session telemetry.

Codex CLIaic-codex

Injects a dedicated profile with gateway base URL and attribution headers.

Claude Codeaic-claude

Sets Anthropic base URL / token and registers approval hooks.

Copilot CLIaic-copilot

BYOK provider with a fresh token per request and project headers.

⭐ Star AIControl

If this project is useful or interesting, a star helps more people discover it — and tells us to keep shipping.

Star on GitHub Browse the code

Contact: powertle@outlook.com