Skip to content
thebeastagiPublic

About

Cloudflare-native chat app served by the ATLAS engine (OLMo-3-32B-Think) with MCP. A CF-native port of the LibreChat idea. Open weights, verifiable answers.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

AtlasChat

A Cloudflare-native chat app served by ATLAS — The Beast's own Rust/CUDA inference engine.

Open weights · reasoning you can see · answers you can verify · local-first history.


What is AtlasChat?

AtlasChat is a full-stack Cloudflare-native chat interface — a port of the LibreChat idea onto Cloudflare's edge stack (Workers + Static Assets + D1 + KV) — that talks to our own ATLAS engine serving OLMo-3-32B-Think (AWQ 4-bit) on a single NVIDIA A100. No PyTorch, no vendor API: the model, the runtime, and now the chat surface are all ours.

It is not another closed ChatGPT clone. The thesis (see issue #8) is that the winning open chat interface makes trust, portability, and privacy mechanically verifiable:

  • Open weights. The model is public on Hugging Face — you can run the same one yourself.
  • Reasoning transparency. OLMo-3-Think emits its chain-of-thought; AtlasChat renders it as a first-class, collapsible panel instead of hiding it.
  • Verifiable answers (roadmap wedge). A "Verify this answer" button returns provenance for the response. Today that is a content digest + model id (honest placeholder); the ZK-Schnorr proof of weight provenance (ATLAS atlas prove) is the phase-3 upgrade — the demo no closed competitor has.
  • Local-first. Conversation history lives in your browser (IndexedDB) by default. Nothing leaves the device unless you opt into sync.
  • Bring-your-own-backend. Point it at our A100, your own atlas api serve, or any OpenAI-compatible endpoint.

Status: local-runnable reference build. Not publicly deployed. Public launch, the A100's public exposure, and chat.thebeastagi.com all stay behind The Beast's explicit publishing gate.

Why Cloudflare-native (not a LibreChat fork)?

LibreChat is an excellent Node.js + MongoDB application, but it assumes a long-running server + database. AtlasChat targets the edge: one Cloudflare Worker serves the built SPA (via the Assets binding) and the API, with D1 for opt-in sync and KV for rate-limiting. No origin server, no Mongo, global by default, and it scales to zero. A librechat.yaml for the classic LibreChat-fork path is still included under librechat-compat/ for anyone who wants that route.

Architecture

  Browser (React SPA)              Cloudflare Worker (Hono)             A100 / astra-01
  ┌─────────────────────┐  HTTPS  ┌──────────────────────────┐  tunnel ┌──────────────────┐
  │ chat UI + reasoning │ ──────► │ /api/chat  (SSE proxy)   │ ──────► │ atlas api serve  │
  │ local-first (IDB)   │ ◄────── │  + Bearer injection      │         │ OpenAI-compat    │
  │ "Verify" badge      │  stream │  + per-IP rate-limit (KV)│         │ olmo3-32b (W4)   │
  │ served via ASSETS   │         │ /api/models /verify /mcp │         │ + atlas prove    │
  └─────────────────────┘         │ /api/conversations (D1)  │         └──────────────────┘
                                   └──────────────────────────┘

The Worker injects the origin Bearer key (never exposed to the browser), floors max_tokens for the Think model, enforces a per-IP rate limit to protect the single serialized A100, and streams the SSE straight through. Full detail in docs/ARCHITECTURE.md.

Akash Deployment / Hosting

Status: planned — pending pilot funding. Scaffolding + runbook only; nothing is deployed and no funds are spent yet.

If AtlasChat is a front-end for "the people's model," the backend should live somewhere that matches the ethos. The plan is to serve the ATLAS engine from a decentralised, crypto-settled GPU network rather than a hyperscaler. After a web-verified evaluation of 11 decentralised GPU networks, Akash Network was chosen as the #1 host: it's the only one that runs our exact Rust/CUDA container with an exposed port (via an SDL manifest), serves persistent LLM endpoints today, has A100-80GB / H100 capacity, and settles on-chain in AKT or USDC with no KYC.

What gets deployed: the W4-quantised OLMo-3-32B-Think ATLAS engine (our own serving binary) as a Docker image on a single A100-80GB Akash provider, exposing the OpenAI-compatible port — with persistent storage for the ~20–24 GB W4 weights.

Architecture (backend repointed, front-end unchanged):

  Browser ──► Cloudflare Worker (AtlasChat BFF) ──► Akash lease
              SSE passthrough + Bearer inject      ATLAS engine · olmo3-32b (W4)
              + per-IP rate-limit                  A100-80GB · on-chain settled

The Worker keeps the Bearer server-side and just points ATLAS_BASE_URL at the Akash lease — no engine change needed.

Cost (indicative, re-verify live): A100-80GB $0.77–1.10/hr → **$555–800/mo**; H100 $1.45/hr → **$1,050/mo**. Pilot budget ~$1,000–1,500 in USDC escrow for one month + buffer. A Fetch.ai Questbook grant is being pursued in parallel to offset pilot compute.

The reviewable SDL manifest and full deploy runbook (install CLI → fund escrow → tx deployment create → lease → send-manifest → verify endpoint → benchmark vs baseline) live in deploy/akash/. Everything there uses env-var placeholders only — no committed secrets, registry creds, or wallet keys. A real akash tx waits on The Beast's funding + go-live gate.

Run it locally against ATLAS

Prereqs: Node 20+, an ATLAS endpoint you can reach (a local atlas api serve, an SSH port-forward to the A100 on :8080, or the fleet tunnel).

npm install
cp .dev.vars.example .dev.vars        # then edit ATLAS_BASE_URL + ATLAS_API_KEY (never commit this)

# Terminal 1 — Worker + bindings (D1/KV auto-provisioned locally):
npm run build                          # build the SPA once so ASSETS has something to serve
npx wrangler d1 migrations apply atlaschat --local
npm run cf:dev                         # wrangler dev on :8787

# Terminal 2 — Vite dev server with HMR, /api proxied to :8787:
npm run dev                            # open http://localhost:5173

For a production-style local run, npm run build then npm run cf:dev serves the built SPA + API from the single Worker on :8787.

Config knobs

Where Key Purpose
.dev.vars / wrangler secret ATLAS_BASE_URL ATLAS OpenAI endpoint incl. /v1. Secret.
.dev.vars / wrangler secret ATLAS_API_KEY Bearer for the endpoint. Secret — never commit.
wrangler.jsonc vars ATLAS_MODEL Model id (olmo3-32b).
wrangler.jsonc vars ATLAS_DEFAULT_MAX_TOKENS Floor ≥ 2048. Think models spend budget inside <think>; too low ⇒ empty visible answer (the answer-reserve bug).
wrangler.jsonc vars RATE_LIMIT_MAX / RATE_LIMIT_WINDOW_SECS Per-IP request budget.
wrangler.jsonc vars MCP_ENABLED_SERVERS Comma-separated MCP server names to enable (see below).

MCP

AtlasChat speaks MCP over the Streamable-HTTP transport (Workers can't open raw TCP), so any HTTPS-reachable MCP server works — including ATLAS's own GraphPalace tools once fronted by the small bridge in docs/MCP.md. Enable servers via MCP_ENABLED_SERVERS and point the corresponding secret URLs at them; /api/mcp/servers lists advertised tools and /api/mcp/call invokes them. A copy-paste example config is in docs/MCP.md.

Accuracy note

AtlasChat makes no benchmark or quality claims about model output. OLMo-3-32B-Think is a reasoning model; it can be wrong. Verify anything that matters. The only guarantees AtlasChat asserts are structural (open weights, local-first storage, content-digest provenance) — each is a checkable property, not a marketing line.

License

MIT — see LICENSE. Built by The Beast (thebeastagi.com). ATLAS engine + weights: see the ATLAS repo and Hugging Face.

About

Cloudflare-native chat app served by the ATLAS engine (OLMo-3-32B-Think) with MCP. A CF-native port of the LibreChat idea. Open weights, verifiable answers.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages