ArcGrid Platform

ArcBrain

The centralized cognitive infrastructure for all Grid projects and clients. ArcRouter selects models. The tenancy kernel enforces entitlements. The memory layer stores user state. The training pipeline learns from usage. One brain - many tenants.

ArcHelm ArcRouter TypeScript Postgres BRAINLIC Replaces LightBrain

Seven layers

The brain is presented to clients as seven substrate layers. Each layer maps to concrete infrastructure in the brain repo on ArcHelm.

L1
Inference Router
ArcRouter - selects optimal model per request, enforces entitlements, meters usage, handles failover across local and frontier providers.
Live
L2
Knowledge Graph
Neo4j on ArcHelm K8s. Graph of entities, relations, and platform state. MCP-accessible from all Grid sessions.
Live
L3
Tenant Memory
Per-user profile state scoped to tenant namespace. STANDARD, HEALTH, and BIOMETRIC data classes. Immutable audit trail.
Draft PR
L4
Capability Modules
ArcHub catalog - licensed modules per tenant tier. Entitlement registry with commercial/research license classes.
Live
L5
Compliance Kernel
BIPA and CPRA enforcement. Consent records with SHA-256 disclosure hash. Deletion attestations. Retention policies per data class.
Draft PR
L6
Training Pipeline
SLRP.1 - domain classifier, multi-turn windowing, HAG (Human Approval Gate) on all cross-tenant promotions. Logs feed Noema model training.
Live
L7
Learning Membrane
Governed boundary - only anonymized patterns cross tenant lines. DATACLASS enforcement at ingestion. HAG on every cross-tenant promotion.
Planned

Components

ArcRouter

The API gateway for all brain calls. Every LLM request - from Surface, Trebek, ArcCycle, or tenant apps - routes through ArcRouter. It resolves effort aliases to catalog descriptors, enforces tenant entitlements and provider class restrictions, meters usage to the ledger, and handles multi-model failover.

SDK call API key auth Entitlement gate License class filter Provider class filter Model selection Execute + meter

Runs in a Docker container on ArcHelm at port 4000. API key prefix sk-. Keys provisioned through ArcHub admin API.

Tenancy kernel

Postgres service that owns the tenant registry, entitlement grants, and usage ledger. ArcRouter calls it on every gated request. The tenancy service runs at port 8083.

TENANCY.1
Tenant registry
Provision, activate, freeze tenants. Tier assignment (T0-T3).
TENANCY.2
Entitlements
Grant/revoke module access. GET /tenants/:id/check/:moduleId is the hot path.
TENANCY.3
Usage metering
POST /tenants/:id/usage on every routed call. Fire-and-forget from ArcRouter.

User memory layer

Per-user profile state stored in the tenancy Postgres. The SDK exposes it via brain.memory.*. Shape of the profile JSON is tenant-defined - the brain stores and returns it without interpreting it. The user_id is always an opaque token, never PII.

In draft PR #36

The memory layer (schema 002 + tenancy/src/memory.ts) is built and typechecked, but the PR has not merged. Apply after review.

Compliance kernel

Consent records, deletion attestations, and retention policies. Enforced at write time by upsertProfile() - you cannot write BIOMETRIC data without a valid, unexpired consent record. The brain.consent.* SDK namespace is the entry point.

Covers BIPA (Illinois) §15(b) written consent requirement, CPRA (California) right-to-deletion, and HIPAA-adjacent HEALTH data retention defaults.

In draft PR #36

Schema 003 + tenancy/src/compliance.ts - built and typechecked. Not yet deployed.

Training pipeline (L6)

SLRP.1 - Supervised Learning and Reward Pipeline. Converts ArcRouter completion logs to HuggingFace SFT dataset format. Domain classifier tags each example. Multi-turn windowing preserves conversation structure. HAG (Human Approval Gate) requires approved_by to be set on every training manifest before the training runner will consume it - fails closed on null.

Feeds Noema model training. Output: our own distilled models that replace Claude over time for common Grid workloads.

Provider tiers

ArcRouter routes to three provider classes. The routing table maps effort aliases to candidate descriptors - each descriptor carries a providerClass that controls which tenant tiers can use it.

ClassWhere it runsCurrent modelsTenant access
local ArcRig fleet on-prem (10.20.10.x) qwen3-fast, qwen2.5-coder:32b, llama3.1:8b, claude-code-3b fine-tunes T0 + T1 + T2
cloud Our cloud infra (Runpod / Modal) Same models, our infra (provisioning pending) T0 + T1 + T2 + T3
frontier External APIs (Anthropic, Groq, Together) Claude Sonnet/Opus (live), Groq/Together (D.3 unblocked) T0 + T1 only (T2/T3 blocked)
Toggle is in PR #37

Provider class enforcement is built (brain PR #37). Cloud descriptors come when cloud infra is provisioned. Groq/Together/Gemini frontier descriptors come when D.3 keys arrive.

Tenant tiers

TierWhoEnforcementProvider access
T0Grid-internal (grid, team keys)None - no entitlement gates, no provider limitsAll
T1Wholly owned propertiesNoneAll
T2Co-owned portfolio clientsModule entitlements enforced. Research_only blocked. Frontier APIs blocked.local + cloud
T3External paying clients (Avalon, Beyond-Sleep, Aris, AgX)Full enforcement. Cloud only by default.cloud only (override: key.allowedProviderClasses)

Wiring guide

Two team-facing surfaces need to be wired to the brain. Neither requires changes to how they work - only where they direct LLM calls.

Surface backend

Add @arcgrid/brain-client as a dependency. Replace direct Anthropic calls with brain.chat(). Use the T0 grid API key - no entitlement gates apply.

See Brain SDK - Internal wiring for the exact pattern.

Trebek

Replace Trebek's hardcoded model reference with brain.chat(). Neo4j MCP wiring stays unchanged - only the language layer changes. Result: all Trebek calls are metered, logged, and can be rerouted to local models for client privacy sessions.

ArcCycle

Every turn in a Cycle calls brain.chat() with module_id set per capability and attribution.flow_id set to the Cycle id. This gives per-turn metering and per-turn routing decisions.

Not yet wired

Surface and Trebek currently call Anthropic directly. Brain PRs #35 and #36 need to merge first, then Surface and Trebek get SDK-wired as separate PRs.

Activation checklist

Everything below is built. What is not yet done is activating it on ArcHelm.

STEP 1
Apply tenancy migrations
Run 001_tenants, 002_user_memory, 003_compliance against the brain Postgres on ArcHelm.
STEP 2
Deploy tenancy container
Add tenancy service to docker-compose on ArcHelm. Port 8083. Set TENANCY_PG_URL + TENANCY_ADMIN_KEY.
STEP 3
Set TENANCY_URL on ArcRouter
Add TENANCY_URL=http://tenancy:8083 to ArcRouter env. Without this, all enforcement is dormant.
STEP 4
Merge brain PRs #35 + #36
SDK memory/consent (PR #35) and user memory + compliance layer (PR #36). Both are typechecked clean.
STEP 5
Wire Surface to brain SDK
Install @arcgrid/brain-client in the Surface backend. Replace direct Anthropic calls with brain.chat().
STEP 6
Wire Trebek to brain SDK
Replace Trebek's hardcoded model with brain.chat(). Neo4j MCP stays unchanged.