AxAgentPlaybook Generated TypeScript API reference. typescript api api/reference build/apidocs/Class.AxAgentPlaybook.md class AxAgentPlaybook

AxAgentPlaybook

Defined in: https://github.com/ax-llm/ax/blob/3ac75e381dcefb739712993c304c34295567283a/src/ax/agent/agentInternal/agentPlaybook.ts#L25

Type Parameters

Type ParameterDefault type
IN extends AxGenInAxGenIn
OUT extends AxGenOutAxGenOut

Constructors

Constructor

TypeScript
new AxAgentPlaybook<IN, OUT>(agent: unknown, handle: AxPlaybook<IN, OUT>): AxAgentPlaybook<IN, OUT>;

Defined in: https://github.com/ax-llm/ax/blob/3ac75e381dcefb739712993c304c34295567283a/src/ax/agent/agentInternal/agentPlaybook.ts#L29

Parameters

ParameterTypeDescription
agentunknownThe owning agent coordinator (used by evolve).
handleAxPlaybook<IN, OUT>The inner stage-bound playbook the handle methods delegate to.

Returns

AxAgentPlaybook<IN, OUT>

Accessors

inner

Get Signature

TypeScript
get inner(): AxPlaybook<IN, OUT>;

Defined in: https://github.com/ax-llm/ax/blob/3ac75e381dcefb739712993c304c34295567283a/src/ax/agent/agentInternal/agentPlaybook.ts#L89

The inner program-level playbook handle (for advanced use).

Returns

AxPlaybook<IN, OUT>

Methods

configureAuto()

TypeScript
configureAuto(level: "medium" | "light" | "heavy"): void;

Defined in: https://github.com/ax-llm/ax/blob/3ac75e381dcefb739712993c304c34295567283a/src/ax/agent/agentInternal/agentPlaybook.ts#L84

Set the evolution intensity preset.

Parameters

ParameterType
level"medium" | "light" | "heavy"

Returns

void


evolve()

TypeScript
evolve(dataset: Readonly<AxAgentEvalDataset<IN>>, options?: Readonly<AxAgentPlaybookEvolveOptions>): Promise<AxAgentPlaybookEvolveResult<OUT>>;

Defined in: https://github.com/ax-llm/ax/blob/3ac75e381dcefb739712993c304c34295567283a/src/ax/agent/agentInternal/agentPlaybook.ts#L43

Grow the playbook from a task set. verify (default) keeps only bullets that provably help — re-scoring train + held-out after each candidate and rolling back regressions. verify: false applies mined lessons without the gate (trust-batch). Produces only playbook bullets. Must not run concurrently with forward() on the same agent instance.

Parameters

ParameterType
datasetReadonly<AxAgentEvalDataset<IN>>
options?Readonly<AxAgentPlaybookEvolveOptions>

Returns

Promise<AxAgentPlaybookEvolveResult<OUT>>


getState()

TypeScript
getState(): AxPlaybookSnapshot;

Defined in: https://github.com/ax-llm/ax/blob/3ac75e381dcefb739712993c304c34295567283a/src/ax/agent/agentInternal/agentPlaybook.ts#L63

A serializable snapshot of the current playbook and its history.

Returns

AxPlaybookSnapshot


load()

TypeScript
load(snapshot: Readonly<AxPlaybookSnapshot>): this;

Defined in: https://github.com/ax-llm/ax/blob/3ac75e381dcefb739712993c304c34295567283a/src/ax/agent/agentInternal/agentPlaybook.ts#L73

Restore a snapshot and render it into the live stage.

Parameters

ParameterType
snapshotReadonly<AxPlaybookSnapshot>

Returns

this


render()

TypeScript
render(): string;

Defined in: https://github.com/ax-llm/ax/blob/3ac75e381dcefb739712993c304c34295567283a/src/ax/agent/agentInternal/agentPlaybook.ts#L58

The current playbook rendered as a markdown block.

Returns

string


reset()

TypeScript
reset(): void;

Defined in: https://github.com/ax-llm/ax/blob/3ac75e381dcefb739712993c304c34295567283a/src/ax/agent/agentInternal/agentPlaybook.ts#L79

Clear the playbook back to its initial state.

Returns

void


toJSON()

TypeScript
toJSON(): AxPlaybookSnapshot;

Defined in: https://github.com/ax-llm/ax/blob/3ac75e381dcefb739712993c304c34295567283a/src/ax/agent/agentInternal/agentPlaybook.ts#L68

Alias of getState so JSON.stringify(handle) yields a snapshot.

Returns

AxPlaybookSnapshot


update()

TypeScript
update(args: Readonly<{
  example: unknown;
  feedback?: string;
  prediction: unknown;
}>): Promise<void>;

Defined in: https://github.com/ax-llm/ax/blob/3ac75e381dcefb739712993c304c34295567283a/src/ax/agent/agentInternal/agentPlaybook.ts#L51

Refine the playbook from a single live interaction (trust).

Parameters

ParameterType
argsReadonly<{ example: unknown; feedback?: string; prediction: unknown; }>

Returns

Promise<void>

Docs