Identity, governance, and forensic accountability for AI agents.
AI Identity is the identity, governance, and forensic infrastructure that enterprises need to deploy AI agents with confidence. Each agent gets a cryptographic identity, enforceable policies, compliance-ready audit logs, and tamper-evident forensic trails.
| URL | |
|---|---|
| Dashboard | ai-identity.co |
| API Docs | api.ai-identity.co/docs |
AI Identity provides a drop-in LangChain integration, available as a standalone PyPI package:
pip install langchain-ai-identityfrom langchain_ai_identity import create_ai_identity_agent
agent = create_ai_identity_agent(
tools=[...],
agent_id="<your-agent-uuid>",
ai_identity_api_key="aid_sk_...",
openai_api_key="sk-...",
)
result = agent.invoke({"input": "What is the latest news on AI safety?"})Every LLM call is authenticated, policy-checked, and logged with a tamper-evident audit trail. See the langchain-ai-identity PyPI page for full documentation.
Auditors and incident responders can verify audit chain integrity offline — no network access or vendor trust required:
python3 cli/ai_identity_verify.py chain export.jsonThe CLI is a single-file, zero-dependency Python script that independently verifies HMAC-SHA256 hash chains exported from AI Identity.
ai-identity/
├── api/ # FastAPI API server — identity service, admin API (port 8001)
├── gateway/ # FastAPI proxy gateway — request routing & policy enforcement (port 8002)
├── common/ # Shared code — DB models, auth, config, schemas
├── dashboard/ # React + TypeScript + Tailwind — agent management UI
├── sdk/ # Client SDKs — Python, TypeScript, LangChain integration
├── cli/ # Offline forensic verification CLI
├── alembic/ # Database migrations
├── scripts/ # Dev scripts — seed data, migrations
└── pyproject.toml
- Identity Service (
api/) — Agent CRUD, API key issuance (aid_sk_prefix), key rotation, capabilities management - Proxy Gateway (
gateway/) — Authenticates agent keys, evaluates policies, forwards or blocks requests, logs decisions - Shared Library (
common/) — SQLAlchemy models, Pydantic schemas, auth utilities, config — imported by both api/ and gateway/ - Dashboard (
dashboard/) — React SPA for agent management, policy editor, live traffic feed, spend charts - SDKs (
sdk/) — Python and TypeScript client libraries, plus the LangChain integration - Forensic CLI (
cli/) — Standalone offline audit chain verifier for DFIR and compliance
git clone https://github.com/Levaj2000/AI-Identity.git
cd AI-Identity
make setup # generates .env with security keys
make up # builds and starts api + gateway + postgresServices start at localhost:8001 (API), localhost:8002 (Gateway).
Run make help to see all available commands (migrate, seed, logs, shell, etc.).
Prerequisites: Python 3.11+, Node.js 18+, PostgreSQL
# 1. Create virtual environment
python -m venv .venv
source .venv/bin/activate
# 2. Install dependencies
pip install -r api/requirements.txt
pip install -r gateway/requirements.txt
pip install -e common/
# 3. Copy environment variables
cp .env.example .env
# Edit .env with your database URL and secrets
# 4. Start the API server (port 8001)
uvicorn api.app.main:app --reload --port 8001
# 5. Start the gateway (port 8002) — in a separate terminal
uvicorn gateway.app.main:app --reload --port 8002cd dashboard
cp .env.example .env # defaults to localhost:8001 API
npm install && npm run devThe dashboard is deployed to ai-identity.co via Vercel. PR preview deploys are automatic.
# All tests
pytest
# API tests only
pytest api/tests/
# Gateway tests only
pytest gateway/tests/Agent API keys use the aid_sk_ prefix with SHA-256 hashed storage and a show-once pattern. Keys are only displayed once at creation time.
Key rotation supports a 24-hour grace period — both old and new keys work during the transition.
- Backend: Python 3.11, FastAPI, SQLAlchemy, Alembic, Pydantic
- Database: PostgreSQL (Neon)
- Frontend: React 19, TypeScript, Vite, Tailwind CSS
- Forensics: HMAC-SHA256 hash-chained audit logs, offline CLI verifier
- Integrations: LangChain (PyPI)
- CI/CD: GitHub Actions, Ruff (lint + format), pytest (427+ tests)
- Deployment: GKE Autopilot (API + Gateway), Vercel (Dashboard), GitHub Actions CI/CD with Cloud Build
Proprietary — All rights reserved.