selfhost.directory

The index of self-hostable projects — ranked, categorized and served with live updates.
Own your data and stop giving it to big tech.

Ailin¹ Collective Intelligence logo

Self-host Ailin¹ Collective Intelligence

0.1.0

Collective intelligence engine for thousands of AI models

AlphaOpen SourceAGPL-3.0
Updated6 days ago
LanguageTypescript
Setup difficultyAdvanced
Stars
221
RAM
~8 GB free RAM
Ports
3000 (API server), 8090 (Coordination service)
Requires
Coordination Service (coord-serving), PostgreSQL with pgvector, Redis, Redis Global
Install with Docker Compose

What is Ailin¹ Collective Intelligence?

Ailin¹ Collective Intelligence is an open-source platform that indexes over 100,000 discoverable AI model identifiers and coordinates them through 31 registered collective strategies. Instead of routing to a single model, it activates multiple models to reason independently, cross-check, and synthesize answers — using structured diversity to improve reliability and auditability. The system includes a deterministic verifier that short-circuits collective execution on objectively verifiable tasks such as math problems, code with tests, structured extraction, and factual QA, achieving 97% accuracy (37/38) against 68–82% for individual frontier models. Every response carries full decision provenance (strategy used, models invoked, per-subcall cost and latency) via an ailin_metadata block. The API is drop-in OpenAI-compatible (chat/completions, responses, embeddings, models). It runs via Docker Compose with PostgreSQL (pgvector), Redis, and a coordination service, requiring ~8 GB RAM. A local-first mode using Ollama allows fully self-hosted operation without external API keys. The project is licensed AGPL-3.0-or-later and maintained by Ailin One, Inc.

Should you self-host Ailin¹ Collective Intelligence?

Ailin¹ Collective Intelligence scores 44/100 on selfhost.directory (how scoring works) and ranks #80 of 125 in AI. It has 221 GitHub stars.

There was no stable release in the past 12 months, so check the repository's recent activity before you rely on it.

Setup is advanced: plan for several services and some ongoing maintenance. It is AGPL-3.0-licensed and written mostly in Typescript.

Its closest alternative on selfhost.directory is ComfyUI (93/100, 143 714 stars). It scores higher overall, so compare the two before you pick. See Ailin¹ Collective Intelligence vs ComfyUI side by side.

Features

  • AGPL §13 Compliance Endpoints
  • Batch Processing
  • Collective Intelligence Orchestration
  • Continuous Model Discovery
  • Cost Governance
  • Fine Tuning
  • Full Decision Provenance
  • Function Calling / Tools
  • Local-First Mode (Ollama)
  • Multi-modal support
  • OpenAI Compatible API
  • RAG (Retrieval-Augmented Generation)
  • Streaming Responses
  • Tenant Isolation & Quotas
  • Verifiable Consensus with Deterministic Verifier

Ailin¹ Collective Intelligence README

How to install Ailin¹ Collective Intelligence

Install Ailin¹ Collective Intelligence with Docker Compose

Environment variables
JWT_SECRET, AILIN_SHARED_JWT_SECRET, SECRETS_PROVIDER_PRIMARY, OPENAI_API_KEY (or OLLAMA_URL for local-first)

git clone https://github.com/ailinone/collective-intelligence.git cd collective-intelligence/docker cat > .env <<EOF

strong JWT secrets are REQUIRED — the app refuses weak/default values

JWT_SECRET=$(openssl rand -base64 48) AILIN_SHARED_JWT_SECRET=$(openssl rand -base64 48)

local-first secrets: skip GCP Secret Manager entirely

SECRETS_PROVIDER_PRIMARY=env

one provider key is the minimum — any of the ~90 works

OPENAI_API_KEY=sk-... EOF

docker compose up -d api postgres redis # coord-serving also builds/boots automatically — expected docker compose logs -f api # watch first boot: DB migrations + provider/model discovery scan, ~1-5 min curl http://localhost:3000/health

Requires Docker with Compose v2, ~8 GB free RAM, free ports 3000/5432/6379

How to configure Ailin¹ Collective Intelligence

  • AIHUBMIX_BASE_URLhttps://aihubmix.com/v1Provider: AiHubMix

    Provider: AiHubMix

  • AILIN_AUTO_MODEL_ALIASESAilin Virtual Model Aliases Optional comma-separated aliases that always resolve to autonomous orchestration. Example: AILIN_AUTO_MODEL_ALIASES=ailin-smart,ailin-pro

    Ailin Virtual Model Aliases Optional comma-separated aliases that always resolve to autonomous orchestration. Example: AILIN_AUTO_MODEL_ALIASES=ailin-smart,ailin-pro

  • AILIN_BRAND_NAMEAilin¹
  • AILIN_HIDE_MODELSfalseBranding Configuration

    Branding Configuration

  • AILIN_LOG_DETAILED_METADATAtrue
  • AILIN_MINIMAL_METADATAfalse
  • AILIN_VIRTUAL_MODEL_PROFILESOptional JSON array with custom alias profiles. Example:

    Optional JSON array with custom alias profiles. Example:

  • AIML_BASE_URLhttps://api.aimlapi.com/v1Provider: AIML

    Provider: AIML

  • AIML_MODELS_BASE_URLhttps://api.aimlapi.com
  • ANTHROPIC_API_KEY_POOL
  • ANTHROPIC_BASE_URLhttps://api.anthropic.comProvider: Anthropic

    Provider: Anthropic

  • ANTHROPIC_ORGANIZATION_ID
  • API_KEY_ALLOW_NO_EXPIRATIONWhether to allow tokens with no expiration at all. Default true; set to false in regulated environments to force every token to carry a bound.

    Whether to allow tokens with no expiration at all. Default true; set to false in regulated environments to force every token to carry a bound.

  • API_KEY_MAX_EXPIRATION_DAYSPersonal Access Tokens (PATs) Policy for end-user API keys created via /v1/internal/api-keys. These values are enforced when a key is created — existing keys with longer expirations are unaffected. Maximum lifetime in days. Set to 0 (and ALLOW_NO_EXPIRATION=true) to permit indefinite tokens. Default 730 mirrors GitHub's fine-grained PAT max — strikes a balance between rotation hygiene and CI ergon

    Personal Access Tokens (PATs) Policy for end-user API keys created via /v1/internal/api-keys. These values are enforced when a key is created — existing keys with longer expirations are unaffected. Maximum lifetime in days. Set to 0 (and ALLOW_NO_EXPIRATION=true) to permit indefinite tokens. Default 730 mirrors GitHub's fine-grained PAT max — strikes a balance between rotation hygiene and CI ergon

  • APP_VERSION2.1.0Application Metadata

    Application Metadata

  • AUTH_EMAIL_FROM_EMAILno-reply@ailin.dev
  • AUTH_EMAIL_FROM_NAMEAilin¹ Developer Tool
  • AUTH_EMAIL_PROVIDEREmail (SMTP) SMTP password comes from GCP Secret: <prefix>-smtp-pass

    Email (SMTP) SMTP password comes from GCP Secret: <prefix>-smtp-pass

  • AUTO_LEARNING_BUCKET_SIZE_HOURS1
  • AUTO_LEARNING_ENABLEDtrueAuto-Learning

    Auto-Learning

  • AUTO_LEARNING_RETENTION_DAYS365
  • AWS_BEDROCK_REGIONus-east-1Provider: AWS Bedrock

    Provider: AWS Bedrock

  • AZURE_OPENAI_API_VERSION2024-08-01-preview
  • AZURE_OPENAI_DEPLOYMENT
  • AZURE_OPENAI_ENDPOINTProvider: Azure OpenAI

    Provider: Azure OpenAI

  • BILLING_API_SECRET_KEY
  • BILLING_ENTITLEMENTS_CACHE_TTL_SECONDSRedis cache TTL for a resolved tenant's entitlements, and the HTTP timeout for the resolve call — billing being unreachable/slow ALWAYS falls back to the hardcoded TIER_CONFIGS value, never blocks the request.

    Redis cache TTL for a resolved tenant's entitlements, and the HTTP timeout for the resolve call — billing being unreachable/slow ALWAYS falls back to the hardcoded TIER_CONFIGS value, never blocks the request.

  • BILLING_ENTITLEMENTS_TIMEOUT_MS
  • BILLING_SERVICE_URLRequired for the entitlement call itself (also used today by the existing /v1/internal/billing/checkout-credits proxy — routes/internal/ internal-wallet-routes.ts):

    Required for the entitlement call itself (also used today by the existing /v1/internal/billing/checkout-credits proxy — routes/internal/ internal-wallet-routes.ts):

  • BUILD_TIMESTAMP
  • CACHE_ENABLEDtrueCache Configuration

    Cache Configuration

  • CACHE_MAX_IN_MEMORY_ENTRIES5000
  • CACHE_MAX_SIZE_MB256
  • CACHE_TTL_DEFAULT3600
  • CACHE_TTL_EMBEDDINGS604800
  • CACHE_TTL_MODELS3600
  • CACHE_TTL_RESPONSES86400
  • CI_BILLING_CLIENT_ALLOWED_AUDIENCES
  • CI_BILLING_CLIENT_ALLOWED_SCOPES
  • CI_BILLING_CLIENT_OIDC_CLIENT_ID
  • CI_BILLING_CLIENT_OIDC_CLIENT_SECRET
  • CI_BILLING_CLIENT_OIDC_TOKEN_URLOutbound: ci -> billing entitlement resolution (Fase 5) ci calls billing's GET /v1/plans/resolve (services/billing-entitlements-client.ts) to resolve a tenant's REAL plan limits, with the M2M client_credentials client id registers specifically for this (ailin-ci-billing-client, audience=ailin-billing, scope=billing:tenant-context — see id/api/controllers/oidc_provider.py::_default_clients). Same e

    Outbound: ci -> billing entitlement resolution (Fase 5) ci calls billing's GET /v1/plans/resolve (services/billing-entitlements-client.ts) to resolve a tenant's REAL plan limits, with the M2M client_credentials client id registers specifically for this (ailin-ci-billing-client, audience=ailin-billing, scope=billing:tenant-context — see id/api/controllers/oidc_provider.py::_default_clients). Same e

  • CI_COORDINATION_AGGREGATION_METHODweighted_confidence
  • CI_COORDINATION_ENABLE_EXPERIMENTStrue
  • CI_COORDINATION_MAX_COST_USD0.50
  • CI_COORDINATION_MAX_DECISION_FLIP_RATE0.15
  • CI_COORDINATION_MAX_DISSENT0.35
  • CI_COORDINATION_MAX_LATENCY_MS60000
  • CI_COORDINATION_MAX_MODELS5
  • CI_COORDINATION_MAX_ROUNDS3
  • CI_COORDINATION_MIN_CONVERGENCE_SCORE0.82
  • CI_COORDINATION_MIN_MODELS3
  • CI_COORDINATION_PERSIST_AUDITfalse
  • CI_COORDINATION_REQUIRE_QUALITY0.8
  • CI_COORDINATION_STOP_ON_CRITICAL_RISKtrue
  • CI_SENSITIVITY_CONSENSUS_ENABLEDfalseCollective Coordination Layer (Sensitivity Consensus) Master switch — disabled by default, enable to activate sensitivity-consensus strategy

    Collective Coordination Layer (Sensitivity Consensus) Master switch — disabled by default, enable to activate sensitivity-consensus strategy

  • CLI_LATEST_VERSION0.1.9
  • CLI_MIN_VERSION0.0.1
  • COHERE_BASE_URLhttps://api.cohere.aiProvider: Cohere

    Provider: Cohere

  • COMPRESSION_ENABLEDtrue
  • CORS_ENABLEDtrueSecurity

    Security

  • CORS_ORIGINhttp://localhost:3000,http://localhost:5173
  • COST_OPTIMIZATION_ENABLEDtrueCost Optimization

    Cost Optimization

  • COST_OPTIMIZATION_MAX_BUDGET_PER_REQUEST1.00
  • COST_OPTIMIZATION_TARGET_SAVINGS0.63
  • DATABASE_CONNECTION_TIMEOUT5000
  • DATABASE_IDLE_TIMEOUT30000
  • DATABASE_POOL_MAX20
  • DATABASE_POOL_MINDatabase (PostgreSQL) - Non-sensitive Config Connection string comes from GCP Secret: <prefix>-database-url NOTE (2026-09 footgun fix): these are now genuinely live (see database/client.ts's createPgPool()/buildPgPoolOptions() and config/index.ts's resolveDatabasePoolMax()/resolveDatabasePoolMin()). Values below match this file's NODE_ENV=development default's real pool size (20/0) so copying this

    Database (PostgreSQL) - Non-sensitive Config Connection string comes from GCP Secret: <prefix>-database-url NOTE (2026-09 footgun fix): these are now genuinely live (see database/client.ts's createPgPool()/buildPgPoolOptions() and config/index.ts's resolveDatabasePoolMax()/resolveDatabasePoolMin()). Values below match this file's NODE_ENV=development default's real pool size (20/0) so copying this

  • DEEPSEEK_BASE_URLhttps://api.deepseek.com/v1Provider: DeepSeek

    Provider: DeepSeek

  • EDENAI_BASE_URLhttps://api.edenai.run/v3/llmProvider: Eden AI

    Provider: Eden AI

  • ENABLE_GRACEFUL_SHUTDOWNtrue
  • ENABLE_PLAYGROUNDtrue
  • ENABLE_SWAGGERtrue
  • FEATURE_ARBITRATIONtrue
  • FEATURE_AUTO_LEARNINGtrue
  • FEATURE_CACHINGtrue
  • FEATURE_COMPETITIVE_EXECUTIONtrue
  • FEATURE_EMBEDDINGStrue
  • FEATURE_FUNCTION_CALLINGtrue
  • FEATURE_STREAMINGtrueFeature Flags

    Feature Flags

  • FEATURE_VISIONtrue
  • FRIENDLI_BASE_URLhttps://api.friendli.ai/serverless/v1Provider: Friendli

    Provider: Friendli

  • FRIENDLI_TEAM_ID
  • GCP_SECRETS_CREDENTIALS_FILE─── Local dev authentication (RECOMMENDED PATH) ───────────────────────── Use Application Default Credentials (ADC). One-time setup: gcloud auth application-default login After login, gcloud writes credentials to ~/.config/gcloud/application_default_credentials.json and the Secret Manager client picks them up automatically — no key file needed. The boot-time preflight in `gcp-provider.ts` validate

    ─── Local dev authentication (RECOMMENDED PATH) ───────────────────────── Use Application Default Credentials (ADC). One-time setup: gcloud auth application-default login After login, gcloud writes credentials to ~/.config/gcloud/application_default_credentials.json and the Secret Manager client picks them up automatically — no key file needed. The boot-time preflight in `gcp-provider.ts` validate

  • GCP_SECRETS_PREFIX
  • GCP_SECRETS_PROJECT_IDGCP Secret Manager Set this to your GCP project id (override in .env).

    GCP Secret Manager Set this to your GCP project id (override in .env).

  • GIT_COMMIT_SHA
  • GOOGLE_API_KEY_POOL
  • GOOGLE_BASE_URLhttps://generativelanguage.googleapis.comProvider: Google (Gemini)

    Provider: Google (Gemini)

  • HELICONEAI_BASE_URLhttps://ai-gateway.helicone.ai/v1Provider: Helicone AI Gateway

    Provider: Helicone AI Gateway

  • HELMET_ENABLEDtrue
  • HOST0.0.0.0
  • IMAGEROUTER_BASE_URLhttps://api.imagerouter.ioProvider: ImageRouter

    Provider: ImageRouter

  • JINA_API_BASE_URLhttps://api.jina.ai/v1Provider: Jina

    Provider: Jina

  • JINA_DEEPSEARCH_BASE_URLhttps://deepsearch.jina.ai/v1
  • JINA_READER_BASE_URLhttps://r.jina.ai
  • JINA_SEARCH_BASE_URLhttps://s.jina.ai
  • JWT_EXPIRES_INJWT Authentication JWT secret comes from GCP Secret: <prefix>-jwt-secret

    JWT Authentication JWT secret comes from GCP Secret: <prefix>-jwt-secret

  • LOG_LEVELinfo
  • MAX_REQUEST_SIZE_MB10
  • MINIMAX_BASE_URLhttps://api.minimax.io/v1Provider: MiniMax

    Provider: MiniMax

  • MISTRAL_BASE_URLhttps://api.mistral.ai/v1Provider: Mistral

    Provider: Mistral

  • MOCK_PROVIDERSfalseDevelopment

    Development

  • MOONSHOT_BASE_URLhttps://api.moonshot.ai/v1Provider: Moonshot

    Provider: Moonshot

  • NODE_ENVdevelopmentServer Configuration

    Server Configuration

  • NOVITA_BASE_URLhttps://api.novita.ai/openai/v1Provider: Novita

    Provider: Novita

  • NVIDIA_BASE_URLhttps://integrate.api.nvidia.com/v1Provider: NVIDIA

    Provider: NVIDIA

  • NVIDIA_HUB_BASE_URLhttps://integrate.api.nvidia.com/v1
  • OPENAI_API_KEY_POOLScale-to-100k Phase 2 (issue #152): optional multi-account pool, rotated round-robin alongside OPENAI_API_KEY so this provider's throughput isn't capped by a single account's rate limit. JSON array of additional keys.

    Scale-to-100k Phase 2 (issue #152): optional multi-account pool, rotated round-robin alongside OPENAI_API_KEY so this provider's throughput isn't capped by a single account's rate limit. JSON array of additional keys.

  • OPENAI_BASE_URLhttps://api.openai.com/v1
  • OPENAI_ORGANIZATIONProvider: OpenAI

    Provider: OpenAI

  • OPENAI_PROJECT_ID
  • OPENROUTER_APP_NAMEAilin¹
  • OPENROUTER_APP_URLhttps://ailin.devProvider: OpenRouter

    Provider: OpenRouter

  • ORCHESTRATION_DEFAULT_STRATEGYauto
  • ORCHESTRATION_ENABLE_ARBITRATIONtrue
  • ORCHESTRATION_ENABLE_COMPETITIVEtrue
  • ORCHESTRATION_ENABLE_PARALLELtrue
  • ORCHESTRATION_MAX_MODELS9Orchestration

    Orchestration

  • ORQAI_BASE_URLhttps://api.orq.ai/v2/routerProvider: ORQ.ai

    Provider: ORQ.ai

  • ORQAI_MODELS_BASE_URLhttps://api.orq.ai
  • OTEL_ENABLEDtrueObservability: OpenTelemetry

    Observability: OpenTelemetry

  • OTEL_EXPORTER_JAEGER_ENDPOINThttp://localhost:14268/api/traces
  • OTEL_EXPORTER_PROMETHEUS_PORT9464
  • OTEL_SERVICE_NAMEci-api
  • PORT3000
  • PROMETHEUS_ENABLEDtrueMonitoring: Prometheus

    Monitoring: Prometheus

  • PROMETHEUS_PORT9090
  • PROMETHEUS_SCRAPE_TOKEN
  • QUEUE_BACKOFF_INITIAL_DELAY_MS1000
  • QUEUE_BACKOFF_STRATEGYexponential
  • QUEUE_ENABLEDtrueQueue (BullMQ)

    Queue (BullMQ)

  • QUEUE_MAX_ATTEMPTS3
  • QUEUE_MAX_QUEUE_TIME_SECONDS120
  • QUEUE_NAMEchat-requests
  • QUEUE_POLL_INTERVAL_MS2000
  • QUEUE_RESULT_TTL_SECONDS86400
  • QUEUE_RUN_WORKERS_IN_APItrue
  • QUEUE_STATUS_TTL_SECONDS600
  • QUEUE_WORKER_CONCURRENCY100
  • QUEUE_WORKER_COUNT20
  • QUEUE_WORKER_METRICS_PORT9465
  • QUOTA_SERVICE_TIMEOUT5
  • QUOTA_SERVICE_URLhttp://gateway-quota:5004GATEWAY MIDDLEWARE CONFIGURATION

    GATEWAY MIDDLEWARE CONFIGURATION

  • RATE_LIMIT_MAX1000Rate Limiting

    Rate Limiting

  • RATE_LIMIT_WINDOW3600000
  • REDIS_CLUSTER_ENABLEDNOT supported yet — redis-client.ts fails fast rather than silently ignoring this (BullMQ's key scheme has no hash-tag prefixing and the redis-global cache layer uses db:1, both incompatible with Cluster mode's sharding). Use REDIS_SENTINEL_ENABLED below for HA instead.

    NOT supported yet — redis-client.ts fails fast rather than silently ignoring this (BullMQ's key scheme has no hash-tag prefixing and the redis-global cache layer uses db:1, both incompatible with Cluster mode's sharding). Use REDIS_SENTINEL_ENABLED below for HA instead.

  • REDIS_CLUSTER_NODES
  • REDIS_DB0
  • REDIS_HOSTlocalhostRedis (Cache & Queue) - Non-sensitive Config Connection strings come from GCP Secrets: - <prefix>-redis-url - <prefix>-redis-global-url

    Redis (Cache & Queue) - Non-sensitive Config Connection strings come from GCP Secrets: - <prefix>-redis-url - <prefix>-redis-global-url

  • REDIS_PORT6379
  • REDIS_QUEUE_DB
  • REDIS_QUEUE_HOSTScale-to-100k Phase 5 (issue #150) — money-path Redis (BullMQ queues + the idempotency store, via getQueueRedisClient()/createRedisClient()). Every field below falls back to the general REDIS_* value above when unset, so leaving these blank keeps today's single-instance behavior; set them to point the money path at a physically separate, non-evicting Redis so cache/rate-limit churn on the general

    Scale-to-100k Phase 5 (issue #150) — money-path Redis (BullMQ queues + the idempotency store, via getQueueRedisClient()/createRedisClient()). Every field below falls back to the general REDIS_* value above when unset, so leaving these blank keeps today's single-instance behavior; set them to point the money path at a physically separate, non-evicting Redis so cache/rate-limit churn on the general

  • REDIS_QUEUE_PORT
  • REDIS_QUEUE_SENTINEL_ENABLEDfalse
  • REDIS_QUEUE_SENTINEL_NAME
  • REDIS_QUEUE_SENTINELS
  • REDIS_SENTINEL_ENABLEDfalseSentinel-monitored HA (automatic primary failover, no sharding — safe for every current Redis consumer, unlike Cluster mode above).

    Sentinel-monitored HA (automatic primary failover, no sharding — safe for every current Redis consumer, unlike Cluster mode above).

  • REDIS_SENTINEL_NAMEmymaster
  • REDIS_SENTINELScomma-separated host:port list, e.g. sentinel-1:26379,sentinel-2:26379,sentinel-3:26379

    comma-separated host:port list, e.g. sentinel-1:26379,sentinel-2:26379,sentinel-3:26379

  • SECRETS_AUDIT_ENABLEDtrue
  • SECRETS_AUDIT_PERSISTtrue
  • SECRETS_AUTO_REFRESHtrue
  • SECRETS_CACHE_TTL_SECONDS300
  • SECRETS_ENCRYPT_CACHEtrue
  • SECRETS_PROVIDER_FALLBACKenv
  • SECRETS_PROVIDER_PRIMARYgcpSecrets Manager Configuration

    Secrets Manager Configuration

  • SECRETS_ROTATION_CRON0 3 * * *
  • SECURITY_AUDIT_ENABLEDtrue
  • SECURITY_AUDIT_RETENTION_DAYS365
  • SECURITY_RBAC_DEFAULT_ROLEviewer
  • SECURITY_RBAC_SUPER_ROLESowner,admin
  • SENSITIVE_ROUTES/payment,/billing,/admin,/console/api/admin
  • SERVICE_AUTH_ALLOWED_CLIENTSailin-dev-server,ailin-chat-server
  • SERVICE_AUTH_AUDIENCEailin-ci
  • SERVICE_AUTH_CLOCK_TOLERANCE_SECONDS
  • SERVICE_AUTH_ENABLEDInternal M2M service-token auth (/v1/internal/*) The dev/platform BFF mints short-lived RS256 service tokens at id (client_credentials, client_id=ailin-dev-server, audience=ailin-ci) and calls ci's internal API-key endpoints with Bearer + X-Acting-User. ci verifies these against id's JWKS (same keypair as user OIDC tokens) — a path SEPARATE from user-token federation above. Defaults below match pr

    Internal M2M service-token auth (/v1/internal/*) The dev/platform BFF mints short-lived RS256 service tokens at id (client_credentials, client_id=ailin-dev-server, audience=ailin-ci) and calls ci's internal API-key endpoints with Bearer + X-Acting-User. ci verifies these against id's JWKS (same keypair as user OIDC tokens) — a path SEPARATE from user-token federation above. Defaults below match pr

  • SERVICE_AUTH_ISSUERhttps://ailin.id
  • SERVICE_AUTH_JWKS_CACHE_TTL_SECONDS
  • SERVICE_AUTH_JWKS_URIhttps://ailin.id/.well-known/jwks.json
  • SERVICE_TOKEN_AUDIENCEService-token auth (BFF → ci-internal) These settings govern the `/v1/internal/*` endpoints that the dev/ BFF (and other trusted services) call on behalf of end users. Tokens are RS256, validated against id/'s JWKS via the existing federation config, and required to carry this audience plus an X-Acting-User header naming the console user. The user is then resolved server-side and used for all DB l

    Service-token auth (BFF → ci-internal) These settings govern the `/v1/internal/*` endpoints that the dev/ BFF (and other trusted services) call on behalf of end users. Tokens are RS256, validated against id/'s JWKS via the existing federation config, and required to carry this audience plus an X-Acting-User header naming the console user. The user is then resolved server-side and used for all DB l

  • SHUTDOWN_TIMEOUT_MS30000
  • SIGNATURE_VERIFIER_TIMEOUT5
  • SIGNATURE_VERIFIER_URLhttp://gateway-signature-verifier:5005
  • SMTP_HOST
  • SMTP_PORT465
  • SMTP_SECUREtrue
  • SMTP_USER
  • STRIPE_API_BASE_URLhttps://api.stripe.com
  • STRIPE_API_VERSION2024-06-20
  • STRIPE_AUTOMATIC_TAXtrue
  • STRIPE_DEFAULT_CURRENCYusd
  • STRIPE_ENABLEDPayments / Stripe Stripe keys come from GCP Secrets: - <prefix>-stripe-secret-key - <prefix>-stripe-webhook-secret

    Payments / Stripe Stripe keys come from GCP Secrets: - <prefix>-stripe-secret-key - <prefix>-stripe-webhook-secret

  • STRIPE_PUBLISHABLE_KEY
  • STRUCTURED_EXTRAS_CODE_FILE_ENABLEDProactive structured extras (non-streaming responses only): when a finished text response already contains a large, well-formed, language-tagged fenced code block, also materialize it as a downloadable file (via FileGenerationService) and attach it via ailin_metadata.tool_artifacts. See proactive-code-file-extra.ts. Kill switch — set to false to disable without a code change.

    Proactive structured extras (non-streaming responses only): when a finished text response already contains a large, well-formed, language-tagged fenced code block, also materialize it as a downloadable file (via FileGenerationService) and attach it via ailin_metadata.tool_artifacts. See proactive-code-file-extra.ts. Kill switch — set to false to disable without a code change.

  • STRUCTURED_EXTRAS_DOCUMENT_ENABLEDtrueProactive structured extras (non-streaming responses only): when a finished text response is either a long multi-section report or a flat list of structurally-uniform "label: value" records, also materialize it as a downloadable markdown document or CSV (via FileGenerationService) and attach it via ailin_metadata.tool_artifacts. See proactive-document-extra.ts. Kill switch — set to false to disabl

    Proactive structured extras (non-streaming responses only): when a finished text response is either a long multi-section report or a flat list of structurally-uniform "label: value" records, also materialize it as a downloadable markdown document or CSV (via FileGenerationService) and attach it via ailin_metadata.tool_artifacts. See proactive-document-extra.ts. Kill switch — set to false to disabl

  • STRUCTURED_EXTRAS_TABLE_CHART_ENABLEDProactive structured extras (non-streaming responses only): when a finished text response already contains a genuine multi-row/multi-column markdown comparison table, also render it as a chart image and attach it via ailin_metadata.tool_artifacts. See proactive-structured-extras.ts. Kill switch — set to false to disable without a code change.

    Proactive structured extras (non-streaming responses only): when a finished text response already contains a genuine multi-row/multi-column markdown comparison table, also render it as a chart image and attach it via ailin_metadata.tool_artifacts. See proactive-structured-extras.ts. Kill switch — set to false to disable without a code change.

  • VERTEX_AI_BASE_URL
  • VERTEX_AI_LOCATIONus-central1
  • VERTEX_AI_PROJECT_IDProvider: Vertex AI (Google Cloud)

    Provider: Vertex AI (Google Cloud)

  • VERTEX_AI_USE_EXPRESS_MODEfalse
  • XAI_BASE_URLhttps://api.x.aiProvider: xAI (Grok)

    Provider: xAI (Grok)

FAQ

What security and compliance controls exist?

Every call runs through authentication, tenant isolation, quota enforcement, capability-filtered routing, and request tracing. AGPL §13 compliance endpoints, SLSA/Sigstore release provenance, and SPDX SBOM ship with every release. SOC 2 and ISO 27001 are in progress.

Does my data train the models?

No, not your raw prompts. The training-data export pipeline exports only anonymized operational metadata (strategy, cost, latency, quality scores) with trace IDs hashed and organization/user identifiers stripped.

What's the evidence the collective outperforms a single model?

On a benchmark of 10 objectively verifiable tasks run 38 times, verified consensus scored 37/38 (97%) against 68–82% for individual frontier models. The verifier never selected an objectively wrong answer.

Which model actually produced my answer, and how do I audit it?

Every response carries ailin_metadata.final_decider_model_id, final_decider_role, and a full subcalls array. Persisted coordination traces are available via GET /v1/collective/runs/:id/trace.

Can I control what a request costs?

Yes, per request. max_cost hard-caps spend before any model is called; quality_target sets a floor. Every response reports actual cost with line-item breakdown.

How many coordination strategies exist, and can I pick one directly?

31 strategies are registered, from single routed model up to nine-agent swarms. Fifteen are auto-selectable; sixteen are explicit-only. You can also address them directly as <strategy>:<tier>.

How does Ailin¹ Collective decide when I don't specify anything?

A layered cascade: explicit routing if named, then triage to classify the task, then configuration archive, cost/quality/latency frontier, learned strategy preference (Thompson Sampling bandit), and finally a deterministic fallback heuristic.

What are the 5 aliases, and which should I use?

ailin-auto (balanced default), ailin-best (quality first), ailin-fast (latency first, single model), ailin-economy (cost first), ailin-consensus (correctness via independent cross-checking). Start with ailin-auto.

How many models are in the catalog, and how many actually run per request?

The live catalog holds 101,986 discoverable model identifiers, but a single request only activates the subset required by the chosen collective strategy, never the entire catalog.

Is this a router, an orchestrator, or something else?

It is built for Collective Intelligence — a layer where multiple models reason, cross-check, and synthesize together, with routing, orchestration, and verification as mechanisms that serve it.

Is Ailin¹ OpenAI-compatible?

Yes, the core surface (chat/completions, responses, embeddings, models) is drop-in compatible with an additive ailin_metadata block carrying decision provenance.

Rate this project

Click to rate — no account needed.

0 comments

Posting as guest
Loading comments…