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:
How It Works
- The orchestrator function creates futures for each sub-agent — this defines the calls without running them
- Futures are passed as arguments to the combiner function, which is returned as a tail call
- Tensorlake detects that the future arguments have no dependencies on each other and runs all sub-agents in parallel
- When all sub-agents complete, the combiner runs with their results
- The orchestrator’s container is freed immediately after returning the tail call
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.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.Document Processing Pipeline
Process a batch of documents through parallel specialist agents — a common pattern for intake automation in insurance, legal, and financial services.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().
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: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.