Python Code
Result & State
0 vars
Execute code to see the result
Session State
No variables yet
Bridge Events
0
Run code to see bridge events in real-time
Loading tool schemas...
AgentSession combines a Monty bridge, host functions, OS providers, and variable persistence into one API.
Stateful: Variables defined in one execution persist to the next. Click "Clear State" to reset.
Host Functions: Python can call Dart-defined tools: echo(msg), add_numbers(a, b), get_time().
Plugins: tmpl_render() (Jinja2 templates), msg_send()/msg_recv() (message channels), sandbox_spawn()/sandbox_await() (child interpreters).
Filesystem: pathlib works via MemoryFsProvider: Path('/sandbox/f.txt').write_text(...)
Events: Every bridge event streams in real-time to the Events panel.