Kinetech · MARCUS — Managed Agent Resource Constructing Unbelievable Software

How a Marcus Instance actually works.

The complete picture: what a client experiences, the full architecture behind it, where every external call is made and what it costs — and where we can make it cheaper. Written for a non-technical reader, with the technical depth folded in along the way (look for the ⚙ boxes).

01 · The idea in one picture

A developer you subscribe to, with a paper trail

A Marcus Instance is a hosted AI developer dedicated to one client. Their team writes what they want as user stories. Marcus plans it, builds it, runs the app, tests every user journey, documents everything — then publishes the evidence and waits. Nothing ships until a human on the client's side clicks Approve.

Client team writes user stories approves the gates their Jira / Epics board Marcus Instance plans · builds · runs the app drives every user journey security + accessibility scans writes the documentation isolated VM per client agent + toolchain + Docker Evidence Console every build graded screenshots & test runs pending approvals public dashboard tamper-evident audit trail Their app standard Mendix, in their repository Mendix Team Server stories evidence decision links — Approve / Request changes commit
client actionsMarcus outputsfree / owned by client
For the technical reader — what "waits for Approve" means mechanically
Approvals are rows in a Postgres table (approvals), raised automatically by the build flows (ready, design-lab) and gated on by scripts via an exit-code contract: approval wait --id … exits 0 approved / 3 pending / 4 changes-requested — so a pipeline literally cannot proceed past a pending decision. The client decides through a tokened link (#approval=<uuid>&t=<token>); the token is the only credential that can write, it's checked inside a security definer RPC, and it's stored in a table with zero anonymous read policies. Duplicate raises are deduped — a re-run reuses the open decision and reproduces the same link.

02 · A milestone, day by day

What a typical week looks like

Day 1 · Client
Stories & sign-offsPM writes stories; approves the scope, the permission model, and picks a design direction from 2–3 presented variants
Days 1–4 · Marcus
Build & self-testDomain model, pages, logic, security; runs the app in Docker and drives every role's journeys, fixing as it goes
Day 5 · Marcus
Evidence & READYFull gate run: tests, accessibility, security, performance, docs, user guide — graded and published
Day 5 · Client
AcceptThe acceptance decision arrives as a link; ~1 hr of Studio Pro checklist for their Mendix dev if the milestone needed it
On accept
Commit landsStandard Mendix commit with full Studio Pro metadata on their Team Server branch

Client time per milestone: a few hours of decisions, not days of supervision. The blue cards are the only ones that need them.

03 · The full architecture

Every component, and who owns it

Three zones: the client's world (their people, board, repository — everything they already own), the per-client instance Kinetech operates (one isolated machine per client), and shared Kinetech services (the evidence store and dashboard). External paid services sit outside all three, reached only through metered, controlled paths.

CLIENT'S WORLD MARCUS INSTANCE (per client) SHARED KINETECH SERVICES EXTERNAL PAID APIs Product owner + Mendix dev stories · approvals · 1 SP session Their Jira / Epics board REST API · scoped token Mendix Team Server (git) their PAT · branch-isolated Their Mendix Cloud env deploys stay theirs Agent loop (Claude, hosted API) plans, writes model & code, reads results, decides next step every token metered per build Mendix toolchain model writers + validators mxcli · Platform SDK · mx 82 capability pillars Live app under test the client's app, running Docker: runtime + Postgres headless browser drives it Local AI models critique · docs · translation Ollama — $0 per call Quality gates tests · a11y · security · perf fail-closed READY verdict Secrets vault + usage meter + comms policy client tokens never leave the box · every LLM call logged · etiquette enforced as config Evidence store (Postgres) builds · gate results · approvals audit ledger (hash-chained) Supabase · append-only Console dashboard grades, screenshots, approvals web · read-only + tokened decide Ops: kill switch + monitoring per-instance stop · alerts Anthropic API (Claude) the dominant cost — see §05 Mendix Platform APIs marketplace · deploy · free commits evidence decision links (tokened) — client approves on the Console metered LLM calls module installs
client-owned flowfreepaid (metered)internal
For the technical reader — the concrete components behind each box
Agent loop: Claude Code sessions driving the marcus toolchain under repo-law process gates (plan gate, verification ladder, fail-closed READY). Toolchain: mxcli MDL as primary model writer, Mendix Platform SDK for Team Server working copies, mx.exe for consistency checks, BSON-level surgery where grammars fall short — 82 pillars, ~4,500 test assertions. App under test: mxcli docker run stack (runtime + Postgres) driven by puppeteer; a11y via axe-core; load via k6. Local AI: src/llm/provider.ts routes local-first to Ollama, paid fallback only when local can't do the capability. Meter: src/ledger/inference-usage.ts parses agent transcripts + the router log into a costed per-build gate row. Evidence store schema: builds, gate_results (append-only sink incl. scorecard + usage rows), approvals/approval_tokens, audit_events (per-app hash chain: hash = H(body + prev_hash)). Console: static web app on Netlify; anonymous key is read-only by RLS; the only anonymous write path is the token-checked decide_approval RPC. Comms policy: data/comms-policy.json + pure evaluator — outward writes (Slack/Jira) check per-client channel rules; unknown clients fail closed.

04 · Where every call is made

The call map — what leaves the box, and what it costs

Everything a Marcus Instance does either stays on its own machine (free) or crosses the network to a named service. This is the complete list of those crossings. Amber = costs money per use. Green = free. Blue = infrastructure with a flat monthly fee. Only the amber rows cost per-use money, and every amber row is metered per build.

#Call site (who makes the call)DestinationPurposeCostMetered?
1Agent loop — the AI developer thinking and working
Claude Code harness, every reasoning/tool step
Anthropic APIPlanning, writing model & code, reading test output, deciding next stepsPAID — ~85–95% of all spend✔ per build, from session transcripts
2LLM router — pillar features (UI critique, doc-fill, translation, role narratives, feedback enrichment)
src/llm/provider.ts · llmComplete()
Local Ollama first; Anthropic only as fallbackMechanical AI passes$0 local paid fallback✔ every call, both providers
3Legacy direct callers — a handful of older features not yet moved onto the router
agent, ai-doc-seed, review-narrative, translation-*, image-to-mockup
Anthropic APISame class of work as #2PAID — migration debt✔ via transcripts; router migration closes the gap
4In-app feedback widget (in delivered client apps)
JA_SubmitFeedback Java action
Anthropic (optional) + JiraTurn user feedback into tickets$0-stub is the defaultenrichment runs local-first offline
5Evidence & approvals — every verify/ready run
ledger, approval CLI, flow hooks
Supabase (Kinetech)Store builds, gates, approvals, audit chain~$25/mo flat, all clientsn/a
6Team Server pushes
git + Platform SDK, with SP commit metadata
Client's Mendix Team ServerDeliver the workfreen/a
7Board reads/writes
stories-push, feedback router — comms-policy gated
Client's Jira / EpicsStories in, tickets outfreepolicy-gated per client
8Module installs
marketplace-install via Content API
Mendix MarketplaceHeadless module installsfreen/a
9Everything else — compiles, app runtime, browser drives, screenshots, voice transcription (whisper), accessibility scans, load testsstays on the instance VMThe actual engineering$0 — local computen/a

The one-sentence takeaway: the only meaningful per-use cost in the whole system is the AI reasoning itself (rows 1–3), it all goes to one vendor, and we already meter it per build — a real 2-hour reading on our own machine came to 99 calls / 35.4M tokens / ≈ $36.50.

05 · What an instance costs to run

Where the money goes

AI inference ~$750–2,500
VM $250–400
Kinetech hours $300–1,500
infra <$75

Monthly cost per active instance (straw-man ranges; the meter replaces these with real numbers per client). Inference scales with build cadence — a quiet month costs almost nothing.

~$40–125
per active build-day of AI inference (measured basis)
10–20
active build-days assumed per instance-month
100%
of paid calls metered per build — cost is a gate row, visible on the Console
For the technical reader — how the meter works
Two sources feed a costed inference-usage gate row on every build: (1) the agent loop's own per-message usage records parsed from Claude Code session transcripts (deduped by message id, cache-write 5m/1h split priced 1.25×/2.0×), and (2) an append-only router log written by every llmComplete() call — including $0 local calls, so paid-calls-avoided is itself visible evidence. Unknown models are flagged unpriced, never silently guessed. Pricing basis: public per-MTok rates, cache reads at 0.1× input.

06 · Where we can save

The savings map — banked, ready, and worth exploring

Since inference is ~85–95% of per-use cost, that's where the levers are. Honest split: some savings are already built in, some are one engineering pass away, and one — running our own AI models — is worth doing for part of the workload but cannot replace the core.

LeverWhat it doesEst. saving / instance-moStatus
Local-first AI routingMechanical AI passes (critique, docs, translation, enrichment) run on our own machine at $0; the paid API is only a fallback$100–300 vs naïve all-APIBANKED — enforced in code
Prompt cachingRepeated context (rules, docs, history) billed at ~10% of full price~50–70% of what input would costBANKED — measured in the meter
$0-stub feedback defaultClient-app feedback files raw tickets free; enrichment runs local-first offlinesmall but structuralBANKED
Batch API for verification passesGate re-runs, critiques, and doc passes aren't latency-sensitive — the batch endpoint is 50% off$150–400READY — one engineering pass
Effort tieringRun mechanical steps at low reasoning effort, save the deep thinking for design/debugging$100–300READY — tune with meter data
Router migration (call map #3)Move the legacy direct-API callers onto the local-first router$50–150READY — known list
Self-hosted LLM (GPU box)See the analysis below — real, but bounded$100–400 at maturityEXPLORE — staged
BYO API key (client's own)The client's Anthropic key in their instance vault — inference bills to them directly, at roughly 15–25% off their monthly. Removes our most volatile cost line entirely and dissolves any reseller question; the meter becomes their cost-transparency vieweliminates the amber rows from OUR ledger per BYO clientBANKED — zero engineering, offered as a plan modifier
Subscription seats vs metered APIFor BUNDLED clients only: if hosted instances may run on subscription seats, inference becomes a flat ~$100–200/mo$500–2,000 on bundled plansEXPLORE — a licensing question for Anthropic; moot for BYO-key clients

The self-hosted LLM question, answered honestly

Can we stand up our own model and stop paying per token? Partially — and the split matters:

Recommendation: bank the two READY levers first (batch + effort tiering: ~$250–700/instance-mo for a few days' work), buy one GPU box for the fleet when we pass ~3 instances, and pursue the subscription-seat question in parallel — it's the only lever bigger than all the others combined.

07 · Trust & control

The boundaries that make this safe to sell

BoundaryPlain languageMechanism
Client credentialsTokens the client issues, scoped to the minimum, revocable by them any time — and they never leave the instanceper-client vault on the isolated VM; never in code, models, or the evidence store
Nothing ships unapprovedWork waits on a human clickapproval gates with exit-code enforcement; branch isolation until accepted
Decisions are signaturesOnly the person holding the decision link can decide, and it's on the recordper-approval secret token, checked server-side; decider + note + timestamp stored
Everything is on the recordWho did what, when, and why — provable laterappend-only evidence + hash-chained audit ledger (tampering breaks the chain)
Outward messages are policiedMarcus can't ping the wrong channel or clutter a client boardper-client comms policy config; unknown clients fail closed
Kill switchAny instance can be stopped instantlyper-instance stop; one client, one blast radius

08 · Operations — escalations, responses, and the question budget

Minimal humans, by contract — and what happens when one is needed

Clients pay to not go back and forth. So the human interface is designed as a strict budget: the client is asked exactly four kinds of question, ever — and everything else either gets done, or climbs an escalation ladder that exhausts the machine's options before any person is interrupted.

The question budget (client side)

The client hears from Marcus when…FormNever
A decision gate is reached — approve scope · ratify roles · pick a design · accept a milestoneA decision link on their Console; one click + optional note❌ "How should we…?"
❌ "Do you want us to… or will you…?"
❌ Anything answerable from the model, the board, prior approvals, or config.

Material implementation choices get made and recorded in the audit trail — not asked.
A decision goes stale — pending > 48hOne-line nudge with the same link (repeats every 72h; work is parked, never guessed at)
A milestone landsEvidence summary + what's next

The escalation ladder (before any human is interrupted)

RungWhat the instance doesHuman involved?
1 · RecallSearches the knowledge corpus for a recorded fix — most walls have been hit before, and the fix is written downNo
2 · Re-surveyRe-checks its tools for a capability it missed — recorded limitations are treated as hypotheses to retest, not factsNo
3 · Alternate routeTries the other sanctioned paths for the same outcome (different writer, different layer)No
4 · EscalateFiles a structured ticket on the Kinetech ops board: what it tried at rungs 1–3, the evidence bundle (logs, model state, build history), severity, and which client is affected. Fires the on-call alert.Kinetech engineer — SLA per the response level agreed in your engagement
5 · AbsorbThe resolution is written back into the knowledge corpus and, where applicable, the toolchain — so rung 4 never fires for this wall again, on any client's instanceEngineer, once — then never again

Why support load falls over time: rung 5 is the flywheel. Every escalation any client ever triggers becomes a rung-1 answer for the whole fleet. The support cost curve bends down as the corpus grows — we've already retired three "permanent" human steps this way.

Responses & requests (the everyday interface)

For the technical reader — what exists today vs what workstream 1.7 adds
Today: the decision gates + tokened links + dedup are live; the comms policy engine (incl. the new autonomy config: decision gates, never-ask list, stale-approval cadence) ships in data/comms-policy.json; the escalation ladder rungs 1–3 are enforced repo law (scar lookup, re-survey rule, routing matrix); the feedback widget → enrich → route pipeline runs against real client boards. Workstream 1.7 (ops automation) adds: the structured rung-4 escalation filer (auto-ticket + evidence bundle + Slack on-call), stale-approval nudge scheduler, and the fleet view on the Console (per-instance status/cost/pending-decisions rollup).

09 · Technical appendix

The parts list

Quality gates that run on every build
mx-check · unit-tests · user-test (driven journeys, positive + negative per role) · test-coverage · mockup · screenshots · a11y (axe, WCAG 2.1 AA) · security-scan · vuln-scan · performance · load (k6) · documentation (100% in-model) · user-guide · nav-icons · login · seed · inference-usage (cost) · rollup: release-scorecard (6 graded dimensions). A gate that never ran shows not-configured — absence is visible, never silent. ready is the fail-closed verdict over all of it, including a per-sprint full per-role UX audit.
Data contract (evidence store)
builds(app, trigger, started/finished, pass/fail counts, ok) → gate_results(build_id, gate, status, metrics jsonb, detail, artifacts) — append-only, scorecard + usage ride as rows, no schema churn. approvals(app, kind: roles|design|spec|ready, title, payload jsonb, status: pending|approved|changes_requested, requested/decided by+at, note) + approval_tokens (service-role-only) + decide_approval() RPC. audit_events(app, seq, kind, actor, body, prev_hash, hash) — unique(app, seq), hash-chained.
Operator commands (the product's control plane today)
npm run approval -- request|list|status|wait|decide · npm run ready (auto-raises acceptance) · npm run design-lab (auto-raises design decision) · npm run verify (gates → Console) · npm run ledger (manifest + usage row) · npm run comms-check -- --app X --channel Y · npm run handoff-pack -- --app X --spec … (client-facing Studio Pro checklist) · npm run marketplace-install · mxf ship (end-to-end governed build).
Repos & deployment
marcus (toolchain, gates, CLI — private, never delivered to clients) · mxforge-console (dashboard web + Supabase schema; deployed on Netlify) · per-client app repos on their Mendix Team Server. Instance hosting target: one isolated VM per client (§03), provisioned from a golden image — workstream 1.2.

Status when this was written: approval surface, metering, comms policy, and handoff packs are built and live-verified. Instance isolation (the per-client VM packaging) is the next workstream. Pricing figures are straw-man ranges the meter will replace with measured data during the pilot.

Where this goes next

Tell Marcus where you are — you will leave with a range, the assumptions behind it, and the answers that would narrow it. Nothing is charged, and nothing is quoted before we have read something of yours.

Talk to Marcus What drives the price See the evidence
KINETECH · MARCUS — Managed Agent Resource Constructing Unbelievable Software
123456

You are reading The full proposal — deeper detail on step 2, How does it work?.

That is the mechanism. The fair response is 'prove it' — so next is exactly how a build has to prove itself.

Back to How does it work?Next — Why believe it?