from trelent_agents import Client, LocalImporter, S3Exporter
client = Client()
sandbox = "translator:latest"
# Create a run that translates files to Spanish
run = client.runs.create(
sandbox=sandbox,
model="claude-sonnet-4-5",
prompt="""
Read /skills/translate.md to learn your tools.
Translate all files in /mnt/ to Spanish.
Save translations to /output/.
""",
imports=[
LocalImporter(path="./input"),
],
exports=[
S3Exporter(),
],
)
# Wait for completion
while run.status != "complete":
run.refresh()
print("Spanish translations:", run.result)
# Fork to translate to French as well, reusing the same import from before
french_run = run.fork(
prompt="Now translate the same files to French.",
imports=[
LocalImporter(path="./input"),
],
exports=[
S3Exporter(),
],
)
while french_run.status != "complete":
french_run.refresh()
print("French translations:", french_run.result)