# Run LLM-generated Python safely from Go with monty-go: a pure-Go WASM wrapper

Original title: monty-go: Pure-Go wrapper for Pydantic's Monty Python Interpreter

> Hacker News story 49497928 · language: en · submitted 2026-08-30
> Web version: https://zeli.app/story/49497928
> About this feed: https://zeli.app/llms.txt · Agent guide: https://zeli.app/skill.md

▲ 55 · by [networked](<https://news.ycombinator.com/user?id=networked>) · 💬 12
[original](<https://github.com/fugue-labs/monty-go>) · [HN discussion](<https://news.ycombinator.com/item?id=49497928>)

## Summary

monty-go is a pure-Go wrapper around Pydantic's Monty Python interpreter, compiled to WebAssembly and run via wazero. It lets Go agents execute LLM-generated Python code safely in a sandboxed WASM instance with sub-millisecond startup, pausing for external function calls handled by Go callbacks. No containers, CGO, or subprocesses. Includes resource limits, print capture, and OS call routing. Designed for code-mode agents, it cuts LLM calls from N to 1, reducing latency and cost.

## Key quote

> No containers. No sandbox services. No `exec()`. Just a 2.9MB WASM binary embedded in your Go binary.

## HN discussion (12 comments)

### [camdenclark](<https://news.ycombinator.com/item?id=49500718>)

> Funny -- I just built a pure go wrapper myself because this one is super out of date!
>
> https://github.com/CamdenClark/monty-go
>
> It implements the new subprocess model for spawning Monty VMs that help keep your main thread isolated if one of the VMs crashes.
>
> Because Monty is packaged as a binary now, you don't need to do the WASM embedding stuff, you just need to make sure you have the binary. (Similar to how you would run playwright in Go, for example)

### [mkl](<https://news.ycombinator.com/item?id=49499532>)

> Monty itself seems much more interesting than a Go wrapper for a WASM runtime running the Rust implementation that runs the Python code.  There was a big discussion about it 6 months ago: https://news.ycombinator.com/item?id=46918254

### [digdugdirk](<https://news.ycombinator.com/item?id=49498259>)

> Is this Python in Rust in WASM in Go?
>
> The Monty name was a perfect choice, Yakety Sax was playing in the distance as I read through the readme.
>
> Jokes aside, I do love seeing WASM as a bridge to enable cool stuff like this.

---

## Cite

- Page: https://zeli.app/story/49497928
- Date: 2026-08-30
- Source: github.com (https://github.com/fugue-labs/monty-go)
- Hacker News: https://news.ycombinator.com/item?id=49497928

## Other languages

- zh: https://zeli.app/zh/story/49497928 · markdown: https://zeli.app/zh/story/49497928.md
- ja: https://zeli.app/ja/story/49497928 · markdown: https://zeli.app/ja/story/49497928.md
- ko: https://zeli.app/ko/story/49497928 · markdown: https://zeli.app/ko/story/49497928.md
- de: https://zeli.app/de/story/49497928 · markdown: https://zeli.app/de/story/49497928.md
- es: https://zeli.app/es/story/49497928 · markdown: https://zeli.app/es/story/49497928.md
- ru: https://zeli.app/ru/story/49497928 · markdown: https://zeli.app/ru/story/49497928.md
