/experiments/2_1_workspace/

Section 2.1: a one-shot script from a chat box vs an agent working in a local workspace (3 independent runs each)

Files in this folder

File / folderDescriptionSize
📁 ../Up one level-
📁 fixture/Subfolder-
📁 trials/Subfolder-
📄 README.md8.3 KB
📄 check.py3.2 KB
📄 check_validation.json748 B
📄 counterfactual_url.json642 B
📄 counterfactual_url.py1.9 KB
📄 results.json4.2 KB
📄 run_agent.py4.6 KB
📄 run_chat.py3.6 KB

README.md

2.1 One request, written once in a chat box and once in a workspace: a "voice memos to text" script (English edition)

English twin of experiments/2_1_workspace/. Same design, English request, English fixture (audio and API.md), English success check. Run on 2026-10-14. Both conditions: 3 trials each, done.

How to run

From the textbook repo root. Both conditions use the Chinese experiment's venv (experiments/2_1_workspace/.venv: openai, httpx, requests), so A's generated code and B's agent see the same Python.

# A: chat box, trial n
op run --env-file experiments/aib.env -- experiments/2_1_workspace/.venv/bin/python experiments_en/2_1_workspace/run_chat.py gemini-3.8-flash 1
# A counterfactual (not counted): replace only the guessed URL with the real one and run again
op run --env-file experiments/aib.env -- experiments/2_1_workspace/.venv/bin/python experiments_en/2_1_workspace/counterfactual_url.py
# B: workspace agent, trial n
op run --env-file experiments/aib.env -- experiments/2_1_workspace/.venv/bin/python experiments_en/2_1_workspace/run_agent.py 1
# check one run directory; validate the check itself
experiments/2_1_workspace/.venv/bin/python experiments_en/2_1_workspace/check.py <run_dir>
experiments/2_1_workspace/.venv/bin/python experiments_en/2_1_workspace/check.py --validate

Design

Both conditions get the same sentence:

Write me a Python script that uses the AI Builder Space speech recognition API to transcribe the voice memos in the memos/ folder to text, and saves each one as a .txt file with the same name in transcripts/. The API key is in the environment variable AI_BUILDER_TOKEN.

Results

A: chat box (gemini-3.8-flash)

Trial First-try success Transcripts written Guessed endpoint Exit code Last line printed
A1 no 0/5 https://api.ai-builder.run/v1/audio/transcriptions 0 "Processing complete."
A2 no 0/5 https://api.ai-builder.space/v1/audio/transcriptions 0 "Batch transcription completed."
A3 no 0/5 https://api.ai-builder.space/v1/audio/transcriptions 0 (none; each file printed "FAILED" with the error)

Model time 13.6–17.8 s; script run 0.1–0.3 s.

Counterfactual (not counted, counterfactual_url.json). Only the guessed host replaced with the real one, nothing else changed: A1, A2 and A3 all succeed, 5/5 each (similarity 0.916–1.0).

B: workspace agent (Antigravity CLI 1.3.5, gemini-3.8-flash-high)

Trial First-try success Transcripts Time Key written to a file
B1 yes 5/5 251.5 s none
B2 yes 5/5 101.4 s none
B3 yes 5/5 98.6 s none

Caveats

Files