psyos v0.0.0

// in active development · MIT

An open-source platform for psychology experiments,
built so that LLM agents are first-class researchers.

PsyOS lets humans and agents author experiments in a declarative DSL, publish them as immutable versions, and collect participant data — all on Cloudflare's free and near-free tier. No proprietary auth, no managed databases, no SaaS lock-in.

What it is

Agent-native

LLM agents are first-class users — they design experiments, simulate participants, and assist researchers through the same APIs humans use. Built on the Cloudflare Agents SDK with durable per-thread state.

OSS, no lock-in

MIT licensed. No proprietary auth, no managed Postgres, no SaaS dependency. Anyone can self-host on a free Cloudflare account in 30 minutes.

Declarative DSL, jsPsych runtime

Experiments are JSON. A pure compiler turns them into jsPsych v8 timelines so you inherit 200+ plugins and a decade of psych runtime maturity.

Edge-native cost profile

D1 for metadata, R2 for event streams, Workers for everything else. Realistic monthly cost at MVP scale: under $50.

Roadmap

  1. SP-1 Foundation shipped
  2. SP-2 DSL + Compiler + Runtime shipped
  3. SP-3 Backend API + Data shipped
  4. SP-4 Studio UI planned
  5. SP-5 Agent Platform planned
  6. SP-6 Launch + Self-host docs planned

Each milestone is a self-contained sub-project. Specs live under docs/superpowers/specs/ in the repo; plans under docs/superpowers/plans/. Built using a brainstorm → spec → plan → execute discipline.

Stack

  • SvelteKit 2
  • Cloudflare Pages
  • Cloudflare Workers
  • Hono
  • Cloudflare D1
  • Drizzle ORM
  • Cloudflare R2
  • Cloudflare Agents SDK
  • OpenRouter
  • jsPsych 8
  • Zod 4
  • Vitest
  • Biome
  • pnpm + turborepo

Try it locally

git clone https://github.com/pajamadot/psyos
cd psyos
pnpm install
pnpm db:setup
pnpm dev

Three workers come up on ports 5173 (web), 8787 (api), 8788 (agent). Open localhost:5173/examples/stroop to run the demo experiment.