xinity-ai/xinity-ai
Tentang
The open-source AI platform for enterprises that can't send data to the cloud. OpenAI-compatible API, full management dashboard, zero data egress.
AI dan pembelajaran mesinPertumbuhan bintang terukur
- dalam 24 jam
- 0
- dalam 7 hari
- +1
- dalam 15 hari
- +3
- dalam 1 bulan
- Mengumpulkan riwayat
Perubahan bersih pada periode yang tumpang tindih, bukan total harian. Pengukuran yang belum tersedia dibiarkan kosong. Bintang menunjukkan perhatian, bukan kualitas.
README.md
Asli
Run AI where your data lives. No exceptions.
The open-source AI platform for enterprises that cannot send data to the cloud: not because of preference, but because of law, regulation, or trade secrets.

Deployed in production by regulated enterprises: media companies, manufacturers, and public institutions running AI on their own infrastructure with zero data egress.
Why Xinity exists
Cloud AI assumes your data can leave the building. For many enterprises, it can't, not without violating GDPR, banking secrecy, journalistic source protection, attorney-client privilege, or trade secret law. These organizations aren't cloud-skeptical. They're sovereignty-blocked.
Xinity gives them a complete AI platform: model orchestration, an OpenAI-compatible API, a management dashboard, data labeling and export for downstream fine-tuning, and multi-node scaling, that runs entirely on their own hardware. No data leaves. Not to a region. Not to a cloud. Not at all.
And it's cheaper. Cloud pricing assumes bursty ~15% utilization. Always-on AI agents run at 80–90%. At that utilization, dedicated on-prem infrastructure delivers roughly 80% cost savings compared to equivalent cloud capacity. Sovereignty isn't just a compliance requirement, it's an economic advantage. We call this phenomenon, the Utilization Inversion.
See it in action
# Install the CLI
curl -fsSL https://get.xinity.ai/install.sh | bash
# Set up everything (Postgres, inference engine, dashboard)
xinity up all # add --target-host to supply a ssh available server to operate on
# Create your admin account right from the terminal (no browser needed)
xinity configure dashboardUrl http://localhost:4030
xinity act onboarding.cli
# Deploy a model (Phi-3 Mini as a quick start example)
xinity act deployment.create '{"name": "Phi-3 Mini", "publicSpecifier": "phi-3-mini", "specifier": "phi-3-mini", "enabled": true}'
# Wait for the model to download and become ready
xinity act deployment.list '{"withStatus": true}'
# Check system health
xinity doctor
# Once the deployment shows "ready", hit your local OpenAI-compatible API:
curl http://localhost:4010/v1/chat/completions \
-H "Authorization: Bearer sk_..." \
-H "Content-Type: application/json" \
-d '{"model": "phi-3-mini", "messages": [{"role": "user", "content": "Hello from on-prem."}]}'
Your existing OpenAI SDK code works unchanged, just point the base URL to your Xinity instance.
How is this different?
| Xinity AI | Ollama | LocalAI | vLLM | |
|---|---|---|---|---|
| OpenAI-compatible API | ✅ | ✅ | ✅ | ✅ |
| Multi-model orchestration | ✅ | Partial (single host) | Partial (single host) | ❌ |
| Multi-GPU orchestration | ✅ | Partial (single host) | Partial | ✅ |
| Load balancing | ✅ | ❌ | Partial | Partial |
| Web dashboard with RBAC | ✅ | ❌ | Partial (two roles) | ❌ |
| Enterprise auth (SSO/2FA) | ✅ | ❌ | Partial (no 2FA) | ❌ |
| Multi-org tenant isolation | ✅ | ❌ | ❌ | ❌ |
| Usage tracking & data collection | ✅ | ❌ | Partial (token counts only) | ❌ |
| Fine-tuning / distillation pipeline | 🚧 (in progress) | ❌ | Partial (experimental) | ❌ |
| MCP server (AI-managed infra) | ✅ | ❌ | ❌ | ❌ |
| EU Governance & Audit trail | ✅ | ❌ | ❌ | ❌ |
| Fully auditable source code | ✅ | ✅ | ✅ | ✅ |
Xinity isn't a model runner: it's the full operations layer. Ollama and vLLM are excellent inference engines (Xinity uses them under the hood). Xinity adds everything else an enterprise needs to actually run AI in production: orchestration, access control, observability, and governance.
Performance under load
The gateway layer adds enterprise features. Does it cost you speed? We measured.

Setup: A single NVIDIA DGX Spark (128 GB), Qwen 3.6-35B-A3B-FP8, 120 benchmark scenarios sweeping prompt size (256 – 65 536 tokens), output length (64 – 2 048 tokens), and concurrency (1 – 512 in-flight requests), 31 200 requests per run. The Xinity path traverses the public internet, a WireGuard tunnel, and TLS termination (~60 IP hops); the vLLM baseline runs on loopback.
| Metric | Xinity gateway | Plain vLLM (loopback) |
|---|---|---|
| Time-to-first-token p50 / p95 (single stream) | 321 / 512 ms | 265 / 269 ms |
| Per-stream generation rate (p50) | 50.0 tok/s | 50.0 tok/s |
| Peak aggregate throughput | 352 tok/s | 325 tok/s |
| Max validated context length | 262 144 tokens | 262 144 tokens |
| Completion rate at 512 concurrent × 65k-token prompts | 85.0 % (870 / 1024) | 4.6 % (47 / 1024) |
Why the gateway is faster under load. The ~56 ms TTFT delta is just the network path; per-stream token rate is identical. Peak aggregate throughput is higher through the gateway because bounded request admission keeps vLLM's scheduler in its efficient operating range. Under sustained overload, bare vLLM emits malformed streaming chunks (stream_parse errors), the gateway's internal retry layer catches these and transparently re-dispatches before the client ever sees a failure. The result: 18× higher completion rate at extreme concurrency, which is the difference between a usable production system and one that falls over.
Full methodology & data
Both runs used identical benchmark harness code, identical hardware, and identical model weights. The only variable is the network path.- Xinity run:
dev-api.xinity.ai→ public internet → WireGuard → DGX Spark, 2026-05-09 12:18 – 2026-05-10 15:06 UTC - vLLM run:
localhost:11435→ loopback, 2026-05-10 20:04 – 2026-05-11 15:08 UTC - Scenarios: 5 input sizes × 3 output sizes × 8 concurrency levels = 120
- Requests per scenario: 32 – 1024 (scaled with concurrency), 31 200 total per run
Full per-scenario reports and aggregate summaries are in
benchmarks/.
Architecture
┌──────────────────────────────────────────────────────────────┐
│ Your Infrastructure │
│ │
│ ┌──────────────┐ ┌──────────────┐ ┌────────────────┐ │
│ │ Dashboard │◄──►│ Gateway │◄──►│ Daemon(s) │ │
│ │ (SvelteKit) │ │ (API proxy) │ │ (GPU nodes) │ │
│ │ │ │ │ │ │ │
│ │ • RBAC │ │ • OpenAI- │ │ • Ollama / │ │
│ │ • SSO/OIDC │ │ compat. │ │ vLLM │ │
│ │ • Usage │ │ • Routing │ │ • Model mgmt │ │
│ │ tracking │ │ • Rate │ │ • Auto-scale │ │
│ │ • MCP │ │ limiting │ │ │ │
│ └──────┬───────┘ └──────┬───────┘ └───────┬────────┘ │
│ │ │ │ SSE │
│ │ │ ┌─────▼────────┐ │
│ │ │ │ Tether │ │
│ │ │ │ (SSE bridge) │ │
│ │ │ └─────┬────────┘ │
│ └─────────┬─────────┘────────────────────┘ │
│ │ │ │
│ ┌─────▼──────┐ ┌───────▼────────┐ │
│ │ PostgreSQL │ │ Infoserver │ │
│ │ + Redis │ │ (model schema) │ │
│ └────────────┘ └────────────────┘ │
│ │
│ Nothing leaves this box. │
└──────────────────────────────────────────────────────────────┘
For a detailed architecture walkthrough, see docs/architecture.md.
Feature Documentation
Detailed guides for each part of the platform:
| Guide | Covers |
|---|---|
| Gateway | Load balancing, canary deployments, request recording, Responses API, web search, image storage, TLS, backend timeouts |
| Dashboard | Home analytics, Model Hub, data management, labeling, export, onboarding |
| Authentication & Authorization | Email/password, SSO (OIDC), passkeys, 2FA, API keys, RBAC roles |
| Instance Administration | User management, organization management, SSO providers, licensing |
| Audit Trail | Recorded actions, transport channel, access gates, export, Loki forwarding |
| Notifications | Email alerts for deployments, node health, capacity, weekly reports |
| CLI | All commands (up, rm, doctor, act, configure, update, completion), remote host support, infrastructure utilities |
| Daemon | GPU auto-detection, model installation (Ollama/vLLM), cache eviction, GPU metrics, run-model script |
| Tether | SSE bridge between daemons and the database, desired-state streaming, status collection, liveness tracking |
| Monitoring | Prometheus metrics (all services), Grafana dashboards, service discovery |
| Model Registry | Infoserver API, model definition schema, registry composition, tag resolution |
| Reverse proxy | nginx and Caddy templates, streaming and upload requirements, rate limiting, protecting /metrics |
| Verifying releases | Signed checksums and container images, what the CLI and install scripts check, verifying by hand with cosign |
| Vulnerability handling | Triage, CRA reporting deadlines, informing users, fixes and advisories, records |
Quick start (local development)
1. Ensure requirements are installed
Before starting, make sure all requirements are installed. See Requirements.
2. Install dependencies
# Clone and install dependencies
git clone https://github.com/xinity-ai/xinity-ai.git
cd xinity-ai
bun install
The postinstall hook sets up git commit hooks (commitlint).
3. Create .env files from examples
# Initialize .env files from examples (won't overwrite existing)
find . -name 'example.env' -not -path '*/node_modules/*' | while read -r f; do
target="${f%/example.env}/.env"
[ -f "$target" ] || cp "$f" "$target"
done
This copies each example.env to .env without overwriting existing files. The values work as-is for local development against the Docker Compose services below; review and adjust only if your setup differs.
4. Start infrastructure
docker compose up -d
This starts Postgres, Redis, and Mailhog. To also start optional services (SearXNG for web search, SeaweedFS for S3 storage), use docker compose --profile full up -d.
Verify services are healthy: docker compose ps
5. Run database migrations
bun run --cwd packages/common-db migrate
6. Start the infoserver
bun run --cwd packages/xinity-infoserver dev
The infoserver must be running before the gateway, dashboard, or daemon can start. See the service dependency table below.
7. Start the package you want to work on
See Package details below for per-package dev commands.
Service dependencies
| Service | Requires running |
|---|---|
| Infoserver | nothing (standalone) |
| Gateway | Postgres, Infoserver, and Redis when REDIS_URL is set |
| Dashboard | Postgres, Infoserver, Mailhog (for auth emails) |
| Daemon | Postgres, Infoserver, Ollama or vLLM |
Start order: infrastructure (step 4) → migrations (step 5) → infoserver (step 6) → other services (step 7).
Requirements
Bun ≥ 1.3 (build, package manager, and runtime)
Install:curl -fsSL https://bun.sh/install | bashVerify:
bun -vIf
bunis not available after installation on macOS/zsh, restart your terminal or add Bun to your shell PATH:export BUN_INSTALL="$HOME/.bun" export PATH="$BUN_INSTALL/bin:$PATH"Docker with Compose (local dependencies and container builds)
Install Docker with Compose. On macOS and Windows, this is most commonly done via Docker Desktop. On Linux, Docker Engine with the Compose plugin is enough.Verify:
docker --version docker compose versiondirenv (recommended for env var loading)
Install on macOS:brew install direnvInstall on Debian/Ubuntu:
sudo apt install direnvVerify:
direnv --version
Each package reads its own .env file. There is no automatic inheritance from the repo root. The root .env is only used by system tests (bun run test:system), which need DB_CONNECTION_URL and REDIS_URL.
Each package's example.env is the authoritative source for its variables. Copy it to .env and adjust values.
Key variables by package:
| Variable | Gateway | Dashboard | Daemon | Infoserver |
|---|---|---|---|---|
DB_CONNECTION_URL |
yes | yes | yes | no |
REDIS_URL |
optional | no | no | no |
INFOSERVER_URL |
yes | yes | yes | no |
BETTER_AUTH_SECRET |
no | yes | no | no |
MAIL_URL / MAIL_FROM |
no | yes | no | no |
S3_* |
optional | optional | no | no |
direnv (optional)
If you use direnv, create a .envrc in each package directory you work in:
# e.g. packages/xinity-ai-gateway/.envrc
dotenv
Run direnv allow in that directory after creating the file.
Deployment
Three production deployment routes, all documented with step-by-step guides:
| Route | Best for | Guide |
|---|---|---|
| Xinity CLI ⭐ | Any Linux server with systemd | deployment/cli/ |
| Docker Compose | Servers with Docker, or cloud VMs | deployment/docker/ |
| NixOS Flake | NixOS infrastructure | deployment/nixos/ |
Note: The daemon must always run on machines with GPU capacity. Even in Docker or NixOS deployments, the daemon is installed separately on each inference node via the CLI.
See the full Deployment Guide for the decision tree and multi-node setup.
Accessing a running instance
All programmatic access uses dashboard API keys (Settings → API Keys in the dashboard).
OpenAI-compatible API
Point any OpenAI SDK or tool at your gateway:
from openai import OpenAI
client = OpenAI(
base_url="https://your-gateway/v1",
api_key="sk_..."
)
response = client.chat.completions.create(
model="qwen3.5",
messages=[{"role": "user", "content": "Summarize this contract."}]
)
The gateway serves a live, schema-derived API reference at https://your-gateway/docs (rendered with Scalar) and the raw OpenAPI document at https://your-gateway/openapi.json. The dashboard's Documentation page links to it as Live OpenAPI Spec.
Dashboard UI
Web-based admin for managing models, API keys, organizations, and reviewing recorded LLM calls.
REST API
Every dashboard operation is available programmatically:
curl -H "x-api-key: sk_..." https://your-dashboard/api/deployment
Full API docs live at https://your-dashboard/api/ with an OpenAPI schema at /api/openapi.json.
MCP Server
Let AI assistants (Claude, Cursor, etc.) manage your infrastructure via natural language:
{
"mcpServers": {
"xinity-ai": {
"url": "https://your-dashboard/mcp",
"headers": { "Authorization": "Bearer sk_..." }
}
}
}
CLI
xinity up all # install / configure services
xinity act onboarding.cli # create admin account from the terminal
xinity act --list-routes # see all available API operations
xinity doctor # check system health
xinity update # update the CLI itself
Repo layout
packages/
├── common-db/ # Shared DB schema, migrations (Drizzle ORM)
├── common-env/ # Shared env validation (Zod)
├── common-log/ # Shared Pino logger
├── xinity-ai-gateway/ # API gateway (OpenAI-compatible proxy)
├── xinity-ai-dashboard/ # SvelteKit admin dashboard
├── xinity-ai-daemon/ # Model runtime agent (runs on GPU hardware)
├── xinity-tether/ # SSE bridge between daemons and database ([README](packages/xinity-tether/README.md))
├── xinity-cli/ # Operator CLI
└── xinity-infoserver/ # Model registry + YAML server ([model authoring guide](packages/xinity-infoserver/README.md))
Licensing
| Component | License | You can... |
|---|---|---|
| Gateway, Daemon, Tether, CLI, Infoserver, DB schema, shared libs | Apache 2.0 | Use, modify, distribute freely — including commercially |
| Dashboard | Elastic License v2 | Use and view source. Free tier: up to 120 GB total VRAM across your cluster. Paid tiers unlock higher/unlimited capacity and multi-org |
The entire codebase is visible and auditable. The open-core engine runs without the dashboard, the dashboard adds enterprise management features on top.
Troubleshooting
bun: command not found
Install Bun from bun.sh. This project requires Bun >= 1.3.
docker compose fails or Docker not found
Install Docker Engine with the Compose plugin (or Docker Desktop).
Port already in use (5432, 6379, etc.)
Another process is using that port. Check with lsof -i :5432 and stop the conflicting process, or adjust ports in compose.yaml.
Migration fails with connection error
Ensure Docker Compose is running (docker compose ps). The db service must be healthy before running migrations.
BETTER_AUTH_SECRET error on dashboard startup
The dashboard has no .env. Re-run step 3 to create it from example.env.
Git hook setup fails during install
The root postinstall script uses simple-git-hooks to install the commit-message and pre-commit hooks. Run CI=1 bun install to skip this hook setup.
For local development, install the hooks after dependencies are installed with bunx simple-git-hooks@2.
Licensing FAQ
Can I use it for free? Yes. The engine (gateway, daemon, CLI, infoserver, DB layer) is Apache 2.0 with no restrictions. The dashboard free tier supports a single organization with up to 120 GB of total VRAM across your cluster, enough to evaluate or run smaller deployments.
Can I audit the system? Yes. Every line of code is here and intended to be auditable. That's the point.
What does the paid dashboard unlock? Multi-node orchestration (2, 6, 20+ nodes), multi-org tenant isolation, and additional enterprise features. Pricing starts with an affordable startup tier.
Contributing
We'd love your help. Whether it's bug reports, documentation improvements, or new features, contributions are welcome.
# Good places to start:
# 1. Issues labeled "good first issue"
# 2. Documentation gaps you notice while setting up
# 3. Integrations with inference engines beyond Ollama/vLLM
Please read CONTRIBUTING.md before opening a PR. It covers scope, review expectations, and how to propose changes.
Join the community: Discord · Discussions
Roadmap
See the public roadmap for what's coming next. Key areas:
- 🔬 Distributed split inference (MoE across nodes with privacy-preserving encoding)
- 🔄 One-click migration from OpenAI / Azure OpenAI
- 📊 Advanced usage analytics and cost attribution
- 🇪🇺 EU compliance reporting templates (GDPR, EU AI Act, NIS2, ...)
Security
To report a vulnerability, follow the process in SECURITY.md. Do not open a public issue.
Common workflows
Click to expand
# Local dependencies
docker compose up -d # start
docker compose down # stop
docker compose down -v # reset (drop all state)
# Database
cd packages/common-db
bun run migrate # apply migrations
bun run migrate:gen # regenerate migrations
bun run inspect # inspect schema
# System tests only (requires running dependencies)
bun run test:system
Docker Compose services
| Service | Port | Purpose |
|---|---|---|
db |
5432 | PostgreSQL 17 |
redis |
6379 | Redis 7 |
mailhog |
1025 / 8025 | Local SMTP + UI |
searxng |
6148 | Web search |
seaweedfs |
8333 | S3-compatible storage |
Testing
Tests use Bun's built-in test runner. Most packages define a test script in their package.json:
bun run test:system # system integration tests (requires DB + Redis)
Per-package tests can be run from within the package directory:
cd packages/xinity-ai-gateway && bun run test
cd packages/xinity-cli && bun run test
Dashboard tests have additional prerequisites. See the dashboard README for details.
Contracts are paper. Infrastructure is reality.
Built in Vienna. Open to the world.
Jelajahi proyek terkait
Memuat…