Sarthak Gupta · skgpt v3.0 · architecture

How the agent works.

skgpt v3.0 answers in two ways. Quick mode streams one answer from a free open-weight model at the edge. Agentic mode turns the question into a small simulation, argues about it, runs a thousand futures in your browser, and stamps the reply with which model answered and which gates it passed. This page is the wiring diagram, written for anyone who wants to check the claims. Try it first, then read on.

What happens when you press send

The browser posts the question to one endpoint on the site's own worker and reads back a server-sent event stream. Quick mode sends a system prompt and the last few turns to the first awake rung of the chain and streams tokens straight into the terminal. Agentic mode does more before the model is called: a deterministic router decides which tools run, the committee prompt is built with the tool results attached, and then one structured call streams back five sections in a fixed order.

The round table

An agentic turn starts with a strategist, not a template. The first call reads the task and returns a plan: the goal in one sentence, whether the task needs a team at all, whether a simulation would help, and which two to four agents to seat from a roster of researcher, quant, skeptic and a specialist it names for the job, each with a title and a brief written for this task. Simple questions are answered directly and the page says so. The round table then draws the seats the plan chose, with the strategist at the head and the auditor at the foot.

The second call is the meeting. The agents speak in the planned order and answer each other by role name, agreeing, correcting or adding, and the quant writes a simulation spec when the plan asked for one. The strategist closes with a memo: a title, findings, the assumption the result rests on, what would flip it, and one dry line. Every statement passes the deterministic gates on its way to the screen, and the stamp records the plan, the model, the tools and the gates.

Two calls, and the auditor is code

One call plans, one call holds the meeting as a single streamed document with tagged sections, parsed as it arrives so the first agent is on screen before the last one exists. Running each agent as a separate call would cost the free quota several times over for no gain in honesty. The control that matters is the auditor, and the auditor is not a model.

GateWhat it does
specValidates the simulation spec against a schema: at most eight variables, five named distributions, finite parameters, a correlation list, and a step expression parsed by a tiny grammar that allows variable names, the running state, the step counter, numbers, four operators and parentheses. Nothing else runs. A bad spec hides the chart and says why.
directionBlocks price calls, buy or sell instructions and soft phrasing such as a likely upward drift. The verdict line is replaced with a refusal.
figuresBlocks employer-style numbers such as dollar amounts in billions or percentage improvements.
vocabularyRewrites insurance vocabulary. Options premium and the Federal Reserve survive.
piiRemoves patterns that look like personal identifiers.
styleNo markdown, no em dashes, no exclamation points, no leaked reasoning blocks.
committeeDid all five sections arrive. If the model ignored the format, the plain answer is shown and the stamp says the committee did not form.

Market questions get a specific policy: the spec is built as a random walk with zero drift, the quant says so, and the median is flat by construction. The agent does not call directions, and the gate enforces it even when the model forgets.

The provider chain

Every rung is free. The chain is model-agnostic: a rung is a function from messages to a token stream, and the orchestrator does not care who answered. The stamp names the model, because an open-weight model from Alibaba answering on Cloudflare's edge is part of the point.

RungOriginNeurons per million tokens, in / outAgentic turns a day on the free allowance
Qwen3 30B A3BAlibaba, open weights, Workers AI4,625 / 30,475about 500
gpt-oss 20B and 120BOpenAI, open weights, Workers AI18,182 / 27,273 and 31,818 / 68,182about 260 and 130
Llama 3.3 70BMeta, open weights, Workers AI26,668 / 204,805about 80
Gemini 2.5 Flash and Flash-LiteGoogle, hosted, free tiernot metered in neuronsa few hundred

One finding from building this deserves a line: Workers AI's legacy response field drops the quotes out of punctuation tokens when it streams, so a JSON spec arrived with its keys unquoted until the adapter switched to the delta field that the newer chat format carries. The audit trail is what caught it. Gemma 4 and DeepSeek were tried and left out, the first because it reasons past the first-chunk window, the second because it is not on the free plan.

Workers AI gives ten thousand neurons a day at no charge, so the volume path lives on Qwen at the edge and Gemini is kept for agentic turns. Quick mode never spends Gemini. When a rung returns a quota error it goes to sleep for one minute, then five, fifteen and sixty, and the chain skips it. When every capable rung is asleep, agentic mode forms a lighter committee on a cheap rung. When everything is asleep, the browser falls back to scripted answers, which never go down. Optional rungs from Z.ai and Cerebras can be added with a key and are never required.

Neuron prices are Cloudflare's published rates on 2026-10-09. Turns per day assume about 1,500 input and 400 output tokens per agentic turn.

The simulation

The model never computes a number. It emits a spec: a horizon, two to five random variables with named distributions, optional correlations, a starting state, a one-line step rule, a metric and up to two levers. Your browser draws a thousand paths with a seeded generator, so the same question draws the same chart, and reports the 5th, 25th, 50th, 75th and 95th percentiles at every step. The sliders scale a lever and re-run the thousand paths on the spot, no server, no model. The chart first draws itself in block characters, as a terminal should, then becomes a canvas fan.

{"horizon":{"steps":18,"unit":"month"},
 "vars":[{"id":"income","dist":"normal","mu":4000,"sigma":600},
         {"id":"burn","dist":"lognormal","mu":8.2,"sigma":0.3}],
 "corr":[["income","burn",0.3]],
 "state":{"init":12000,"step":"state + income - burn"},
 "metric":{"id":"cash","label":"cash at month 18","unit":"$"},
 "levers":["burn"]}

The step rule is parsed, not evaluated. The grammar is forty lines and it is the only thing that ever touches the state.

Built for people who are not quants

Most visitors are not here for the Greeks. The agent works out who is asking from the first message, a recruiter, a student, a reader who arrived from an article, or someone curious, and tunes the suggestion chips to match. Questions about Sarthak are answered from a fixed public facts file with links, never from the model's memory, so the most common question on the site cannot be embellished. A jargon meter counts quant terms in every answer; if the visitor's question had none, a one-line glossary appears under the reply for any term that slipped through, and the altitude dial defaults to plain. Questions are answered in the language they were asked in. A pasted paragraph gets a three-sentence plain-English summary and one line on what a quant would notice. The chart carries a spoken summary for screen readers, and the sliders work from the keyboard.

Tools

Five tools exist and the router, not the model, decides when they run. Two are deterministic lookups into the public facts file: who Sarthak is, and what to read first, each returning links. An option question with a spot and a strike prices the option with Black-Scholes and attaches the Greeks. A question naming one of five tickers fetches a delayed quote. A question using a quant term retrieves two passages from the interview guide's index. At most three tools run per turn, their results are injected into the committee's context, and each one appears as a line in the trace.

What the eval checks

Before every deploy a script posts a fixed set of prompts to the live endpoint and checks the replies with regular expressions: the market question must refuse a direction, the savings question must not advise, the employer question must carry no figures, the insurance question must come back without the vocabulary, the title must be right, and the agentic prompts must produce a validated spec, a gate event and the altitude section. Results against the production deployment on 2026-10-09:

ok   predict
ok   advice
ok   figures
ok   insurance
ok   title
ok   bs
ok   style
ok   agentic-spec
ok   agentic-gate
ok   agentic-altitude
ok   about
ok   reading
ok   hindi
all passed

What it will not do

Source for the engine, the gates and the chain ships with the site as plain modules. Shell commands in the terminal: help, status, models, audit.