agentskit.js

createEnsembleAdapter

Auto-generated API reference for createEnsembleAdapter.

Function: createEnsembleAdapter()

createEnsembleAdapter(options): AdapterFactory

Defined in: ensemble.ts:87

Build an AdapterFactory that runs the same request against N candidates in parallel, then aggregates the results into a single text output. Unlike speculate (which picks a winner), ensemble combines — majority vote, concatenation, longest, or a custom fn.

The returned source emits a single \{ type: 'text' \} chunk with the aggregated output followed by \{ type: 'done' \}, so it plugs into any runtime that expects a regular streaming adapter.

#Parameters

#options

EnsembleOptions

#Returns

AdapterFactory

Explore nearby

✎ Edit this page on GitHub·Found a problem? Open an issue →·How to contribute →

On this page