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

AxAgentContextMap

Defined in: https://github.com/ax-llm/ax/blob/5b28f9093bb70863b59459bb6df5062d005bce41/src/ax/agent/contextMap.ts#L607

Constructors

Constructor

TypeScript
new AxAgentContextMap(input?: 
  | string
  | AxAgentContextMapSnapshot, options?: AxAgentContextMapOptions): AxAgentContextMap;

Defined in: https://github.com/ax-llm/ax/blob/5b28f9093bb70863b59459bb6df5062d005bce41/src/ax/agent/contextMap.ts#L615

Parameters

ParameterType
input?| string | AxAgentContextMapSnapshot
options?AxAgentContextMapOptions

Returns

AxAgentContextMap

Properties

PropertyModifierType
textpublicstring

Methods

applyUpdatePayload()

TypeScript
applyUpdatePayload(payload: ContextMapUpdaterOutput): AxAgentContextMapUpdateResult;

Defined in: https://github.com/ax-llm/ax/blob/5b28f9093bb70863b59459bb6df5062d005bce41/src/ax/agent/contextMap.ts#L688

Parameters

ParameterType
payloadContextMapUpdaterOutput

Returns

AxAgentContextMapUpdateResult


snapshot()

TypeScript
snapshot(): AxAgentContextMapSnapshot;

Defined in: https://github.com/ax-llm/ax/blob/5b28f9093bb70863b59459bb6df5062d005bce41/src/ax/agent/contextMap.ts#L650

Returns

AxAgentContextMapSnapshot


tag()

TypeScript
tag(itemId: string, tag: string): boolean;

Defined in: https://github.com/ax-llm/ax/blob/5b28f9093bb70863b59459bb6df5062d005bce41/src/ax/agent/contextMap.ts#L665

Parameters

ParameterType
itemIdstring
tagstring

Returns

boolean


update()

TypeScript
update(ai: Readonly<AxAIService>, args: Readonly<{
  options?: Readonly<Omit<AxProgramForwardOptions<string>, "functions">>;
  task: string;
  trajectory: string;
}>): Promise<AxAgentContextMapUpdateResult>;

Defined in: https://github.com/ax-llm/ax/blob/5b28f9093bb70863b59459bb6df5062d005bce41/src/ax/agent/contextMap.ts#L713

Parameters

ParameterType
aiReadonly<AxAIService>
argsReadonly<{ options?: Readonly<Omit<AxProgramForwardOptions<string>, "functions">>; task: string; trajectory: string; }>

Returns

Promise<AxAgentContextMapUpdateResult>


fromSnapshot()

TypeScript
static fromSnapshot(snapshot: AxAgentContextMapSnapshot, options?: AxAgentContextMapOptions): AxAgentContextMap;

Defined in: https://github.com/ax-llm/ax/blob/5b28f9093bb70863b59459bb6df5062d005bce41/src/ax/agent/contextMap.ts#L636

Parameters

ParameterType
snapshotAxAgentContextMapSnapshot
options?AxAgentContextMapOptions

Returns

AxAgentContextMap


fromText()

TypeScript
static fromText(text: string, options?: AxAgentContextMapOptions): AxAgentContextMap;

Defined in: https://github.com/ax-llm/ax/blob/5b28f9093bb70863b59459bb6df5062d005bce41/src/ax/agent/contextMap.ts#L643

Parameters

ParameterType
textstring
options?AxAgentContextMapOptions

Returns

AxAgentContextMap

Docs