Sentrix
Built at Zero to Agent: Vercel x Deepmind Hackathon SF · Mar 21, 2026 · San Francisco, CA

The problem. Agentic systems are already doing real damage and scaring off the buyers who matter most. People like Summer Yue have described catastrophic outcomes when agentic tooling goes wrong—stories in the OpenClaw vein where an agent effectively wiped an inbox, turning “helpful automation” into irreversible data loss. Others, like Scott Shambaugh, have been on the receiving end of harassment-style agent behavior—autonomous loops, repeated outbound actions, and loss of human control that reads as abuse at scale, not a quirky demo. At the enterprise tier, the trust bar is even higher: firms such as BlackRock have been cited as running only a handful of people (on the order of six across the organization) actively testing Claude, with trust named as the binding constraint—not model capability. The through-line is the same: enterprises are not wiring agentic workflows into mission-critical systems because today’s stacks are not reliably compliant, safe, or governable when a single model trajectory can execute tools, mutate state, and externalize harm. Until “one agent, one guess” is unacceptable in production, the category stalls. The pitch. Sentrix is Agent Reliability Engineering (ARE) for systems that cannot afford a wrong tool call or a confident hallucination. Instead of long sequential chains (draft → critic → revise → judge), it uses parallel sub-agents: the same prompt is completed by N models at once, producing N hypotheses per step. Consensus is not vibes—it is Minimum Bayes Risk (MBR) over full answers and, where language is fused, sentence-atomic (or legacy align-and-stitch) fusion with chrF-style utilities. Token-level log probabilities from the API are threaded through the pipeline as calibrated signals: geometric-mean gating on whole-model confidence, discard gates and reference weighting during stitch, and tie-breaks when lexical scores tie—so higher-confidence trajectories influence outcomes without pretending logprobs are a universal accuracy oracle. For machine-executable steps, the finance-agent mock shows the right split: tool ARE turns off linguistic stitch/MBR on the gateway and runs execution-guided consensus—validate each candidate against a tool registry, take a majority vote on a canonical action, break ties with mean logprob, then execute at most one “wet” tool call—so mission-critical tool selection is not “whatever story stitched best.” Per-model context compaction keeps long transcripts inside token budgets derived from context windows and mode, with fault isolation, so reliability work does not devolve into unbounded prompts and extra serial “summarizer” passes. The product thesis is that a production agent should look like nested parallel reliability: an outer orchestrator (business logic, memory, tools) that repeatedly invokes an inner parallel ensemble with different fusion rules for tools vs. narration—i.e. a deliberate reinvention of what an “agent” is: not one decoder loop, but a hierarchy of parallel checks tuned for compliance and correctness. Technical architecture — ARE inference (text / dashboard path). A client hits Next.js (POST /api/chat or POST /api/ensemble/stream), which proxies to the Python FastAPI gateway POST /stream (optional Authorization: Bearer when ENSEMBLE_BACKEND_SECRET is set). The gateway (stream_pipeline.py) drives ensemble_ui_sse_lines, emitting a Vercel AI SDK-shaped SSE stream: start, text-start, data-ensemble telemetry, text-delta, text-end, finish, [DONE]. Before inference, each model may run context compaction (sentrix.context.compact_context on a ContextBundle): graduated levels, salience, optional extractive packing, per-model budgets and reserve for generation, with failures isolated to that model. Parallel inference uses one async worker per model (asyncio.gather / streaming workers); with GEMINI_HTTP_SSE_STREAM enabled, streamGenerateContent can stream text_delta for UX while MBR/stitch consume terminal rows with full logprobsResult (see docs/streaming_logprobs.md). Each model request uses structured JSON (responseSchema) plus response logprobs when supported; on 400 / missing logprobs the client retries (plain JSON + logprobs, then structured without logprobs), yielding logprob_verified vs explicitly labeled structured_no_logprobs. From responses the backend derives mean_logprob, confidence_mean, min_top2_margin, per_token, and passes_threshold against mode thresholds (fast / thinking / …). If mbr: true, whole-answer mbr_select runs over valid hypotheses (non-empty answer, gate pass or structured_no_logprobs), default utility mean(token F1, chrF); mean_logprob ties only break exact utility ties. If stitch: true and at least two models succeed, StitchOrchestrator builds live TokenSpans via build_token_spans_for_answer (mapping token logprobs onto answer words), then by default sentence-atomic fusion (per-sentence weighted chrF MBR when counts align; else whole-segment MBR); legacy path uses medoid + Needleman–Wunsch, region discard from mean word logprobs, then weighted chrF MBR using sentrix/calibration.py. Final text follows _pick_answer: stitched if present, else MBR winner, else first consensus-eligible answer, else any success, else empty. Telemetry stages align with lib/pipeline-stages.json (e.g. ensemble.context_compact, ensemble.model_complete, consensus.mbr_select, stitch.orchestrator, output.emit). Technical architecture — ARE tool call (finance agent path). POST /api/finance-agent (Node, multi-step loop, max steps e.g. 12) runs two gateway-backed passes per iteration when needed. Tool ARE: buildToolArePrompt supplies portfolio state, transcript, and an XML contract (<rationale>, <action> JSON). runAreInference calls the gateway with mbr: false, stitch: false, sentence_atomic_fusion: false so the gateway returns raw per-model answers without corrupting structured output via prose fusion. TypeScript executionGuidedConsensus (consensus-tools.ts) parses each model’s XML, runs validateOnly through finance-tool-registry, clusters by toolCanonicalKey, selects majority, breaks ties with mean_logprob from the gateway complete row, then either no-ops / ends or executes a single normalized tool via executeNormalized (paper simulator). Text ARE: buildTextArePrompt then runAreInference with mbr: true, stitch: true (sentence-atomic unless SENTRIX_SENTENCE_ATOMIC_FUSION=0) for user-facing narrative; optional summary ARE if includeSessionSummary. Telemetry: data-finance-step phases and ARE_PASS_SEQ_STRIDE so tool vs text vs summary data-ensemble sequences stay sortable; stream_lifecycle may mark finance_pass_anchor / finance_pass_kind. Offline parity: ensemble_cli.py --inference-mode tool and finance_tool_are.py mirror the same XML contract and Python execution_guided_consensus.