This reference application is built on the v1 SDK (
@aithos/sdk) and is no longer maintained. It is kept for reference only.The v2 line lives in aithos-core (protocol, specification, conformance vectors) and aithos-client (client engine). No public v2 reference application exists yet.
v1 is Apache-2.0. The v2 line is under BUSL 1.1, converting to Apache 2.0 on 19 July 2030.
Website: aithos.world
Reference app for @aithos/sdk — a single-actor, envelope-only demo of the
Aithos protocol. Rebuilt from scratch around one idea:
You are either an owner or a single delegate, never both, and the whole UI reflects exactly what that one actor can do. The owner is just the actor whose every capability is granted; a delegate is the same surface restricted to its mandate scopes (everything else greyed).
There is no JWT anywhere. Every protocol call — ethos, data, mandates, compute, wallet, assets — is a signed envelope. The only sign-in doors are the two that work purely locally:
- Create a
#dataidentity — mints a fresh self-custodydid:aithoswith a#datasphere, publishes its DID document, hands you a recovery file (runOnboarding). - Load a recovery file — restores an owner from its seeds.
- Paste a mandate — become that mandate's delegate.
Sign-out wipes every trace (owner keys + delegates + session).
src/actor-context.tsx is the keystone. It exposes:
actor—{ kind: "owner" | "delegate", subjectDid, … }ornull.capabilities—ethosRead/ethosWrite(zone),dataCan(col, action),canIssueMandates,canCompute,canWallet,canAssets. Owner = all true.getEthosClient()—sdk.ethos.me()(owner) orsdk.ethos.of(subjectDid)(delegate).dataClient— owner's fullDataClientunder#data, or the delegate'sReadonlyDataClient.
Pages read capabilities to enable/grey controls. The nav greys links the actor
can't use.
| Tab | Owner | Delegate |
|---|---|---|
| Profile (ethos) | edit every zone | only granted zones; write needs ethos.write.<zone>; surfaces "authorized but not sealed" |
Data (#data) |
full CRUD playground | read-only over granted data.<col>.read collections |
| Mandates | issue one combined mandate (zones + #data collections + assets.*.read) |
(owner only) |
| Compute | text / image / transcribe, direct | runs under the mandate; needs compute.invoke |
| Agent | runConversation over a working-set |
needs compute.invoke |
| Wallet | balance + Stripe top-up | (owner only) |
| Assets | did:key demo (see limits) | (owner only) |
- Delegate data write.
createDelegateDataClientis read-only;insert / update / deleteassert owner. So awrite/admindata scope grants read only. Delegate mutation isappend-only (insert sealed to owner) — and the delegate Data UI doesn't expose append yet, so write/admin/append are greyed in the mandate form (v0.2). - Assets under a
did:aithosowner. The assets client takes one sphere seed; adid:aithosowner has independent per-zone keys, so the Assets tab still uses an ephemeraldid:keydemo. Assets delegation is a v0.2 protocol target (scopes are declared forward-compat). - Custodial / Google sign-in. Dropped here (they're the JWT doors and need
the app's real
appDidorigin-allowlisted forlocalhost). The registered appDid isdid:aithos:z6Mkm6tHeRiM1546AJEj8G1JP7qWhqJPnPshVJL14DWAC9q7; the Google callbackhttp://localhost:5173/auth/callbackis set — wiring these in is a follow-up. - Ethos delegate reads need a seal. A zone is decryptable by a delegate only after the owner publishes it once with the delegate's wrap. The Mandates tab reminds you to re-publish the granted zone after issuing.
scripts/e2e-full-flow.mjs runs the whole actor flow against the live
api/pds.aithos.be, all envelope-signed: owner onboarding → recovery sign-in
→ ethos publish → data CRUD under #data → combined ethos+data mandate +
authorizeDelegate + re-publish-to-seal → delegate ethos+data decrypted
reads.
node scripts/e2e-full-flow.mjs # 12/12 passedIt mints throwaway identities, so it's safe to run repeatedly.
pnpm install
pnpm dev # http://localhost:5173
pnpm check-typesThe previous version of this app, kept verbatim for reference during the
strangler migration. Out of the TypeScript build (tsconfig only includes
src). Delete once the rewrite is fully validated.