Documentation Index
Fetch the complete documentation index at: https://docs.trelent.com/llms.txt
Use this file to discover all available pages before exploring further.
This example brings everything together: a translator sandbox that processes local files, exports results to S3, and forks to try multiple languages.
The sandbox
FROM python:3.12-alpine
RUN apk add --no-cache bash curl gawk \
&& curl -sL https://git.io/trans -o /usr/local/bin/trans \
&& chmod +x /usr/local/bin/trans
COPY skills/ /skills/
WORKDIR /workspace
CMD ["sh", "-c", "while true; do if [ -f /shutdown/terminate ]; then exit 0; fi; sleep 1; done"]
Build and push. The image tag must be prefixed with your client ID (<registry-url>/<client-id>/<image-name>:<image-tag>), otherwise the registry will reject the push:
export CLIENT_ID="your-client-id"
export CLIENT_SECRET="your-client-secret"
export IMAGE=registry.trelent.com/$CLIENT_ID/translator:latest
echo "$CLIENT_SECRET" | docker login registry.trelent.com -u "$CLIENT_ID" --password-stdin
docker build -t $IMAGE .
docker push $IMAGE
The script
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)
What happens
- The run imports files from
./input/ to /mnt/.
- The agent reads
/skills/translate.md to learn the trans CLI.
- It translates each file to Spanish using bash.
- Results export to the default S3 bucket on completion.
- The fork inherits the sandbox and harness from the parent.
- It translates to French and exports to S3 as well.