Skip to main content

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.

Forking creates a child run that inherits the parent’s sandbox and harness. The child starts from the parent’s final workspace state, so any files the parent wrote are available to the fork.
child_run = run.fork(
    prompt="Now translate that to French instead.",
    imports=[
        LocalImporter(path="./documents"),
    ],
)
You can also fork later from another script:
from trelent_agents import Client, LocalImporter

client = Client(client_id="...", client_secret="...")

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

sibling_run = parent_run.fork(
    prompt="Translate the same text to German.",
    imports=[
        LocalImporter(path="./documents"),
    ],
)
Forks reuse the parent’s sandbox and harness. They can’t be changed on the fork call — create a fresh run if you need a different harness or sandbox.