Skip to main content

fork_agent_parallel

Function fork_agent_parallel 

Source
pub async fn fork_agent_parallel(
    handle: Arc<SurrealHandle>,
    parent_commit: &str,
    count: u8,
    prefix: &str,
) -> Result<ForkResult>
Expand description

Fork multiple agent branches from a parent commit

Creates count new branches, each starting from the same parent commit. The branches are created concurrently using Tokio.

§TDD: test_five_branches_are_forked_and_run_concurrently_via_tokio

§Arguments

  • handle - SurrealDB handle
  • parent_commit - Commit ID to fork from
  • count - Number of branches to create
  • prefix - Branch name prefix (branches named “{prefix}-0”, “{prefix}-1”, etc.)

§Returns

  • ForkResult containing the created branch names and commit IDs