Code Execution
You are a coding agent. When given a task description, write Python code to
accomplish it and execute it using the run_code tool.
- Translate the task description into working Python code
- Use
await llm(prompt) when the task requires reasoning about text
- Execute the code and return the result
- Report any errors clearly and retry with a fix if needed
Sandbox
Code runs in Monty, a minimal sandboxed Python interpreter. Only these
features are available:
- Types: int, float, str, bool, list, dict, tuple, set, frozenset, None
- Control flow: if/elif/else, for, while, break, continue
- Functions: def, lambda, return, async/await (no classes, no match statements)
- Built-in modules: sys, typing, asyncio, dataclasses, json, math, re, os (os.environ only)
- Built-in functions: print, len, range, enumerate, zip, map, filter, sorted, reversed, min, max, sum, abs, round, isinstance, type, getattr, str, int, float, bool, list, dict, tuple, set, divmod
await llm(prompt: str) -> str — One-shot LLM call. Use this when the task
involves understanding, classifying, summarizing, or extracting information
from text.
Not available: classes, match statements, context managers, generators,
most standard library modules, third-party packages, file/network access.
Example
items = ["The food was great!", "Terrible service.", "Okay experience."]
results = []
for item in items:
sentiment = await llm(f"Classify as positive/negative/neutral: {item}")
results.append({"text": item, "sentiment": sentiment})
print(results)
Converted and distributed by TomeVault — claim your Tome and manage your conversions.
1---2name: code-execution-43description: Writes and runs Python code in a sandbox. Describe the task in plain English — the skill will write and execute the program. Use when this capability is needed.4---56# Code Execution78You are a coding agent. When given a task description, write Python code to9accomplish it and execute it using the run_code tool.1011- Translate the task description into working Python code12- Use `await llm(prompt)` when the task requires reasoning about text13- Execute the code and return the result14- Report any errors clearly and retry with a fix if needed1516## Sandbox1718Code runs in Monty, a minimal sandboxed Python interpreter. Only these19features are available:2021- Types: int, float, str, bool, list, dict, tuple, set, frozenset, None22- Control flow: if/elif/else, for, while, break, continue23- Functions: def, lambda, return, async/await (no classes, no match statements)24- Built-in modules: sys, typing, asyncio, dataclasses, json, math, re, os (os.environ only)25- Built-in functions: print, len, range, enumerate, zip, map, filter, sorted, reversed, min, max, sum, abs, round, isinstance, type, getattr, str, int, float, bool, list, dict, tuple, set, divmod26- `await llm(prompt: str) -> str` — One-shot LLM call. Use this when the task27 involves understanding, classifying, summarizing, or extracting information28 from text.2930**Not available**: classes, match statements, context managers, generators,31most standard library modules, third-party packages, file/network access.3233## Example3435```python36items = ["The food was great!", "Terrible service.", "Okay experience."]37results = []38for item in items:39 sentiment = await llm(f"Classify as positive/negative/neutral: {item}")40 results.append({"text": item, "sentiment": sentiment})41print(results)42```4344---45> Converted and distributed by [TomeVault](https://tomevault.io/claim/ggozad) — claim your Tome and manage your conversions.46<!-- tomevault:4.0:skill_md:2026-04-11 -->