Nerve is a multi-agent AI platform for mid-market retailers. It reasons over your real data across commerce, marketing, inventory and paid media — then proposes reversible actions your team can approve, reject, or reverse with full audit trail. Purpose-built for the retailer sized $100M–$2B GMV, where dashboards aren't enough and enterprise consultants are overkill.
Each act below is a real signal routed through the real Supervisor, reasoned over by real operation agents, and materialized into a reversible Decision Card. Reasoning text is scripted for rehearsal-safety; every other moving part is production code. One env-var flip (NERVE_DEMO_MODE=live) points the same code at live Anthropic.
Every diagram below reflects real code in services/nerve-core/. Nothing aspirational. Rendered live from the engineering source-of-truth at docs/ARCHITECTURE.md.
Signals come in from retail systems, get normalized into NCRS, reasoned over by agents, and become reversible actions routed back out through connectors. Every layer speaks NCRS — not Shopify field names, not Manhattan field names — so one agent works across every customer without bespoke code.
flowchart TB
subgraph RS["Retail systems (real tenant data)"]
direction LR
RS1[Shopify · orders · inventory]
RS2[Klaviyo · email · SMS]
RS3[Google Ads · Meta Ads]
RS4[Manhattan · WMS · OMS]
end
subgraph CONN["Connector layer"]
direction LR
CBASE["Adapter ABC · 18 capabilities
idempotency · reversal · rate-limit"]
C1[Shopify]:::spc
C2[Klaviyo]:::spc
C3[Google Ads]:::spc
C4[Manhattan]:::spc
end
subgraph DATA["Data layer"]
NCRS["NCRS · Pydantic + Postgres
row-level security · partitioned"]
VEC["Vector store · Qdrant (Sprint 2)"]
STREAM["Event log · Redis Streams (Sprint 1)"]
end
subgraph AGENTS["Agent layer"]
SUP["Supervisor
single · sequential · concurrent"]
P1[Inventory]:::pack
P2[Merchandising]:::pack
P3[Paid Media]:::pack
P4[CX]:::pack
P5[Supply Chain · Sprint 2]:::soon
P6[Finance · Sprint 2]:::soon
SUP --> P1 & P2 & P3 & P4 & P5 & P6
end
subgraph LLM["LLM gateway"]
GATEWAY["Hybrid · scripted ↔ Anthropic"]
end
subgraph API["HTTP + SSE"]
SIG["POST /v1/signals"]
DEC["/v1/decisions/* · approve · reject · reverse"]
SSE["/v1/decisions/stream · SSE"]
end
subgraph UI["UI surface"]
OP["Operator UI
black canvas"]
PORTAL["Portal
leadership + customer"]
end
RS ==> CONN
CONN ==> NCRS
NCRS ==> AGENTS
AGENTS <--> LLM
AGENTS ==> DEC
SIG --> SUP
DEC <--> OP
SSE --> OP
OP <--> PORTAL
classDef spc fill:#1a0a20,stroke:#8939A1,color:#fff
classDef pack fill:#0a1a2a,stroke:#61629D,color:#fff
classDef soon fill:#0a0a14,stroke:#3E616A,color:#888,stroke-dasharray:3 3
A signal arrives. The Supervisor decides routing — one agent, two agents sequentially, or N agents concurrently. Everything composes into a single auditable Decision Card. L3 auto-executes are marked at compose time so operators see them as already-done.
sequenceDiagram
autonumber
participant Retail
participant API as POST /signals
participant Sup as Supervisor
participant Agent as Operation agents
participant LLM
participant Store as Decision store
participant UI as Operator UI
Retail->>API: signal
API-->>Retail: 202 Accepted
API->>Sup: enqueue
Sup->>Store: allocate decision_id
Sup->>UI: trace · routed_to (SSE)
Sup->>LLM: routing reasoning
LLM-->>UI: reasoning tokens (SSE)
alt single · sequential · concurrent
Sup->>Agent: consult (1..N agents)
Agent->>LLM: agent reasoning
LLM-->>UI: reasoning tokens (SSE)
Agent-->>Sup: draft actions + alternatives
end
Sup->>Sup: compose Decision Card
Sup->>Store: put(status=pending)
Store-->>UI: decision event (SSE)
UI->>API: approve
API->>Store: fire actions
Store-->>UI: execution events (SSE)
opt reversal
UI->>API: reverse
Store-->>UI: reversal events (SSE)
end
One SSE channel (GET /v1/decisions/stream) fans out every event to every subscribed client. Events are typed so the UI can route by event: field. Volume is roughly 150–250 reasoning chunks per agent per signal, plus trace + decision + execution + reversal events.
stateDiagram-v2
direction LR
[*] --> Idle: subscribe (hello event)
Idle --> Signal: POST /signals
Signal --> Routing: trace · routed_to
Routing --> Reasoning: reasoning · per token
Reasoning --> Composing: final agent returns
Composing --> Pending: decision · status=pending
Pending --> Approved: decision · status=approved
Approved --> Executing: execution · state=sent
Executing --> Executed: execution · state=acked
Executed --> Reversed: reversal
Reversed --> Closed
Pending --> Rejected: decision · status=rejected
Rejected --> Closed
Executed --> Closed: no reversal
Closed --> Idle: next signal
Every agent speaks NCRS. Every action carries its own reversal contract. Every decision type declares its autonomy level (L1 advise / L2 one-click / L3 auto-execute). Agent specs are YAML-defined and CI-validated.
OOS orchestration, inter-store transfers, replenishment advisement, ATP arbitration. Owns stockout and slow-mover signals.
Markdown ladders, margin defense, hero swaps, promo calibration. Owns pricing and assortment signals.
Bid caps, campaign pauses, creative rotation. Auto-executes L3 below-threshold actions (wasted-spend mitigation).
PDP microcopy, back-in-stock alerts, post-purchase communications. Owns the shopper-visible touchpoints.
PO management, vendor negotiation advisement, inbound ATP, carrier routing decisions.
Staffing signals, shrinkage detection, in-store fulfillment capacity, click-and-collect routing.
Margin watch, contribution-margin attribution, promotional ROI, markdown/markdown-cancel accounting.
LTV-aware targeting, churn signals, win-back sequencing, tier-ladder optimization, reward issuance.
This is for leadership, not marketing — so it's honest. If you clone the repo right now, here's exactly what runs and what doesn't.
Scoped against an actual RRS pilot conversation. Post-pilot we focus on scale (more connectors, more packs), not more wow.