Skip to content

Playground: run your AI agent on a human study - #4

Merged
XuanL17 merged 1 commit into
mainfrom
feat/playground
Aug 8, 2026
Merged

XuanL17 merged 1 commit into
mainfrom
feat/playground

Conversation

@XuanL17

@XuanL17 XuanL17 commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Adds /playground, where a researcher picks a study and a base model, designs the prompt the agent takes into the experiment, and sees where the agent behaved like the original participants and where it did not.

Pairs with HumanStudy-Hub/HumanStudy-Bench#14, which has to merge first — GitHub can only dispatch a workflow that exists on the default branch.

What a user does

  1. Choose a study and a base model (four common OpenRouter models, or any model id).
  2. Design the participant prompt: the four shipped presets, per-run demographic overrides (age, gender, background, a persona note), or a prompt written from scratch.
  3. Run it, and watch participant sessions complete.
  4. Read the result: summary tiles, the charts and written reading produced for the run, a test-by-test table against the paper's published findings, and the transcripts the agents actually produced.

How it runs

Dispatched to run-playground.yml in HumanStudy-Bench, with run state, progress, and results on a runs/<id> branch of the private jobs repository — the same shape as Build Study. Nothing about a run executes inside Vercel. The page polls /api/playground/runs/<id>.

Researcher-supplied keys

Runs use the shared OPENROUTER_API_KEY Actions secret at 10 participants per condition. A researcher can paste their own OpenRouter key for 80. That key is sealed with AES-256-GCM under PLAYGROUND_KEY_SECRET before it is written anywhere, so the jobs repository only holds ciphertext, the sealed value is stripped in readRun so it can never reach a browser, and the workflow drops it when the run ends.

New environment variable: PLAYGROUND_KEY_SECRET, which must match the Actions secret of the same name in HumanStudy-Bench. Without it the playground still runs on the shared key and only refuses researcher-supplied keys.

Also in this PR

  • Home page: a one-line explanation under each of Explore datasets, Build a study, and Playground, so a first-time visitor can tell them apart.
  • Agent Evaluations opens with a panel linking into the playground.
  • Agent Evaluations subheading trimmed to "See how AI agents reproduce human behavioral effects."

Verification

tsc --noEmit, eslint, and next build are clean. Pages were checked in a browser against a synthesized completed run: three charts drawing real data, the test-by-test table, correct summary tiles, and no horizontal overflow at 375px.

Not yet exercised: a real dispatched run, which needs the bench PR merged and a deploy.

🤖 Generated with Claude Code

The playground lets a researcher choose a study and a base model, design
the prompt the agent takes into the experiment, and see how the run
compares to the people in the original paper.

The prompt designer offers the four shipped participant prompts, per-run
demographic overrides, or a prompt written from scratch. Results arrive
as summary tiles, the charts and reading produced for the run, a
test-by-test table against the paper's findings, and the transcripts the
agents actually produced.

Runs are dispatched to HumanStudy-Bench and stored on a run branch of
the private jobs repository, the same shape as Build Study; nothing
about a run executes inside Vercel. Runs use the shared OpenRouter key
with a small participant cap, and a researcher can supply their own key
for a larger one. That key is sealed with AES-256-GCM before it is
stored and never reaches a browser.

The home page now explains what Datasets, Build a study, and Playground
each do, and Agent Evaluations opens with a link into the playground.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@vercel

vercel Bot commented Aug 8, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
humanstudy-hub-web Ready Ready Preview Aug 8, 2026 3:03pm

@XuanL17
XuanL17 merged commit 8da646b into main Aug 8, 2026
2 checks passed

This branch was successfully deployed

1 active deployment
Preview — e5ab5b91 Deployed Aug 8, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant