Skip to main content
Most agent demos stop at “the LLM wrote some code.” This one closes the loop — Claude writes the script, the agent pays Judge0 to actually execute it, and the verified output flows back. Useful when you want machine-verified correctness, not just plausible-looking code.

The prompt

The prompt is deliberately self-contained — the script carries its own sample data, so nothing needs to be uploaded. Judge0’s sandbox can’t read your local files anyway; embedding the data is what makes the “verify” step real (the agent proves the EMA logic executes correctly on a known series). To run it on your own OHLC data, paste a few rows into the prompt or pipe a CSV via stdin as the SDK example below shows.

What runs

  1. POST /anthropic/v1/messages — Claude writes Python (~$0.02)
  2. POST /judge0/v1/submissions — Judge0 executes it in a sandbox (~$0.02)
Judge0 supports 70+ languages — Python, Node.js, Go, Rust, Bash, SQL, etc. The same recipe works for any of them; swap the language_id.

Run it

SDK

CLI


Expected output

(The minimal CLI snippet below runs fib(10) instead and prints 55 — same write-then-run loop, simplest possible payload.)

Extend it

  • Swap to Together (/together/v1/chat/completions) for Llama-4 code generation at the same price
  • Use Judge0 /v1/languages (~$0.02) to discover available runtimes if you want to branch on language
  • Pipe the verified output into Firecrawl (/firecrawl/v1/scrape) to compare against data scraped from another source
  • Pair with OpenAI (/openai/v1/chat/completions) as a second opinion — have one model write the code, the other review it before Judge0 runs it