Skip to content
Trigora
Start building →

Child executions

invoke starts another Program as a child Execution and suspends the parent until that child finishes.

import { invoke } from "@trigora/sdk";
const report = await invoke("summarize", "tcc");

The program id is a string. TypeScript also accepts a program function reference. The values after the name are the ordered argument vector. The parent’s public wait is { type: "child", executionId }.

from trigora import invoke, program
@program
async def research():
return await invoke("summarize", "tcc")

The child is one @program function in a file whose stem is summarize. See invoke.

The child has its own artifact pin, continuation, and status. A completed child result is reused if the parent resumes. The child is not started again.

Several children can start from await Promise.all / await Promise.race, await gather / await race, or Rust join / race of invoke calls. A detached race loser keeps running. See Structured concurrency and invoke.