Skip to main content
Every agent framework has converged on the same pattern: break a complex task into independent subtasks, run specialist agents on each subtask in parallel, and synthesize the results. LangGraph does this with Send and @task futures. OpenAI Agents SDK uses asyncio.gather and agent.as_tool(). Claude Agent SDK spawns subagents via the Task tool. Deep Agents dispatches parallel task tool calls. On Tensorlake, you get the same fan-out/fan-in pattern — but each sub-agent runs in its own container with dedicated resources, independent retries, and durable checkpointing. No asyncio plumbing, no graph DSL, no shared memory coordination.

Basic Pattern: Fan-Out and Combine

Define each sub-agent as a @function(), create futures for each, and pass them to a combiner function as a tail call:
Execution flow:

How It Works

  1. The orchestrator function creates futures for each sub-agent — this defines the calls without running them
  2. Futures are passed as arguments to the combiner function, which is returned as a tail call
  3. Tensorlake detects that the future arguments have no dependencies on each other and runs all sub-agents in parallel
  4. When all sub-agents complete, the combiner runs with their results
  5. The orchestrator’s container is freed immediately after returning the tail call
The orchestrator’s container is freed immediately after returning the tail call. You’re not paying for an idle container while sub-agents work.

Real-World Patterns

These patterns are inspired by what teams are building in production with LangGraph, OpenAI Agents SDK, Claude Agent SDK, and Deep Agents — reimplemented on Tensorlake with container isolation, independent scaling, and durable execution.

Parallel Research with Synthesis

The most common multi-agent pattern across every framework: decompose a research question into subtopics, investigate each in parallel, and synthesize the findings. This is the pattern behind GPT Researcher, Exa’s web research system, and Anthropic’s multi-agent research system.
Each researcher runs in its own container with its own 15-minute timeout and 2 retries. If one subtopic’s research fails (rate limit, network error), only that subtopic is retried — the other researchers’ work is preserved.

Multi-Perspective Analysis

Multiple specialist agents examine the same input from different analytical perspectives — a pattern used in production for investment analysis, proposal review, and compliance checks.
This mirrors the multi-agent portfolio collaboration pattern from the OpenAI Agents SDK cookbook — but each analyst runs in an isolated container with its own timeout and retry policy.

Document Processing Pipeline

Process a batch of documents through parallel specialist agents — a common pattern for intake automation in insurance, legal, and financial services.
After extraction, classification and compliance checking run in parallel — they both depend on the extracted text but not on each other. If the compliance check hits a rate limit, it retries independently without re-running OCR or classification.

Use Any Agent Framework

Each sub-agent can use whatever framework you want internally. The @function() boundary is a container boundary — what runs inside is up to you. Define each specialist as a focused function using its framework, then fan them out with .future().
Each agent runs in its own container with its own dependencies — no version conflicts, no shared memory, no asyncio event loop contention. If the risk assessment takes longer than the others, the completed agents’ results are checkpointed and preserved.

Different Resources Per Agent

Each sub-agent can have its own container configuration:

Chaining Parallel Stages

You can chain stages where each stage fans out in parallel:
Each stage waits for its dependencies automatically. Stages without dependencies run in parallel.

Using Futures for More Control

When you need to do work in the orchestrator while sub-agents run, use Futures instead of tail calls:

Learn More

Futures

Deep dive on futures, tail calls, and parallel execution.

Async Functions

Use Python async/await for parallel workflows.

Map-Reduce

Parallel processing over lists of data.