SYS.EDGE
POP: WAW
RTT: --ms
← BACK TO CASE STUDIES
[ 05 // PROJECT SCOPE & RESULTS ] · CLIENT: MENTENSOR (Internal Production System) · ROLE: End-to-end systems architecture and implementation · 2026 · Active in production

MENTENSOR: edge monolith, deterministic AI intake and agent discovery

Production architecture powering mentensor.eu on Cloudflare Workers with Static Assets, D1 SQL telemetry, Workers AI fallback and machine-readable agent discovery protocols.

RUNTIME TOPOLOGY Cloudflare Workers + Static Assets
INQUIRY ROUTING Deterministic KB + Llama 3.1 fallback
TELEMETRY STORE Cloudflare D1 (Edge SQL)
AGENT DISCOVERY RFC 8288 + Markdown negotiation

[ 01. BUSINESS CONTEXT ]

What needed to change

An engineering practice focused on edge infrastructure and deterministic AI should demonstrate those architectural decisions in its own production environment rather than through static claims alone. The system needed to serve a bilingual static interface with zero origin server maintenance, handle structured prospect inquiries without pricing or scope hallucinations, log edge telemetry in real time, and expose clean, low-token representations to external AI crawlers and in-browser agents.

[ 02. SYSTEM ARCHITECTURE ]

How the system fits together

[ Client / Browser / External AI Agent ]
    │
[ Cloudflare Edge Worker (run_worker_first) ]
    ├── Accept: text/markdown → serves /index.md + RFC 8288 Link headers
    ├── Static routes → Astro 5 SSG via env.ASSETS + Speculation Rules
    ├── /api/telemetry → Anycast POP diagnostics + Cloudflare D1 logging
    ├── /api/contact → Brief validation + structured terminal receipt
    └── /api/inquiry → Deterministic Intake Engine (JEV SEIA)
            ├── Domain boundary filter (rejects off-topic requests)
            ├── Verified knowledge base match (0 LLM tokens)
            └── Fallback classification → Workers AI (Llama 3.1 8B)

[ 03. ARCHITECTURAL DECISIONS ]

Scope and key decisions

1. Unify static delivery and edge APIs in one deployment unit. Migrating from separate static hosting to Cloudflare Workers with Static Assets put routing, security headers, D1 database bindings and Workers AI inference into a single edge monolith. 2. Prevent hallucinations on commercial and technical questions. The inquiry engine checks domain boundaries and matches verified knowledge base entries first. Generative AI (Llama 3.1 8B on Workers AI) is invoked only when a question requires fallback classification or synthesis. 3. Serve both human visitors and autonomous agents. Middleware inspects the Accept header to return pure Markdown for AI agents, attaches RFC 8288 / RFC 9727 discovery headers (.well-known/agent-card.json, mcp/server-card.json, llms.txt), and registers WebMCP tools in the browser context. 4. Keep main-thread work predictable. Below-the-fold sections use CSS content-visibility containment, navigation uses the Speculation Rules API, and interactive scripts yield to the main thread.

[ 04. RESULTS & DELIVERY STATUS ]

What the work delivered

▶ A single Cloudflare Worker deployment serves bilingual static pages, API routes, D1 telemetry and Workers AI bindings.
▶ Known commercial and architectural questions are answered from a verified knowledge base before any LLM call is made.
▶ Agent discovery manifests, Markdown content negotiation and Playwright E2E checks are part of the verified build pipeline.

When this approach applies

Relevant when a B2B technology company wants its public platform to handle high-speed global delivery, deterministic inquiry qualification and structured discoverability for AI search and autonomous agents.

[ 05. TECHNOLOGIES & TOOLS ]

Astro 5 Cloudflare Workers (Static Assets) Cloudflare D1 (Edge SQL) Workers AI (Llama 3.1 8B) TypeScript (Strict) Tailwind CSS v4 Speculation Rules API RFC 8288 / WebMCP Playwright E2E
[ A SIMILAR CHALLENGE? ]

Discuss your system

Describe the process, current constraints and result you need.

Discuss your project