from trelent_agents import (
Client,
ClaudeCodeHarnessSpec,
LocalImporter,
S3Exporter,
)
client = Client(
client_id="your-client-id",
client_secret="your-client-secret",
)
run = client.runs.create(
sandbox="translator:latest",
harness=ClaudeCodeHarnessSpec(model="claude-sonnet-4-6"),
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(),
],
)
while run.status not in ("completed", "failed", "cancelled"):
run.refresh()
print("Spanish translations:", run.result.output)
# Fork to translate the same files to French
french_run = run.fork(
prompt="Now translate the same files to French.",
imports=[
LocalImporter(path="./input"),
],
exports=[
S3Exporter(),
],
)
while french_run.status not in ("completed", "failed", "cancelled"):
french_run.refresh()
print("French translations:", french_run.result.output)