Live data from Hacker News

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

github.com

11–15 of 15 posts

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

#11
post #9

Are there significant differences re: sandboxing between Lua and monty? Just curious if there are any holes that a Lua sandbox has that monty might account for

The main property that's really important is that Monty VM state is fully serializable and resumable. So you can run the VM code until you get to a host call, then serialize and persist the state to disk. Then, at a later time you can resume the VM with the tool call results.

Even Luau (which was made for sandboxing user code) don't really have this property.

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

#12
post #5

If you're going to run Python code inside a WebAssembly container anyway why go with the Monty subset when you could use full CPython (or MicroPython) compiled to WASM instead?

1. Control and guardrails. I want agent-authored code to be able to express itself in code but I want to own the external tools that are available to the agent. 2. Suspension and resumption. Monty's VM state is fully serializable so I can run the VM until it gets to a tool call and persist the VM state. I could resume it days later with the results of the tool call with no issues. Doing that guaranteed with CPython i…

I'm pretty sure that first one can be achieved using MicroPython or CPython.

Your point 2 is very convincing: I hadn't realized Monty had serializable state as a core feature, that's a very compelling attribute for an agent runtime! I have my own projects that could benefit from that.

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

#13
post #12

Earlier quoted context omitted.

1. Control and guardrails. I want agent-authored code to be able to express itself in code but I want to own the external tools that are available to the agent. 2. Suspension and resumption. Monty's VM state is fully serializable so I can run the VM until it gets to a tool call and persist the VM state. I could resume it days later with the results of the tool call with no issues. Doing that guaranteed with CPython i…

I'm pretty sure that first one can be achieved using MicroPython or CPython. Your point 2 is very convincing: I hadn't realized Monty had serializable state as a core feature, that's a very compelling attribute for an agent runtime! I have my own projects that could benefit from that.

Absolutely the first one could be achieved using one of those tools. But Monty makes it feel so native, it even packages a type checker so you can provide stubs for the external functions (so you provide feedback to the agent on the type of those things).

Serializable state is the most cool property though. It's really undersold in the explanations but makes running durable agent workflows authored in code possible!

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

#14
post #12

Earlier quoted context omitted.

I'm pretty sure that first one can be achieved using MicroPython or CPython. Your point 2 is very convincing: I hadn't realized Monty had serializable state as a core feature, that's a very compelling attribute for an agent runtime! I have my own projects that could benefit from that.

Absolutely the first one could be achieved using one of those tools. But Monty makes it feel so native, it even packages a type checker so you can provide stubs for the external functions (so you provide feedback to the agent on the type of those things). Serializable state is the most cool property though. It's really undersold in the explanations but makes running durable agent workflows authored in code possible!

I’m curious about examples you have for using this? I am only thinking about if you wanted an agent to be serviced by a multi node system you could pause and resume an agent, or maybe you could warm up a Monty VM with certain state then store it as the default Monty environment for your agents? I actually have use cases for this but I want to find more and really think about using this in my software.

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

#15
post #5

If you're going to run Python code inside a WebAssembly container anyway why go with the Monty subset when you could use full CPython (or MicroPython) compiled to WASM instead?

1. Control and guardrails. I want agent-authored code to be able to express itself in code but I want to own the external tools that are available to the agent. 2. Suspension and resumption. Monty's VM state is fully serializable so I can run the VM until it gets to a tool call and persist the VM state. I could resume it days later with the results of the tool call with no issues. Doing that guaranteed with CPython i…

[flagged]
Post reply on HN