Skip to main content
A run is one execution of a prompt inside a sandbox. Each run has:
  • A sandbox (the machine the agent runs on)
  • A model (the LLM to use)
  • A prompt (instructions for the agent)

Create a run

from trelent_agents import Client

client = Client()

sandbox = "translator:latest"

run = client.runs.create(
    sandbox=sandbox,
    model="claude-sonnet-4-5",
    prompt="Translate 'Hello world' to Spanish.",
)

Get a run

from trelent_agents import Client

client = Client()

run = client.runs.get("run_1234567890")

Get the result

Once run.status is "complete", the final response is available:
print(run.result)
# => "Hola, mundo."

Advanced use