Skip to main content
Forking creates a child run that inherits the parent’s sandbox and model.
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

client = Client()

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

sibling_run = parent_run.fork(
    prompt="Translate the same text to German.",
    imports=[
        LocalImporter(path="./documents"),
    ],
)