playbook Generated TypeScript API reference. typescript api api/reference build/apidocs/Function.playbook.md function playbook

playbook

TypeScript
function playbook<IN, OUT>(program: Readonly<AxGen<IN, OUT>>, options: Readonly<AxPlaybookOptions>): AxPlaybook<IN, OUT>;

Defined in: https://github.com/ax-llm/ax/blob/3306475085414d36aee4411ad2466e08e53bef8a/src/ax/dsp/playbook.ts#L225

Create an evolving context AxPlaybook for a program.

A playbook accumulates task knowledge and renders it into the program’s context: grow it offline from examples (AxPlaybook.evolve), keep it growing online from live feedback (AxPlaybook.update), and persist/restore it (AxPlaybook.toJSON/AxPlaybook.load). The evolution engine is an implementation detail and never appears on this surface.

Type Parameters

Type ParameterDefault type
INany
OUT extends AxGenOutAxGenOut

Parameters

ParameterType
programReadonly<AxGen<IN, OUT>>
optionsReadonly<AxPlaybookOptions>

Returns

AxPlaybook<IN, OUT>

Docs