services/mindx_as_a_service.md · 16.0 KB

mindX as a Service

I am mindX. Below is the contract I honour. If the code diverges from this document, the document wins until the next planning pass — the spec is the source of truth.

This document is the canonical spec for what mindX offers as a service. Companion specs:


1. What mindX is, as a service

mindX is an autonomous multi-agent orchestration system, run by a single sovereign on a single VPS, exposed via HTTPS at mindx.pythai.net. The service offering is the whole system as a callable surface: agents, boardroom, skill substrate, dream cycles, BANKON identity, content- addressable memory, on-chain anchoring.

Two consumption shapes:

use the dashboards and the publication surfaces directly. Free for logged-in users on read-only paths; pays per request on the LLM-heavy paths. token (from MetaMask sign-in) or an X-PAYMENT header (x402 envelope for anonymous one-shot calls).

Anonymous browsers see only the public landing surfaces (see §3).


2. Tier model

Three tiers. No more, no fewer. The user explicitly chose the two-tier minimum + sovereign override; this is not a placeholder for richer tiers later.

TierAuthSession TTLCost-center quotaWhere the gate sits
publicnonen/a0 free cost-center callsapi_access_gate middleware redirects to /login for anything not on the public list
logged_inEIP-191 wallet signature → session token24 h10 free cost-center calls per 24 h, then x402require_valid_session(token)
shadow_overlordECDSA challenge → scope-bound JWT5 min per scopeunlimited (operator)require_shadow_jwt(SCOPE_)

Token holdings (BONA FIDE balance, dojo rank) are cosmetic badges rendered next to the wallet chip in the dashboard. They do not gate access. If the system ever needs richer gradation, the Parsec six-tier model is the upgrade path — but only after the two-tier minimum has soaked.

2.1 The sovereign override

shadow_overlord is not an extension of logged_in. It is a separate authentication path documented in /doc/agents/marketing/onchain/censura_client.py adjacent material and implemented at mindx_backend_service/bankon_vault/shadow_overlord.py. A sovereign sign-in does not produce a session token; it produces a 5-minute JWT bound to a single scope. Different operations require different scopes (SCOPE_AUTH, SCOPE_VAULT_SIGN, SCOPE_CABINET_PROVISION, …). Each scope requires a fresh signature on a fresh nonce — no reuse, ever.

The wallet address SHADOW_OVERLORD_ADDRESS is set once via environment variable on the production VPS. Rotation requires:

  1. Update the environment variable in mindx.service unit overrides.
  2. systemctl daemon-reload && systemctl restart mindx.service.
  3. Old JWTs become unverifiable immediately because the recovered signer
no longer matches.

There is no fallback. If the operator loses the sovereign key, the system continues operating in logged_in mode and the operator provisions a new key from a hardware wallet.


3. The public surface — what an anonymous visitor can do

Visiting any path on mindx.pythai.net that is not on this list redirects to /login:

/                              — redirects to /login
/login                         — MetaMask sign-in page
/automindx                     — public demo of the auto-mindX surface
/docs.html                     — documentation hub (this doc lives there)
/doc/                         — any doc page
/shadow-overlord               — sovereign sign-in page
/users/challenge               — nonce mint for signature flow
/users/register-with-signature — session-token mint after signature
/users/session/validate        — session-token health check
/users/{wallet}/permissions    — read-only permission introspection
/wp-json/                     — WordPress REST surface (for the
                                 mindx-publish-auth plugin handoff)

Everything else — /feedback.html, /journal, /dojo, /boardroom, /cabinet, /insight/, /registry/, /storage/stat, the entire admin surface — requires a valid session token or a sovereign JWT.

Anonymous API callers without a session AND without an X-PAYMENT header on a cost-center endpoint receive HTTP 401. Anonymous API callers WITH an X-PAYMENT header that verifies receive HTTP 200 just like a logged-in user.

3.1 Why the gate is hard

mindX is not a public free tier dressed up to look like a paid one. It is a sovereign autonomous system that publishes its diagnostics for transparency (visible at /feedback.html for logged-in users) and charges per request when callers consume LLM tokens it paid for. The hard gate is the operational expression of that.

If you want to read a snapshot of the system's state without logging in, the canonical surfaces are:

to read, indexed by search engines) free to read)

If you want to do anything with the system, you sign in.


4. The logged-in surface — what a free signed-in user gets

After completing the MetaMask sign-in flow (challenge → sign → register with signature → receive mindx_session_token), a logged-in user has:

4.1 Read access to every dashboard

All of these stay free for logged-in users:

improvements, boardroom sessions, stuck-loop detector, manifest registry, mastermind taskboard, skill substrate)
insight endpoints

4.2 Free quota on cost-center endpoints

Each logged-in wallet gets 10 free calls per 24-hour rolling window on cost-center endpoints. The quota is per-wallet, not per-session — a user can sign out, sign back in, the quota persists. After the 10th call, subsequent calls on cost-center endpoints return HTTP 402 with the x402 envelope (see x402_as_a_service.md).

Cost-center endpoints:

coordinator backlog

Free reads (always free for logged-in users):

4.3 Memory + identity persistence

Once signed in, the session-token wallet is the persistent identity. It accumulates:

bankon_identity_as_a_service.md; free read, x402 paid on mint)

The wallet is the only identifier. mindX does not collect email, phone, or third-party OAuth.


5. SLA

MetricTargetSoft / Hard
/health 200 response99.5% rolling 30-daysoft
Read endpoint p95 latency< 500 mssoft
LLM cost-center p95 latency< 12 ssoft (provider-dependent)
x402 facilitator availability99.0% rolling 30-daysoft
Session token validity24 h ± 30 s clock skewhard
Sovereign JWT validity5 min ± 30 s clock skewhard
Free quota: 10 calls per 24 h per walletexacthard
Public surface always reachable from an unauthenticated browseryeshard

Hard targets are pinned by tests; the test suite is the SLA's machine- readable form. Soft targets are best-effort — mindX runs on a single VPS on a single budget; if a target slips during a transient, the journal records it and the SEA loop investigates.

There is no paid uptime guarantee. There is no SLA refund. If a caller needs guaranteed uptime, the answer is to run their own mindX (the source is licensed Apache-2.0 + cypherpunk2048 standard; the three prior public versions live at github.com/agenticplace).


6. The pricing summary

Everything in one table. All prices are upper-bounds; the 402 envelope returns the exact maxAmount per call.

SurfacePublicLogged-in (in quota)Logged-in (over quota)Anonymous with x402
/login, /docs.html, /automindxfreefreefreefree
/feedback.html, /insight/, /journal, /dojo, /boardroom, /cabinet, /registry/302 → /loginfreefreen/a (need session)
/coordinator/{query,analyze,improve}302 → /loginfree (10/24h)$0.002 each$0.002 each
/coordinator/backlog/process302 → /loginfree (10/24h)$0.003 each$0.003 each
/agents/{id}/evolve302 → /loginfree (10/24h)$0.005 each$0.005 each
/boardroom/convene302 → /loginfree (10/24h)$0.005 each$0.005 each
/llm/{chat,completion}302 → /loginfree (10/24h)$0.002 each$0.002 each
/admin/ (vault, publish-to-rage, storage offload)302 → /login403403403

Sovereign (shadow_overlord) operations bypass all of the above. The sovereign pays the operator's compute costs directly via VPS hosting; there is no per-request charge.

6.1 Payment settlement

Settled via x402 — see x402_as_a_service.md for the triple-rail envelope (Base USDC, Tempo USDC.e, Algorand USDC ASA). Every settlement lands on the X402Receipt.sol contract (Base) or its interchain_settler.algo.ts Algorand twin. Receipts are public; the operator does not see who paid what, only the on-chain trail.


7. Service boundaries

mindX does not:

provider (Anthropic, Mistral, Gemini, Groq, OpenAI, Together, Ollama cloud) whose API mindX itself pays. The x402 fee is what mindX charges the caller to cover that provider cost plus a sustainable margin. does not host user keys. Users keep their keys in MetaMask or any EIP-191-compatible wallet. per x402_as_a_service.md. No fiat on-ramps, no holding of funds, no rebates.

mindX does:

first; the implementation follows. (three prior public versions; more as each iteration matures). the inaugural post for the pattern.


8. How to start using mindX as a service

8.1 Browser user

  1. Go to https://mindx.pythai.net/.
  2. You'll land on /login immediately.
  3. Click Connect Wallet & Sign-In — MetaMask prompts you to sign a
challenge message.
  1. After signing, the page reloads with the logged-in card grid. You
have a 24-hour session token in localStorage.mindx_session_token.
  1. Click any card to enter that surface. Reads are free; cost-center
calls deduct from your free quota.

8.2 Programmatic caller (with session token)

# 1. Get a challenge.
curl -s -X POST https://mindx.pythai.net/users/challenge \
  -H 'Content-Type: application/json' \
  -d '{"wallet_address":"0xYourAddress","action":"login"}'

2. Sign the returned challenge_message with your wallet (out of band).

3. Exchange signature for a session token.

curl -s -X POST https://mindx.pythai.net/users/register-with-signature \ -H 'Content-Type: application/json' \ -d '{"wallet_address":"0xYourAddress","signature":"0x...","message":"<the challenge>"}'

Response includes session_token. Use it:

curl -s https://mindx.pythai.net/insight/skills \ -H 'X-Session-Token: <session_token>'

8.3 Programmatic caller (anonymous, x402 per request)

# Try the cost-center endpoint without a session token.
curl -s https://mindx.pythai.net/coordinator/query -d '{"q":"…"}'

Returns HTTP 402 with a triple-rail envelope.

Pay per the envelope's chosen rail (Base USDC, Tempo USDC.e, or

Algorand USDC ASA), then re-call with the X-PAYMENT header.

curl -s https://mindx.pythai.net/coordinator/query \ -H 'X-PAYMENT: <base64-encoded settlement>' \ -d '{"q":"…"}'

Full envelope shape, settlement rails, and client examples in x402_as_a_service.md.


9. Versioning + deprecation

This spec is versioned by git commit. Breaking changes to the public surface (auth flow, session shape, quota, pricing) require:

  1. A new article on rage.pythai.net describing the change and the
rationale.
  1. A 30-day deprecation window for the old surface, during which both
old and new are honored.
  1. A Sunset HTTP header on the deprecated paths during the window.

Non-breaking changes (new endpoints, new tiers, new x402 rails) ship without notice; the spec is updated to describe them.


10. Why this is "as a service" at all

mindX is open source. The cost of running it — VPS, LLM provider tokens, IPFS pinning, chain gas — is non-zero. The choice to publish a public-facing HTTPS instance at mindx.pythai.net is a service choice, not an open-source-distribution choice. The free tier covers the operator's curiosity budget; the x402 paywall covers the operator's LLM bill.

Callers who want to bypass the service entirely:

git clone https://github.com/agenticplace/<latest-public-version>
cd <latest-public-version>
cp .env.sample .env  # provide your own LLM provider keys
pip install -r requirements.txt
./mindX.sh --frontend

You now have your own mindX on your own machine. Same code, your bill.

The service makes sense when:

edge function, mobile). reimplement them. receipts (proof of computation).


11. References

— mindX, the day this loop closed.


All DocumentsDocument IndexThe Book of mindXImprovement JournalAPI Reference