@ax-llm/ax 19.0.15 → 19.0.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.d.ts CHANGED
@@ -342,7 +342,12 @@ type AxFunctionHandler = (args?: any, extra?: Readonly<{
342
342
  ai?: AxAIService;
343
343
  step?: AxStepContext;
344
344
  abortSignal?: AbortSignal;
345
+ protocol?: AxAgentCompletionProtocol;
345
346
  }>) => unknown;
347
+ type AxAgentCompletionProtocol = Readonly<{
348
+ final: (...args: unknown[]) => never;
349
+ askClarification: (...args: unknown[]) => never;
350
+ }>;
346
351
  type AxFunctionJSONSchema = {
347
352
  type: string | string[];
348
353
  properties?: Record<string, AxFunctionJSONSchema & {
@@ -1662,6 +1667,59 @@ type AddFieldToShape<S extends Record<string, any>, K extends string, T extends
1662
1667
  } : S & {
1663
1668
  readonly [P in K]: InferFluentType<T>;
1664
1669
  };
1670
+ type AxFunctionBuilderExample = {
1671
+ code: string;
1672
+ title?: string;
1673
+ description?: string;
1674
+ language?: string;
1675
+ };
1676
+ type AxTypedFunctionHandler<TArgs, TReturn> = (args: Readonly<TArgs>, extra?: Parameters<AxFunctionHandler>[1]) => TReturn | Promise<TReturn>;
1677
+ type AxFunctionBuilderResult<TArgs extends Record<string, any>, TReturn, THasExamples extends boolean> = Omit<AxFunction, 'func' | 'parameters' | 'returns'> & {
1678
+ func: AxTypedFunctionHandler<TArgs, TReturn>;
1679
+ parameters: AxFunctionJSONSchema;
1680
+ returns?: AxFunctionJSONSchema;
1681
+ } & (THasExamples extends true ? {
1682
+ examples: readonly AxFunctionBuilderExample[];
1683
+ } : {});
1684
+ declare class AxFunctionBuilder<TArgs extends Record<string, any> = {}, TReturn = unknown, THasExamples extends boolean = false> {
1685
+ private readonly name;
1686
+ private desc?;
1687
+ private ns?;
1688
+ private argFields;
1689
+ private returnFields;
1690
+ private returnFieldType?;
1691
+ private returnMode?;
1692
+ private fnHandler?;
1693
+ private fnExamples;
1694
+ constructor(name: string);
1695
+ description(text: string): AxFunctionBuilder<TArgs, TReturn, THasExamples>;
1696
+ namespace(text: string): AxFunctionBuilder<TArgs, TReturn, THasExamples>;
1697
+ arg<K extends string, T extends AxFluentFieldInfo<any, any, any, any, any, any, any> | AxFluentFieldType<any, any, any, any, any, any, any>>(name: K, fieldInfo: T): AxFunctionBuilder<AddFieldToShape<TArgs, K, T>, TReturn, THasExamples>;
1698
+ args<K extends string, T extends AxFluentFieldInfo<any, any, any, any, any, any, any> | AxFluentFieldType<any, any, any, any, any, any, any>>(name: K, fieldInfo: T): AxFunctionBuilder<AddFieldToShape<TArgs, K, T>, TReturn, THasExamples>;
1699
+ returns<T extends AxFluentFieldInfo<any, any, any, any, any, any, any> | AxFluentFieldType<any, any, any, any, any, any, any>>(fieldInfo: T): AxFunctionBuilder<TArgs, InferFluentType<T>, THasExamples>;
1700
+ returnsField<K extends string, T extends AxFluentFieldInfo<any, any, any, any, any, any, any> | AxFluentFieldType<any, any, any, any, any, any, any>>(name: K, fieldInfo: T): AxFunctionBuilder<TArgs, AddFieldToShape<TReturn extends Record<string, any> ? TReturn : {}, K, T>, THasExamples>;
1701
+ example(example: AxFunctionBuilderExample): AxFunctionBuilder<TArgs, TReturn, true>;
1702
+ examples(examples: readonly AxFunctionBuilderExample[]): AxFunctionBuilder<TArgs, TReturn, true>;
1703
+ handler(handler: AxTypedFunctionHandler<TArgs, TReturn>): AxFunctionBuilder<TArgs, TReturn, THasExamples>;
1704
+ build(): AxFunctionBuilderResult<TArgs, TReturn, THasExamples>;
1705
+ }
1706
+ /**
1707
+ * Creates a fluent builder for defining callable functions/tools with typed
1708
+ * args, return schemas, namespaces, and optional AxAgent discovery examples.
1709
+ *
1710
+ * @example
1711
+ * ```typescript
1712
+ * const search = fn('search')
1713
+ * .description('Search the product catalog')
1714
+ * .namespace('db')
1715
+ * .arg('query', f.string('Search query'))
1716
+ * .arg('limit', f.number('Maximum results').optional())
1717
+ * .returnsField('results', f.string('Result item').array())
1718
+ * .handler(async ({ query, limit = 5 }) => ({ results: [`hit: ${query}:${limit}`] }))
1719
+ * .build();
1720
+ * ```
1721
+ */
1722
+ declare const fn: <TName extends string>(name: TName) => AxFunctionBuilder<{}, unknown, false>;
1665
1723
  interface AxSignatureConfig {
1666
1724
  description?: string;
1667
1725
  inputs: readonly AxField[];
@@ -2248,6 +2306,7 @@ interface AxOptimizedProgram<OUT = any> {
2248
2306
  bestScore: number;
2249
2307
  stats: AxOptimizationStats;
2250
2308
  instruction?: string;
2309
+ instructionMap?: Record<string, string>;
2251
2310
  demos?: AxProgramDemos<any, OUT>[];
2252
2311
  modelConfig?: {
2253
2312
  temperature?: number;
@@ -2271,6 +2330,7 @@ declare class AxOptimizedProgramImpl<OUT = any> implements AxOptimizedProgram<OU
2271
2330
  readonly bestScore: number;
2272
2331
  readonly stats: AxOptimizationStats;
2273
2332
  readonly instruction?: string;
2333
+ readonly instructionMap?: Record<string, string>;
2274
2334
  readonly demos?: AxProgramDemos<any, OUT>[];
2275
2335
  readonly examples?: AxExample$1[];
2276
2336
  readonly modelConfig?: {
@@ -2293,6 +2353,7 @@ declare class AxOptimizedProgramImpl<OUT = any> implements AxOptimizedProgram<OU
2293
2353
  bestScore: number;
2294
2354
  stats: AxOptimizationStats;
2295
2355
  instruction?: string;
2356
+ instructionMap?: Record<string, string>;
2296
2357
  demos?: AxProgramDemos<any, OUT>[];
2297
2358
  examples?: AxExample$1[];
2298
2359
  modelConfig?: AxOptimizedProgram<OUT>['modelConfig'];
@@ -2805,6 +2866,7 @@ declare class AxProgram<IN = any, OUT = any> implements AxUsable, AxTunable<IN,
2805
2866
  id: string;
2806
2867
  signature?: string;
2807
2868
  }>;
2869
+ namedProgramInstances(): AxNamedProgramInstance<IN, OUT>[];
2808
2870
  applyOptimization(optimizedProgram: AxOptimizedProgram<OUT>): void;
2809
2871
  }
2810
2872
 
@@ -3520,11 +3582,17 @@ interface AxTunable<IN, OUT> {
3520
3582
  getId(): string;
3521
3583
  setId(id: string): void;
3522
3584
  getTraces(): AxProgramTrace<IN, OUT>[];
3585
+ namedProgramInstances?(): AxNamedProgramInstance<any, any>[];
3523
3586
  setDemos(demos: readonly AxProgramDemos<IN, OUT>[], options?: {
3524
3587
  modelConfig?: Record<string, unknown>;
3525
3588
  }): void;
3526
3589
  applyOptimization(optimizedProgram: AxOptimizedProgram<OUT>): void;
3527
3590
  }
3591
+ type AxNamedProgramInstance<IN = any, OUT = any> = {
3592
+ id: string;
3593
+ program: AxTunable<IN, OUT>;
3594
+ signature?: string;
3595
+ };
3528
3596
  interface AxUsable {
3529
3597
  getUsage(): AxProgramUsage[];
3530
3598
  resetUsage(): void;
@@ -7427,6 +7495,19 @@ interface AxTrace {
7427
7495
  /** Custom metadata */
7428
7496
  metadata?: Record<string, unknown>;
7429
7497
  }
7498
+ type AxLearnCheckpointMode = 'batch' | 'continuous' | 'playbook';
7499
+ interface AxLearnCheckpointState {
7500
+ mode: AxLearnCheckpointMode;
7501
+ instruction?: string;
7502
+ baseInstruction?: string;
7503
+ score?: number;
7504
+ continuous?: {
7505
+ feedbackTraceCount?: number;
7506
+ lastUpdateAt?: string;
7507
+ };
7508
+ playbook?: Record<string, unknown>;
7509
+ artifactSummary?: Record<string, unknown>;
7510
+ }
7430
7511
  /**
7431
7512
  * Represents a serialized checkpoint of an AxGen configuration.
7432
7513
  */
@@ -7449,6 +7530,8 @@ interface AxCheckpoint {
7449
7530
  score?: number;
7450
7531
  /** Optimization method used */
7451
7532
  optimizerType?: string;
7533
+ /** Typed AxLearn state, when the checkpoint comes from AxLearn */
7534
+ learnState?: AxLearnCheckpointState;
7452
7535
  /** Custom metadata */
7453
7536
  metadata?: Record<string, unknown>;
7454
7537
  }
@@ -7480,220 +7563,568 @@ type AxStorage = {
7480
7563
  };
7481
7564
 
7482
7565
  /**
7483
- * AxSynth - Synthetic data generator for bootstrapping optimization datasets.
7484
- *
7485
- * Generates diverse input examples and uses a teacher model to produce
7486
- * high-quality labeled outputs. Solves the "cold start" problem when
7487
- * users have no training data.
7566
+ * Individual playbook bullet with metadata used for incremental updates.
7567
+ * Mirrors the structure described in the ACE paper (Section 3.1).
7488
7568
  */
7489
-
7569
+ interface AxACEBullet extends Record<string, unknown> {
7570
+ id: string;
7571
+ section: string;
7572
+ content: string;
7573
+ helpfulCount: number;
7574
+ harmfulCount: number;
7575
+ createdAt: string;
7576
+ updatedAt: string;
7577
+ tags?: string[];
7578
+ metadata?: Record<string, unknown>;
7579
+ }
7490
7580
  /**
7491
- * Configuration for synthetic data generation.
7581
+ * Aggregated ACE playbook structure grouped by sections.
7492
7582
  */
7493
- interface AxSynthOptions {
7494
- /** Teacher AI to use for labeling generated inputs */
7495
- teacher: AxAIService;
7496
- /**
7497
- * Diversity strategy for input generation.
7498
- * - 'semantic': Use embeddings to maximize semantic diversity
7499
- * - 'lexical': Use token-based diversity
7500
- * - 'none': No diversity filtering (default)
7501
- */
7502
- diversity?: 'semantic' | 'lexical' | 'none';
7503
- /** Domain context for generating relevant examples */
7504
- domain?: string;
7505
- /**
7506
- * Edge case hints for generating challenging examples.
7507
- * Examples: "empty inputs", "very long queries", "special characters"
7508
- */
7509
- edgeCases?: string[];
7510
- /** Temperature for input generation (default: 0.8) */
7511
- temperature?: number;
7512
- /** Model to use for generation (optional, uses teacher's default) */
7513
- model?: string;
7583
+ interface AxACEPlaybook {
7584
+ version: number;
7585
+ sections: Record<string, AxACEBullet[]>;
7586
+ stats: {
7587
+ bulletCount: number;
7588
+ helpfulCount: number;
7589
+ harmfulCount: number;
7590
+ tokenEstimate: number;
7591
+ };
7592
+ updatedAt: string;
7593
+ description?: string;
7514
7594
  }
7515
7595
  /**
7516
- * A single synthesized example with input and expected output.
7596
+ * Generator output format (Appendix B of the paper) distilled to core fields.
7517
7597
  */
7518
- interface AxSynthExample {
7519
- /** Generated input values */
7520
- input: Record<string, unknown>;
7521
- /** Expected output values from teacher model */
7522
- expected: Record<string, unknown>;
7523
- /** Category of the example (normal, edge case, etc.) */
7524
- category?: string;
7598
+ interface AxACEGeneratorOutput extends Record<string, unknown> {
7599
+ reasoning: string;
7600
+ answer: unknown;
7601
+ bulletIds: string[];
7602
+ trajectory?: string;
7603
+ metadata?: Record<string, unknown>;
7525
7604
  }
7526
7605
  /**
7527
- * Result from a synthesis run.
7606
+ * Reflection payload, mapping to the Reflector JSON schema in the paper.
7528
7607
  */
7529
- interface AxSynthResult {
7530
- /** Generated examples */
7531
- examples: AxSynthExample[];
7532
- /** Statistics about the generation */
7533
- stats: {
7534
- requested: number;
7535
- generated: number;
7536
- labelingSuccessRate: number;
7537
- durationMs: number;
7538
- };
7608
+ interface AxACEReflectionOutput extends Record<string, unknown> {
7609
+ reasoning: string;
7610
+ errorIdentification: string;
7611
+ rootCauseAnalysis: string;
7612
+ correctApproach: string;
7613
+ keyInsight: string;
7614
+ bulletTags: {
7615
+ id: string;
7616
+ tag: 'helpful' | 'harmful' | 'neutral';
7617
+ }[];
7618
+ metadata?: Record<string, unknown>;
7539
7619
  }
7540
7620
  /**
7541
- * AxSynth generates synthetic training data.
7542
- *
7543
- * @example
7544
- * ```typescript
7545
- * const synth = new AxSynth(signature, {
7546
- * teacher: ai('openai', { model: 'gpt-4o' }),
7547
- * domain: 'customer support',
7548
- * edgeCases: ['angry customers', 'vague requests'],
7549
- * });
7550
- *
7551
- * const { examples } = await synth.generate(100);
7552
- * ```
7621
+ * Curator operations emitted as deltas (Section 3.1).
7553
7622
  */
7554
- declare class AxSynth<IN extends AxGenIn, OUT extends AxGenOut> {
7555
- private signature;
7556
- private options;
7557
- constructor(signature: AxSignature<IN, OUT>, options: AxSynthOptions);
7623
+ type AxACECuratorOperationType = 'ADD' | 'UPDATE' | 'REMOVE';
7624
+ interface AxACECuratorOperation {
7625
+ type: AxACECuratorOperationType;
7626
+ section: string;
7627
+ bulletId?: string;
7628
+ content?: string;
7629
+ metadata?: Record<string, unknown>;
7630
+ }
7631
+ interface AxACECuratorOutput extends Record<string, unknown> {
7632
+ reasoning: string;
7633
+ operations: AxACECuratorOperation[];
7634
+ metadata?: Record<string, unknown>;
7635
+ }
7636
+ /**
7637
+ * Runtime feedback captured after each generator rollout for online updates.
7638
+ */
7639
+ interface AxACEFeedbackEvent {
7640
+ example: AxExample$1;
7641
+ prediction: unknown;
7642
+ score: number;
7643
+ generatorOutput: AxACEGeneratorOutput;
7644
+ reflection?: AxACEReflectionOutput;
7645
+ curator?: AxACECuratorOutput;
7646
+ timestamp: string;
7647
+ }
7648
+ /**
7649
+ * Configuration options specific to ACE inside Ax.
7650
+ */
7651
+ interface AxACEOptions {
7558
7652
  /**
7559
- * Generate synthetic examples.
7653
+ * Maximum number of epochs for offline adaptation.
7560
7654
  */
7561
- generate(count: number, options?: {
7562
- batchSize?: number;
7563
- }): Promise<AxSynthResult>;
7655
+ maxEpochs?: number;
7564
7656
  /**
7565
- * Generate diverse input examples using a synthesis prompt.
7657
+ * Maximum reflector refinement rounds (paper uses up to 5).
7566
7658
  */
7567
- private generateInputs;
7659
+ maxReflectorRounds?: number;
7568
7660
  /**
7569
- * Generate edge case inputs based on hints.
7661
+ * Maximum bullets allowed in any section before triggering pruning.
7570
7662
  */
7571
- private generateEdgeCaseInputs;
7663
+ maxSectionSize?: number;
7572
7664
  /**
7573
- * Label an input using the teacher model.
7665
+ * Optional similarity threshold used by the semantic deduper.
7574
7666
  */
7575
- private labelInput;
7667
+ similarityThreshold?: number;
7576
7668
  /**
7577
- * Get the signature being used.
7669
+ * Whether to automatically create sections when curator emits new ones.
7578
7670
  */
7579
- getSignature(): AxSignature<IN, OUT>;
7671
+ allowDynamicSections?: boolean;
7580
7672
  /**
7581
- * Get the teacher AI service.
7673
+ * Initial playbook supplied by the caller.
7582
7674
  */
7583
- getTeacher(): AxAIService;
7675
+ initialPlaybook?: AxACEPlaybook;
7584
7676
  }
7585
-
7586
7677
  /**
7587
- * AxLearn - Self-improving agent that learns from traces and feedback.
7588
- *
7589
- * Combines AxGen with automatic trace logging, storage, and an optimization loop.
7590
- * This is the high-level API for creating agents that get better over time.
7678
+ * Serialized artifact saved after optimization for future reuse.
7591
7679
  */
7680
+ interface AxACEOptimizationArtifact {
7681
+ playbook: AxACEPlaybook;
7682
+ feedback: AxACEFeedbackEvent[];
7683
+ history: {
7684
+ epoch: number;
7685
+ exampleIndex: number;
7686
+ operations: AxACECuratorOperation[];
7687
+ }[];
7688
+ }
7592
7689
 
7593
- /**
7594
- * Configuration for the AxLearn agent.
7595
- * Combines agent configuration (name, storage) with learning configuration (teacher, budget).
7596
- */
7597
- interface AxLearnOptions {
7598
- /** Unique identifier/name for this agent */
7599
- name: string;
7600
- /** Storage backend (Required) */
7601
- storage: AxStorage;
7602
- /** Whether to log traces (default: true) */
7603
- enableTracing?: boolean;
7604
- /** Custom metadata for all traces */
7605
- metadata?: Record<string, unknown>;
7606
- /** Callback when a trace is logged */
7607
- onTrace?: (trace: AxTrace) => void;
7608
- /** Teacher AI for synthetic data generation and judging (Required) */
7609
- teacher: AxAIService;
7610
- /** Maximum optimization rounds (default: 20) */
7611
- budget?: number;
7612
- /** Custom metric function (if not provided, auto-generates using AxJudge) */
7613
- metric?: AxMetricFn;
7614
- /** Judge options when auto-generating metric */
7615
- judgeOptions?: Partial<AxJudgeOptions>;
7616
- /** Custom evaluation criteria for judge */
7617
- criteria?: string;
7618
- /** Training examples (manual) */
7619
- examples?: AxTypedExample<AxGenIn>[];
7620
- /** Whether to use capture traces as training examples (default: true) */
7621
- useTraces?: boolean;
7622
- /** Whether to generate synthetic examples (default: true if no other data) */
7623
- generateExamples?: boolean;
7624
- /** Number of synthetic examples to generate */
7625
- synthCount?: number;
7626
- /** Synth options for data generation */
7627
- synthOptions?: Partial<AxSynthOptions>;
7628
- /** Validation split ratio (default: 0.2) */
7629
- validationSplit?: number;
7630
- /** Progress callback */
7631
- onProgress?: (progress: AxLearnProgress) => void;
7690
+ interface AxACECompileOptions extends AxCompileOptions {
7691
+ aceOptions?: AxACEOptions;
7632
7692
  }
7633
- /**
7634
- * Progress callback for monitoring optimization.
7635
- */
7636
- interface AxLearnProgress {
7637
- /** Current round number */
7638
- round: number;
7639
- /** Total rounds */
7640
- totalRounds: number;
7641
- /** Current best score */
7642
- score: number;
7643
- /** Score improvement from previous round */
7644
- improvement: number;
7693
+ interface AxACEResult<OUT extends AxGenOut> extends AxOptimizerResult<OUT> {
7694
+ optimizedProgram?: AxACEOptimizedProgram<OUT>;
7695
+ playbook: AxACEPlaybook;
7696
+ artifact: AxACEOptimizationArtifact;
7645
7697
  }
7646
7698
  /**
7647
- * Result from an optimize operation.
7699
+ * Optimized program artifact that persists ACE playbook updates.
7648
7700
  */
7649
- interface AxLearnResult<_IN extends AxGenIn, _OUT extends AxGenOut> {
7650
- /** Final score achieved */
7651
- score: number;
7652
- /** Score improvement from original */
7653
- improvement: number;
7654
- /** Checkpoint version saved */
7655
- checkpointVersion: number;
7656
- /** Statistics */
7657
- stats: {
7658
- trainingExamples: number;
7659
- validationExamples: number;
7701
+ declare class AxACEOptimizedProgram<OUT = any> extends AxOptimizedProgramImpl<OUT> {
7702
+ readonly playbook: AxACEPlaybook;
7703
+ readonly artifact: AxACEOptimizationArtifact;
7704
+ private readonly baseInstruction?;
7705
+ constructor(config: {
7706
+ baseInstruction?: string;
7707
+ playbook: AxACEPlaybook;
7708
+ artifact: AxACEOptimizationArtifact;
7709
+ bestScore: number;
7710
+ stats: AxOptimizationStats;
7711
+ optimizerType: string;
7712
+ optimizationTime: number;
7713
+ totalRounds: number;
7714
+ converged: boolean;
7715
+ instruction?: string;
7716
+ demos?: AxOptimizedProgram<OUT>['demos'];
7717
+ examples?: AxExample$1[];
7718
+ modelConfig?: AxOptimizedProgram<OUT>['modelConfig'];
7719
+ scoreHistory?: number[];
7720
+ configurationHistory?: Record<string, unknown>[];
7721
+ });
7722
+ applyTo<IN, T extends AxGenOut>(program: AxGen<IN, T>): void;
7723
+ }
7724
+ /**
7725
+ * AxACE implements the Agentic Context Engineering loop (Generator → Reflector → Curator).
7726
+ * The implementation mirrors the paper's architecture while integrating with the Ax optimizer
7727
+ * ergonomics (unified optimized program artifacts, metrics, and checkpointing).
7728
+ */
7729
+ declare class AxACE extends AxBaseOptimizer {
7730
+ private readonly aceConfig;
7731
+ private playbook;
7732
+ private baseInstruction?;
7733
+ private generatorHistory;
7734
+ private deltaHistory;
7735
+ private reflectorProgram?;
7736
+ private curatorProgram?;
7737
+ private program?;
7738
+ constructor(args: Readonly<AxOptimizerArgs>, options?: Readonly<AxACEOptions>);
7739
+ reset(): void;
7740
+ hydrate<IN, OUT extends AxGenOut>(program: Readonly<AxGen<IN, OUT>>, state?: Readonly<{
7741
+ baseInstruction?: string;
7742
+ playbook?: AxACEPlaybook;
7743
+ artifact?: Partial<AxACEOptimizationArtifact>;
7744
+ }>): void;
7745
+ getPlaybook(): AxACEPlaybook;
7746
+ getBaseInstruction(): string | undefined;
7747
+ getArtifact(): AxACEOptimizationArtifact;
7748
+ applyCurrentState<IN, OUT extends AxGenOut>(program?: AxGen<IN, OUT>): void;
7749
+ configureAuto(level: 'light' | 'medium' | 'heavy'): void;
7750
+ compile<IN, OUT extends AxGenOut>(program: Readonly<AxGen<IN, OUT>>, examples: readonly AxTypedExample<IN>[], metricFn: AxMetricFn, options?: AxACECompileOptions): Promise<AxACEResult<OUT>>;
7751
+ /**
7752
+ * Apply ACE updates after each online inference. Mirrors the online adaptation
7753
+ * flow described in the paper; can be called by user-land code between queries.
7754
+ */
7755
+ applyOnlineUpdate(args: Readonly<{
7756
+ example: AxExample$1;
7757
+ prediction: unknown;
7758
+ feedback?: string;
7759
+ }>): Promise<AxACECuratorOutput | undefined>;
7760
+ private composeInstruction;
7761
+ private extractProgramInstruction;
7762
+ private createGeneratorOutput;
7763
+ private resolveCuratorOperationTargets;
7764
+ private locateBullet;
7765
+ private locateFallbackBullet;
7766
+ private collectProtectedBulletIds;
7767
+ private normalizeCuratorOperations;
7768
+ private inferOperationsFromReflection;
7769
+ private runReflectionRounds;
7770
+ private runReflector;
7771
+ private runCurator;
7772
+ private getOrCreateReflectorProgram;
7773
+ private getOrCreateCuratorProgram;
7774
+ }
7775
+
7776
+ /** Structured optimization report */
7777
+ interface AxGEPAOptimizationReport {
7778
+ summary: string;
7779
+ bestSolution: {
7780
+ overallScore: number;
7781
+ objectives: Record<string, {
7782
+ value: number;
7783
+ percentage: number;
7784
+ }>;
7785
+ };
7786
+ paretoFrontier: {
7787
+ solutionCount: number;
7788
+ objectiveSpaceCoverage: number;
7789
+ hypervolume: number;
7790
+ tradeoffs?: Array<Record<string, number>>;
7791
+ };
7792
+ statistics: {
7793
+ totalEvaluations: number;
7794
+ candidatesExplored: number;
7795
+ converged: boolean;
7796
+ };
7797
+ recommendations: {
7798
+ status: 'good' | 'limited' | 'single';
7799
+ suggestions: string[];
7800
+ };
7801
+ }
7802
+ /** Single-module GEPA (reflective prompt evolution with Pareto sampling) */
7803
+ declare class AxGEPA extends AxBaseOptimizer {
7804
+ private numTrials;
7805
+ private minibatch;
7806
+ private minibatchSize;
7807
+ private earlyStoppingTrials;
7808
+ private minImprovementThreshold;
7809
+ private sampleCount;
7810
+ private paretoSetSize;
7811
+ private crossoverEvery;
7812
+ private tieEpsilon;
7813
+ private feedbackMemorySize;
7814
+ private feedbackMemory;
7815
+ private mergeMax;
7816
+ private mergesUsed;
7817
+ private mergesDue;
7818
+ private totalMergesTested;
7819
+ private lastIterFoundNewProgram;
7820
+ private mergeAttemptKeys;
7821
+ private mergeCompositionKeys;
7822
+ private static readonly REFLECTION_PROMPT_TEMPLATE;
7823
+ private rngState;
7824
+ private samplerState;
7825
+ private localScoreHistory;
7826
+ private localConfigurationHistory;
7827
+ constructor(args: Readonly<AxOptimizerArgs>);
7828
+ reset(): void;
7829
+ /**
7830
+ * Multi-objective GEPA: reflective evolution with Pareto frontier
7831
+ */
7832
+ compile<IN, OUT extends AxGenOut>(program: Readonly<AxProgrammable<IN, OUT>>, examples: readonly AxTypedExample<IN>[], metricFn: AxMetricFn | AxMultiMetricFn, options?: AxCompileOptions): Promise<AxParetoResult<OUT>>;
7833
+ /** Lightweight auto presets */
7834
+ configureAuto(level: 'light' | 'medium' | 'heavy'): void;
7835
+ private getBaseInstruction;
7836
+ private getInstructionTargets;
7837
+ private evaluateOnSet;
7838
+ private evaluateAvg;
7839
+ private evaluateOne;
7840
+ private reflectTargetInstruction;
7841
+ private reflectInstruction;
7842
+ /**
7843
+ * Extract instruction text from LLM output enclosed in backticks (aligned with reference)
7844
+ */
7845
+ private extractInstructionFromBackticks;
7846
+ private updateSamplerShuffled;
7847
+ private nextMinibatchIndices;
7848
+ private rand;
7849
+ private systemAwareMergeWithSig;
7850
+ private generateOptimizationReport;
7851
+ private mergeInstructions;
7852
+ }
7853
+
7854
+ /**
7855
+ * AxSynth - Synthetic data generator for bootstrapping optimization datasets.
7856
+ *
7857
+ * Generates diverse input examples and uses a teacher model to produce
7858
+ * high-quality labeled outputs. Solves the "cold start" problem when
7859
+ * users have no training data.
7860
+ */
7861
+
7862
+ /**
7863
+ * Configuration for synthetic data generation.
7864
+ */
7865
+ interface AxSynthOptions {
7866
+ /** Teacher AI to use for labeling generated inputs */
7867
+ teacher: AxAIService;
7868
+ /**
7869
+ * Diversity strategy for input generation.
7870
+ * - 'semantic': Use embeddings to maximize semantic diversity
7871
+ * - 'lexical': Use token-based diversity
7872
+ * - 'none': No diversity filtering (default)
7873
+ */
7874
+ diversity?: 'semantic' | 'lexical' | 'none';
7875
+ /** Domain context for generating relevant examples */
7876
+ domain?: string;
7877
+ /**
7878
+ * Edge case hints for generating challenging examples.
7879
+ * Examples: "empty inputs", "very long queries", "special characters"
7880
+ */
7881
+ edgeCases?: string[];
7882
+ /** Temperature for input generation (default: 0.8) */
7883
+ temperature?: number;
7884
+ /** Model to use for generation (optional, uses teacher's default) */
7885
+ model?: string;
7886
+ }
7887
+ /**
7888
+ * A single synthesized example with input and expected output.
7889
+ */
7890
+ interface AxSynthExample {
7891
+ /** Generated input values */
7892
+ input: Record<string, unknown>;
7893
+ /** Expected output values from teacher model */
7894
+ expected: Record<string, unknown>;
7895
+ /** Category of the example (normal, edge case, etc.) */
7896
+ category?: string;
7897
+ }
7898
+ /**
7899
+ * Result from a synthesis run.
7900
+ */
7901
+ interface AxSynthResult {
7902
+ /** Generated examples */
7903
+ examples: AxSynthExample[];
7904
+ /** Statistics about the generation */
7905
+ stats: {
7906
+ requested: number;
7907
+ generated: number;
7908
+ labelingSuccessRate: number;
7660
7909
  durationMs: number;
7661
7910
  };
7662
7911
  }
7663
7912
  /**
7664
- * AxLearn wraps an AxGen with automatic trace logging and self-improvement capabilities.
7913
+ * AxSynth generates synthetic training data.
7665
7914
  *
7666
7915
  * @example
7667
7916
  * ```typescript
7668
- * const gen = ax(`question -> answer`);
7669
- *
7670
- * // Create the learner with all configuration
7671
- * const learner = new AxLearn(gen, {
7672
- * name: 'math-bot',
7673
- * teacher: gpt4o,
7674
- * storage: new AxMemoryStorage(),
7675
- * budget: 20
7917
+ * const synth = new AxSynth(signature, {
7918
+ * teacher: ai('openai', { model: 'gpt-4o' }),
7919
+ * domain: 'customer support',
7920
+ * edgeCases: ['angry customers', 'vague requests'],
7676
7921
  * });
7677
7922
  *
7678
- * // Use in production
7679
- * await learner.forward(ai, { question: 'What is 2+2?' });
7680
- *
7681
- * // Run optimization (uses config from constructor)
7682
- * await learner.optimize();
7923
+ * const { examples } = await synth.generate(100);
7683
7924
  * ```
7684
7925
  */
7926
+ declare class AxSynth<IN extends AxGenIn, OUT extends AxGenOut> {
7927
+ private signature;
7928
+ private options;
7929
+ constructor(signature: AxSignature<IN, OUT>, options: AxSynthOptions);
7930
+ /**
7931
+ * Generate synthetic examples.
7932
+ */
7933
+ generate(count: number, options?: {
7934
+ batchSize?: number;
7935
+ }): Promise<AxSynthResult>;
7936
+ /**
7937
+ * Generate diverse input examples using a synthesis prompt.
7938
+ */
7939
+ private generateInputs;
7940
+ /**
7941
+ * Generate edge case inputs based on hints.
7942
+ */
7943
+ private generateEdgeCaseInputs;
7944
+ /**
7945
+ * Label an input using the teacher model.
7946
+ */
7947
+ private labelInput;
7948
+ /**
7949
+ * Get the signature being used.
7950
+ */
7951
+ getSignature(): AxSignature<IN, OUT>;
7952
+ /**
7953
+ * Get the teacher AI service.
7954
+ */
7955
+ getTeacher(): AxAIService;
7956
+ }
7957
+
7958
+ /**
7959
+ * AxLearn - Self-improving agent that learns from traces and feedback.
7960
+ *
7961
+ * Combines AxGen with automatic trace logging, storage, and mode-based
7962
+ * optimization/update flows.
7963
+ */
7964
+
7965
+ type AxLearnMode = AxLearnCheckpointMode;
7966
+ type AxLearnPlaybook = AxACEPlaybook;
7967
+ interface AxLearnContinuousOptions {
7968
+ feedbackWindowSize?: number;
7969
+ maxRecentTraces?: number;
7970
+ updateBudget?: number;
7971
+ }
7972
+ type AxLearnPlaybookOptions = Partial<AxACEOptions>;
7973
+ /**
7974
+ * Configuration for the AxLearn agent.
7975
+ */
7976
+ interface AxLearnOptions {
7977
+ /** Unique identifier/name for this agent */
7978
+ name: string;
7979
+ /** Storage backend (Required) */
7980
+ storage: AxStorage;
7981
+ /** Runtime model whose outputs should be improved */
7982
+ runtimeAI?: AxAIService;
7983
+ /** Learning mode (default: batch) */
7984
+ mode?: AxLearnMode;
7985
+ /** Whether to log traces (default: true) */
7986
+ enableTracing?: boolean;
7987
+ /** Custom metadata for all traces */
7988
+ metadata?: Record<string, unknown>;
7989
+ /** Callback when a trace is logged */
7990
+ onTrace?: (trace: AxTrace) => void;
7991
+ /** Teacher AI for synthetic data generation and judging (Required) */
7992
+ teacher: AxAIService;
7993
+ /** Maximum optimization rounds (default: 20) */
7994
+ budget?: number;
7995
+ /** Custom metric function (if not provided, auto-generates using AxJudge) */
7996
+ metric?: AxMetricFn;
7997
+ /** Judge options when auto-generating metric */
7998
+ judgeOptions?: Partial<AxJudgeOptions>;
7999
+ /** Custom evaluation criteria for judge */
8000
+ criteria?: string;
8001
+ /** Training examples (manual) */
8002
+ examples?: AxTypedExample<AxGenIn>[];
8003
+ /** Whether to use captured traces as training examples (default: true) */
8004
+ useTraces?: boolean;
8005
+ /** Whether to generate synthetic examples (default: true if no other data) */
8006
+ generateExamples?: boolean;
8007
+ /** Number of synthetic examples to generate */
8008
+ synthCount?: number;
8009
+ /** Synth options for data generation */
8010
+ synthOptions?: Partial<AxSynthOptions>;
8011
+ /** Validation split ratio (default: 0.2, clamped to keep train + validation non-empty) */
8012
+ validationSplit?: number;
8013
+ /** Mode-specific configuration for bounded continuous updates */
8014
+ continuousOptions?: AxLearnContinuousOptions;
8015
+ /** Mode-specific configuration for playbook learning */
8016
+ playbookOptions?: AxLearnPlaybookOptions;
8017
+ /** Progress callback */
8018
+ onProgress?: (progress: AxLearnProgress) => void;
8019
+ }
8020
+ interface AxLearnOptimizeOptions {
8021
+ runtimeAI?: AxAIService;
8022
+ budget?: number;
8023
+ metric?: AxMetricFn;
8024
+ judgeOptions?: Partial<AxJudgeOptions>;
8025
+ criteria?: string;
8026
+ examples?: AxTypedExample<AxGenIn>[];
8027
+ useTraces?: boolean;
8028
+ generateExamples?: boolean;
8029
+ synthCount?: number;
8030
+ synthOptions?: Partial<AxSynthOptions>;
8031
+ validationSplit?: number;
8032
+ continuousOptions?: AxLearnContinuousOptions;
8033
+ playbookOptions?: AxLearnPlaybookOptions;
8034
+ onProgress?: (progress: AxLearnProgress) => void;
8035
+ }
8036
+ type AxLearnUpdateFeedback = string | NonNullable<AxTrace['feedback']>;
8037
+ interface AxLearnUpdateInput<IN extends AxGenIn = AxGenIn, OUT extends AxGenOut = AxGenOut> {
8038
+ example: AxTypedExample<IN>;
8039
+ prediction: OUT;
8040
+ feedback?: AxLearnUpdateFeedback;
8041
+ }
8042
+ interface AxLearnUpdateOptions {
8043
+ runtimeAI?: AxAIService;
8044
+ budget?: number;
8045
+ metric?: AxMetricFn;
8046
+ judgeOptions?: Partial<AxJudgeOptions>;
8047
+ criteria?: string;
8048
+ continuousOptions?: AxLearnContinuousOptions;
8049
+ playbookOptions?: AxLearnPlaybookOptions;
8050
+ onProgress?: (progress: AxLearnProgress) => void;
8051
+ }
8052
+ interface AxLearnPlaybookSummary {
8053
+ feedbackEvents: number;
8054
+ historyBatches: number;
8055
+ bulletCount: number;
8056
+ updatedAt?: string;
8057
+ }
8058
+ interface AxLearnArtifact {
8059
+ playbook?: AxLearnPlaybook;
8060
+ playbookSummary?: AxLearnPlaybookSummary;
8061
+ lastUpdateAt?: string;
8062
+ feedbackExamples?: number;
8063
+ }
8064
+ /**
8065
+ * Progress callback for monitoring optimization.
8066
+ */
8067
+ interface AxLearnProgress {
8068
+ round: number;
8069
+ totalRounds: number;
8070
+ score: number;
8071
+ improvement: number;
8072
+ }
8073
+ /**
8074
+ * Result from optimize/applyUpdate operations.
8075
+ */
8076
+ interface AxLearnResult<_IN extends AxGenIn, _OUT extends AxGenOut> {
8077
+ mode: AxLearnMode;
8078
+ score: number;
8079
+ improvement: number;
8080
+ checkpointVersion: number;
8081
+ stats: {
8082
+ trainingExamples: number;
8083
+ validationExamples: number;
8084
+ feedbackExamples: number;
8085
+ durationMs: number;
8086
+ mode: AxLearnMode;
8087
+ };
8088
+ state?: AxLearnCheckpointState;
8089
+ artifact?: AxLearnArtifact;
8090
+ }
8091
+ type AxLearnMergedConfig = {
8092
+ runtimeAI?: AxAIService;
8093
+ mode: AxLearnMode;
8094
+ teacher: AxAIService;
8095
+ budget: number;
8096
+ metric?: AxMetricFn;
8097
+ judgeOptions?: Partial<AxJudgeOptions>;
8098
+ criteria?: string;
8099
+ examples?: AxTypedExample<AxGenIn>[];
8100
+ useTraces: boolean;
8101
+ generateExamples: boolean;
8102
+ synthCount?: number;
8103
+ synthOptions?: Partial<AxSynthOptions>;
8104
+ validationSplit: number;
8105
+ continuousOptions: Required<AxLearnContinuousOptions>;
8106
+ playbookOptions?: AxLearnPlaybookOptions;
8107
+ onProgress?: (progress: AxLearnProgress) => void;
8108
+ };
8109
+ /**
8110
+ * AxLearn wraps an AxGen with automatic trace logging and self-improvement capabilities.
8111
+ */
7685
8112
  declare class AxLearn<IN extends AxGenIn, OUT extends AxGenOut> implements AxForwardable<IN, OUT, string>, AxUsable {
7686
8113
  private gen;
7687
8114
  private options;
7688
8115
  private tracer;
7689
8116
  private currentScore?;
8117
+ private currentState?;
8118
+ private readyPromise;
8119
+ private playbookOptimizer?;
7690
8120
  constructor(gen: AxGen<IN, OUT>, options: AxLearnOptions);
8121
+ ready(): Promise<void>;
7691
8122
  /**
7692
- * Forward call - behaves exactly like AxGen.forward() but logs traces.
8123
+ * Forward call - behaves like AxGen.forward() but waits for restore and logs traces.
7693
8124
  */
7694
8125
  forward(ai: AxAIService, values: IN | AxMessage<IN>[], options?: Readonly<AxProgramForwardOptions<string>>): Promise<OUT>;
7695
8126
  /**
7696
- * Streaming forward call - behaves exactly like AxGen.streamingForward() but logs traces.
8127
+ * Streaming forward call - behaves like AxGen.streamingForward() but waits for restore and logs traces.
7697
8128
  */
7698
8129
  streamingForward(ai: AxAIService, values: IN | AxMessage<IN>[], options?: Readonly<AxProgramForwardOptions<string>>): AxGenStreamingOut<OUT>;
7699
8130
  getUsage(): AxProgramUsage[];
@@ -7716,14 +8147,13 @@ declare class AxLearn<IN extends AxGenIn, OUT extends AxGenOut> implements AxFor
7716
8147
  }) => unknown | Promise<unknown>): void;
7717
8148
  clone(): AxLearn<IN, OUT>;
7718
8149
  /**
7719
- * Optimize the agent using the configuration provided in constructor.
7720
- * Can optionally override options.
8150
+ * Run the configured learning flow for the current mode.
7721
8151
  */
7722
- optimize(overrides?: Partial<Omit<AxLearnOptions, 'id' | 'storage' | 'teacher'>>): Promise<AxLearnResult<IN, OUT>>;
8152
+ optimize(overrides?: AxLearnOptimizeOptions): Promise<AxLearnResult<IN, OUT>>;
7723
8153
  /**
7724
- * Load the latest checkpoint from storage.
8154
+ * Apply a bounded online update for continuous/playbook modes.
7725
8155
  */
7726
- private loadLatestCheckpoint;
8156
+ applyUpdate(input: Readonly<AxLearnUpdateInput<IN, OUT>>, overrides?: AxLearnUpdateOptions): Promise<AxLearnResult<IN, OUT>>;
7727
8157
  /**
7728
8158
  * Get the underlying AxGen instance.
7729
8159
  */
@@ -7743,6 +8173,36 @@ declare class AxLearn<IN extends AxGenIn, OUT extends AxGenOut> implements AxFor
7743
8173
  * Add feedback to a specific trace.
7744
8174
  */
7745
8175
  addFeedback(traceId: string, feedback: NonNullable<AxTrace['feedback']>): Promise<void>;
8176
+ protected createPromptOptimizer(config: Readonly<AxLearnMergedConfig>, baselineScore: number): AxGEPA;
8177
+ protected createPlaybookOptimizer(config: Readonly<AxLearnMergedConfig>, baselineScore: number): AxACE;
8178
+ private mergeConfig;
8179
+ private requireRuntimeAI;
8180
+ private createOptimizerProgressHandler;
8181
+ private resolveMetric;
8182
+ private runPromptOptimization;
8183
+ private optimizePlaybook;
8184
+ private applyPlaybookUpdate;
8185
+ private getOrCreatePlaybookOptimizer;
8186
+ private prepareDataset;
8187
+ private loadRelevantTraces;
8188
+ private normalizeExample;
8189
+ private buildObservedUpdateExample;
8190
+ private pickInputFields;
8191
+ private pickOutputFields;
8192
+ private hasInputFields;
8193
+ private hasOutputFields;
8194
+ private exampleKey;
8195
+ private feedbackToText;
8196
+ private formatObservedUpdateFeedback;
8197
+ private splitExamples;
8198
+ private shuffleExamples;
8199
+ private computeMetricBudget;
8200
+ private createPromptState;
8201
+ private createPlaybookState;
8202
+ private summarizePlaybookArtifact;
8203
+ private saveCheckpoint;
8204
+ private loadLatestCheckpoint;
8205
+ private applyRestoredPlaybook;
7746
8206
  }
7747
8207
 
7748
8208
  type AxDataRow = {
@@ -7793,254 +8253,53 @@ interface AxGenMetricsInstruments {
7793
8253
  multiStepGenerationsCounter?: Counter;
7794
8254
  stepsPerGenerationHistogram?: Histogram;
7795
8255
  maxStepsReachedCounter?: Counter;
7796
- validationErrorsCounter?: Counter;
7797
- assertionErrorsCounter?: Counter;
7798
- errorCorrectionAttemptsHistogram?: Histogram;
7799
- errorCorrectionSuccessCounter?: Counter;
7800
- errorCorrectionFailureCounter?: Counter;
7801
- maxRetriesReachedCounter?: Counter;
7802
- functionsEnabledGenerationsCounter?: Counter;
7803
- functionCallStepsCounter?: Counter;
7804
- functionsExecutedPerGenerationHistogram?: Histogram;
7805
- functionErrorCorrectionCounter?: Counter;
7806
- fieldProcessorsExecutedCounter?: Counter;
7807
- streamingFieldProcessorsExecutedCounter?: Counter;
7808
- streamingGenerationsCounter?: Counter;
7809
- streamingDeltasEmittedCounter?: Counter;
7810
- streamingFinalizationLatencyHistogram?: Histogram;
7811
- samplesGeneratedHistogram?: Histogram;
7812
- resultPickerUsageCounter?: Counter;
7813
- resultPickerLatencyHistogram?: Histogram;
7814
- inputFieldsGauge?: Gauge;
7815
- outputFieldsGauge?: Gauge;
7816
- examplesUsedGauge?: Gauge;
7817
- demosUsedGauge?: Gauge;
7818
- promptRenderLatencyHistogram?: Histogram;
7819
- extractionLatencyHistogram?: Histogram;
7820
- assertionLatencyHistogram?: Histogram;
7821
- stateCreationLatencyHistogram?: Histogram;
7822
- memoryUpdateLatencyHistogram?: Histogram;
7823
- }
7824
- declare const axCheckMetricsHealth: () => {
7825
- healthy: boolean;
7826
- issues: string[];
7827
- };
7828
- declare const axUpdateMetricsConfig: (config: Readonly<Partial<AxMetricsConfig>>) => void;
7829
- declare const axGetMetricsConfig: () => AxMetricsConfig;
7830
-
7831
- /**
7832
- * Factory function to create a default optimizer logger with color formatting
7833
- */
7834
- declare const axCreateDefaultOptimizerColorLogger: (output?: (message: string) => void) => AxOptimizerLoggerFunction;
7835
- /**
7836
- * Factory function to create a text-only optimizer logger (no colors)
7837
- */
7838
- declare const axCreateDefaultOptimizerTextLogger: (output?: (message: string) => void) => AxOptimizerLoggerFunction;
7839
- /**
7840
- * Default optimizer logger instance with color formatting
7841
- */
7842
- declare const axDefaultOptimizerLogger: AxOptimizerLoggerFunction;
7843
-
7844
- /**
7845
- * Individual playbook bullet with metadata used for incremental updates.
7846
- * Mirrors the structure described in the ACE paper (Section 3.1).
7847
- */
7848
- interface AxACEBullet extends Record<string, unknown> {
7849
- id: string;
7850
- section: string;
7851
- content: string;
7852
- helpfulCount: number;
7853
- harmfulCount: number;
7854
- createdAt: string;
7855
- updatedAt: string;
7856
- tags?: string[];
7857
- metadata?: Record<string, unknown>;
7858
- }
7859
- /**
7860
- * Aggregated ACE playbook structure grouped by sections.
7861
- */
7862
- interface AxACEPlaybook {
7863
- version: number;
7864
- sections: Record<string, AxACEBullet[]>;
7865
- stats: {
7866
- bulletCount: number;
7867
- helpfulCount: number;
7868
- harmfulCount: number;
7869
- tokenEstimate: number;
7870
- };
7871
- updatedAt: string;
7872
- description?: string;
7873
- }
7874
- /**
7875
- * Generator output format (Appendix B of the paper) distilled to core fields.
7876
- */
7877
- interface AxACEGeneratorOutput extends Record<string, unknown> {
7878
- reasoning: string;
7879
- answer: unknown;
7880
- bulletIds: string[];
7881
- trajectory?: string;
7882
- metadata?: Record<string, unknown>;
7883
- }
7884
- /**
7885
- * Reflection payload, mapping to the Reflector JSON schema in the paper.
7886
- */
7887
- interface AxACEReflectionOutput extends Record<string, unknown> {
7888
- reasoning: string;
7889
- errorIdentification: string;
7890
- rootCauseAnalysis: string;
7891
- correctApproach: string;
7892
- keyInsight: string;
7893
- bulletTags: {
7894
- id: string;
7895
- tag: 'helpful' | 'harmful' | 'neutral';
7896
- }[];
7897
- metadata?: Record<string, unknown>;
7898
- }
7899
- /**
7900
- * Curator operations emitted as deltas (Section 3.1).
7901
- */
7902
- type AxACECuratorOperationType = 'ADD' | 'UPDATE' | 'REMOVE';
7903
- interface AxACECuratorOperation {
7904
- type: AxACECuratorOperationType;
7905
- section: string;
7906
- bulletId?: string;
7907
- content?: string;
7908
- metadata?: Record<string, unknown>;
7909
- }
7910
- interface AxACECuratorOutput extends Record<string, unknown> {
7911
- reasoning: string;
7912
- operations: AxACECuratorOperation[];
7913
- metadata?: Record<string, unknown>;
7914
- }
7915
- /**
7916
- * Runtime feedback captured after each generator rollout for online updates.
7917
- */
7918
- interface AxACEFeedbackEvent {
7919
- example: AxExample$1;
7920
- prediction: unknown;
7921
- score: number;
7922
- generatorOutput: AxACEGeneratorOutput;
7923
- reflection?: AxACEReflectionOutput;
7924
- curator?: AxACECuratorOutput;
7925
- timestamp: string;
7926
- }
7927
- /**
7928
- * Configuration options specific to ACE inside Ax.
7929
- */
7930
- interface AxACEOptions {
7931
- /**
7932
- * Maximum number of epochs for offline adaptation.
7933
- */
7934
- maxEpochs?: number;
7935
- /**
7936
- * Maximum reflector refinement rounds (paper uses up to 5).
7937
- */
7938
- maxReflectorRounds?: number;
7939
- /**
7940
- * Maximum bullets allowed in any section before triggering pruning.
7941
- */
7942
- maxSectionSize?: number;
7943
- /**
7944
- * Optional similarity threshold used by the semantic deduper.
7945
- */
7946
- similarityThreshold?: number;
7947
- /**
7948
- * Whether to automatically create sections when curator emits new ones.
7949
- */
7950
- allowDynamicSections?: boolean;
7951
- /**
7952
- * Initial playbook supplied by the caller.
7953
- */
7954
- initialPlaybook?: AxACEPlaybook;
8256
+ validationErrorsCounter?: Counter;
8257
+ assertionErrorsCounter?: Counter;
8258
+ errorCorrectionAttemptsHistogram?: Histogram;
8259
+ errorCorrectionSuccessCounter?: Counter;
8260
+ errorCorrectionFailureCounter?: Counter;
8261
+ maxRetriesReachedCounter?: Counter;
8262
+ functionsEnabledGenerationsCounter?: Counter;
8263
+ functionCallStepsCounter?: Counter;
8264
+ functionsExecutedPerGenerationHistogram?: Histogram;
8265
+ functionErrorCorrectionCounter?: Counter;
8266
+ fieldProcessorsExecutedCounter?: Counter;
8267
+ streamingFieldProcessorsExecutedCounter?: Counter;
8268
+ streamingGenerationsCounter?: Counter;
8269
+ streamingDeltasEmittedCounter?: Counter;
8270
+ streamingFinalizationLatencyHistogram?: Histogram;
8271
+ samplesGeneratedHistogram?: Histogram;
8272
+ resultPickerUsageCounter?: Counter;
8273
+ resultPickerLatencyHistogram?: Histogram;
8274
+ inputFieldsGauge?: Gauge;
8275
+ outputFieldsGauge?: Gauge;
8276
+ examplesUsedGauge?: Gauge;
8277
+ demosUsedGauge?: Gauge;
8278
+ promptRenderLatencyHistogram?: Histogram;
8279
+ extractionLatencyHistogram?: Histogram;
8280
+ assertionLatencyHistogram?: Histogram;
8281
+ stateCreationLatencyHistogram?: Histogram;
8282
+ memoryUpdateLatencyHistogram?: Histogram;
7955
8283
  }
8284
+ declare const axCheckMetricsHealth: () => {
8285
+ healthy: boolean;
8286
+ issues: string[];
8287
+ };
8288
+ declare const axUpdateMetricsConfig: (config: Readonly<Partial<AxMetricsConfig>>) => void;
8289
+ declare const axGetMetricsConfig: () => AxMetricsConfig;
8290
+
7956
8291
  /**
7957
- * Serialized artifact saved after optimization for future reuse.
8292
+ * Factory function to create a default optimizer logger with color formatting
7958
8293
  */
7959
- interface AxACEOptimizationArtifact {
7960
- playbook: AxACEPlaybook;
7961
- feedback: AxACEFeedbackEvent[];
7962
- history: {
7963
- epoch: number;
7964
- exampleIndex: number;
7965
- operations: AxACECuratorOperation[];
7966
- }[];
7967
- }
7968
-
7969
- interface AxACECompileOptions extends AxCompileOptions {
7970
- aceOptions?: AxACEOptions;
7971
- }
7972
- interface AxACEResult<OUT extends AxGenOut> extends AxOptimizerResult<OUT> {
7973
- optimizedProgram?: AxACEOptimizedProgram<OUT>;
7974
- playbook: AxACEPlaybook;
7975
- artifact: AxACEOptimizationArtifact;
7976
- }
8294
+ declare const axCreateDefaultOptimizerColorLogger: (output?: (message: string) => void) => AxOptimizerLoggerFunction;
7977
8295
  /**
7978
- * Optimized program artifact that persists ACE playbook updates.
8296
+ * Factory function to create a text-only optimizer logger (no colors)
7979
8297
  */
7980
- declare class AxACEOptimizedProgram<OUT = any> extends AxOptimizedProgramImpl<OUT> {
7981
- readonly playbook: AxACEPlaybook;
7982
- readonly artifact: AxACEOptimizationArtifact;
7983
- private readonly baseInstruction?;
7984
- constructor(config: {
7985
- baseInstruction?: string;
7986
- playbook: AxACEPlaybook;
7987
- artifact: AxACEOptimizationArtifact;
7988
- bestScore: number;
7989
- stats: AxOptimizationStats;
7990
- optimizerType: string;
7991
- optimizationTime: number;
7992
- totalRounds: number;
7993
- converged: boolean;
7994
- instruction?: string;
7995
- demos?: AxOptimizedProgram<OUT>['demos'];
7996
- examples?: AxExample$1[];
7997
- modelConfig?: AxOptimizedProgram<OUT>['modelConfig'];
7998
- scoreHistory?: number[];
7999
- configurationHistory?: Record<string, unknown>[];
8000
- });
8001
- applyTo<IN, T extends AxGenOut>(program: AxGen<IN, T>): void;
8002
- }
8298
+ declare const axCreateDefaultOptimizerTextLogger: (output?: (message: string) => void) => AxOptimizerLoggerFunction;
8003
8299
  /**
8004
- * AxACE implements the Agentic Context Engineering loop (Generator → Reflector → Curator).
8005
- * The implementation mirrors the paper's architecture while integrating with the Ax optimizer
8006
- * ergonomics (unified optimized program artifacts, metrics, and checkpointing).
8300
+ * Default optimizer logger instance with color formatting
8007
8301
  */
8008
- declare class AxACE extends AxBaseOptimizer {
8009
- private readonly aceConfig;
8010
- private playbook;
8011
- private generatorHistory;
8012
- private deltaHistory;
8013
- private reflectorProgram?;
8014
- private curatorProgram?;
8015
- private program?;
8016
- constructor(args: Readonly<AxOptimizerArgs>, options?: Readonly<AxACEOptions>);
8017
- reset(): void;
8018
- configureAuto(level: 'light' | 'medium' | 'heavy'): void;
8019
- compile<IN, OUT extends AxGenOut>(program: Readonly<AxGen<IN, OUT>>, examples: readonly AxTypedExample<IN>[], metricFn: AxMetricFn, options?: AxACECompileOptions): Promise<AxACEResult<OUT>>;
8020
- /**
8021
- * Apply ACE updates after each online inference. Mirrors the online adaptation
8022
- * flow described in the paper; can be called by user-land code between queries.
8023
- */
8024
- applyOnlineUpdate(args: Readonly<{
8025
- example: AxExample$1;
8026
- prediction: unknown;
8027
- feedback?: string;
8028
- }>): Promise<AxACECuratorOutput | undefined>;
8029
- private composeInstruction;
8030
- private extractProgramInstruction;
8031
- private createGeneratorOutput;
8032
- private resolveCuratorOperationTargets;
8033
- private locateBullet;
8034
- private locateFallbackBullet;
8035
- private collectProtectedBulletIds;
8036
- private normalizeCuratorOperations;
8037
- private inferOperationsFromReflection;
8038
- private runReflectionRounds;
8039
- private runReflector;
8040
- private runCurator;
8041
- private getOrCreateReflectorProgram;
8042
- private getOrCreateCuratorProgram;
8043
- }
8302
+ declare const axDefaultOptimizerLogger: AxOptimizerLoggerFunction;
8044
8303
 
8045
8304
  declare class AxBootstrapFewShot extends AxBaseOptimizer {
8046
8305
  private maxRounds;
@@ -8060,120 +8319,6 @@ declare class AxBootstrapFewShot extends AxBaseOptimizer {
8060
8319
  compile<IN, OUT extends AxGenOut>(program: Readonly<AxGen<IN, OUT>>, examples: readonly AxTypedExample<IN>[], metricFn: AxMetricFn, options?: AxCompileOptions): Promise<AxOptimizerResult<OUT>>;
8061
8320
  }
8062
8321
 
8063
- /** Structured optimization report */
8064
- interface AxGEPAOptimizationReport {
8065
- summary: string;
8066
- bestSolution: {
8067
- overallScore: number;
8068
- objectives: Record<string, {
8069
- value: number;
8070
- percentage: number;
8071
- }>;
8072
- };
8073
- paretoFrontier: {
8074
- solutionCount: number;
8075
- objectiveSpaceCoverage: number;
8076
- hypervolume: number;
8077
- tradeoffs?: Array<Record<string, number>>;
8078
- };
8079
- statistics: {
8080
- totalEvaluations: number;
8081
- candidatesExplored: number;
8082
- converged: boolean;
8083
- };
8084
- recommendations: {
8085
- status: 'good' | 'limited' | 'single';
8086
- suggestions: string[];
8087
- };
8088
- }
8089
- /** Single-module GEPA (reflective prompt evolution with Pareto sampling) */
8090
- declare class AxGEPA extends AxBaseOptimizer {
8091
- private numTrials;
8092
- private minibatch;
8093
- private minibatchSize;
8094
- private earlyStoppingTrials;
8095
- private minImprovementThreshold;
8096
- private sampleCount;
8097
- private paretoSetSize;
8098
- private crossoverEvery;
8099
- private tieEpsilon;
8100
- private feedbackMemorySize;
8101
- private feedbackMemory;
8102
- private mergeMax;
8103
- private mergesUsed;
8104
- private mergesDue;
8105
- private totalMergesTested;
8106
- private lastIterFoundNewProgram;
8107
- private mergeAttemptKeys;
8108
- private mergeCompositionKeys;
8109
- private static readonly REFLECTION_PROMPT_TEMPLATE;
8110
- private rngState;
8111
- private samplerState;
8112
- private localScoreHistory;
8113
- private localConfigurationHistory;
8114
- constructor(args: Readonly<AxOptimizerArgs>);
8115
- reset(): void;
8116
- /**
8117
- * Multi-objective GEPA: reflective evolution with Pareto frontier
8118
- */
8119
- compile<IN, OUT extends AxGenOut>(program: Readonly<AxGen<IN, OUT>>, examples: readonly AxTypedExample<IN>[], metricFn: AxMetricFn, options?: AxCompileOptions): Promise<AxParetoResult<OUT>>;
8120
- /** Lightweight auto presets */
8121
- configureAuto(level: 'light' | 'medium' | 'heavy'): void;
8122
- private getBaseInstruction;
8123
- private evaluateOnSet;
8124
- private evaluateAvg;
8125
- private evaluateOne;
8126
- private reflectInstruction;
8127
- /**
8128
- * Extract instruction text from LLM output enclosed in backticks (aligned with reference)
8129
- */
8130
- private extractInstructionFromBackticks;
8131
- private updateSamplerShuffled;
8132
- private nextMinibatchIndices;
8133
- private rand;
8134
- private generateOptimizationReport;
8135
- private mergeInstructions;
8136
- }
8137
-
8138
- /** Flow-aware GEPA (system-level reflective evolution with module selection + system-aware merge) */
8139
- declare class AxGEPAFlow extends AxBaseOptimizer {
8140
- private numTrials;
8141
- private minibatch;
8142
- private minibatchSize;
8143
- private earlyStoppingTrials;
8144
- private minImprovementThreshold;
8145
- private sampleCount;
8146
- private crossoverEvery;
8147
- private tieEpsilon;
8148
- private paretoSetSize;
8149
- private mergeMax;
8150
- private mergesUsed;
8151
- private mergesDue;
8152
- private totalMergesTested;
8153
- private lastIterFoundNewProgram;
8154
- private rngState;
8155
- private mergeAttemptKeys;
8156
- private mergeCompositionKeys;
8157
- private samplerState;
8158
- constructor(args: Readonly<AxOptimizerArgs>);
8159
- reset(): void;
8160
- configureAuto(level: 'light' | 'medium' | 'heavy'): void;
8161
- /**
8162
- * Multi-objective GEPA-Flow: system-level reflective evolution with Pareto frontier
8163
- */
8164
- compile<IN, OUT extends AxGenOut>(program: Readonly<any>, examples: readonly AxTypedExample<IN>[], metricFn: AxMetricFn, options?: AxCompileOptions): Promise<AxParetoResult<OUT>>;
8165
- private getBaseInstruction;
8166
- private evaluateOnSet;
8167
- private evaluateAvg;
8168
- private evaluateOne;
8169
- private reflectModuleInstruction;
8170
- private updateSamplerShuffled;
8171
- private nextMinibatchIndices;
8172
- private systemAwareMergeWithSig;
8173
- private rand;
8174
- private systemAwareMerge;
8175
- }
8176
-
8177
8322
  interface AxMiPROResult<IN, OUT extends AxGenOut> extends AxOptimizerResult<OUT> {
8178
8323
  optimizedGen?: AxGen<IN, OUT>;
8179
8324
  optimizedProgram?: AxOptimizedProgram<OUT>;
@@ -9007,6 +9152,7 @@ TState extends AxFlowState = IN> implements AxFlowable<IN, OUT> {
9007
9152
  id: string;
9008
9153
  signature?: string;
9009
9154
  }>;
9155
+ namedProgramInstances(): AxNamedProgramInstance<IN, OUT>[];
9010
9156
  getTraces(): AxProgramTrace<IN, OUT>[];
9011
9157
  setDemos(demos: readonly AxProgramDemos<IN, OUT, keyof TNodes extends never ? string : `${string}.${string & keyof TNodes}`>[], options?: {
9012
9158
  modelConfig?: Record<string, unknown>;
@@ -9847,39 +9993,92 @@ interface AxCodeSession {
9847
9993
  close(): void;
9848
9994
  }
9849
9995
  /**
9850
- * Configuration for semantic context management in the Actor loop.
9851
- * Controls how action log entries are evaluated, summarized, and pruned.
9852
- */
9853
- interface AxContextManagementConfig {
9854
- /** Prune error entries after a successful (non-error) turn. */
9855
- errorPruning?: boolean;
9856
- /** Enable tombstone generation for resolved errors.
9857
- * When `true`, uses the main AI service with its default settings.
9858
- * Pass an `AxProgramForwardOptions` object to control the model, temperature,
9859
- * max tokens, etc. of the tombstone generation call (e.g. a cheaper/faster model). */
9860
- tombstoning?: boolean | Omit<AxProgramForwardOptions<string>, 'functions'>;
9861
- /** Enable heuristic-based importance scoring on entries. */
9862
- hindsightEvaluation?: boolean;
9863
- /** Controls how prior actor actions are replayed into the next prompt. */
9864
- actionReplay?: 'full' | 'adaptive' | 'minimal';
9865
- /** Number of most-recent actions that should always remain fully rendered. */
9866
- recentFullActions?: number;
9867
- /** Enable compact summaries for successful actions instead of raw code/output replay. */
9868
- successSummarization?: boolean | Omit<AxProgramForwardOptions<string>, 'functions'>;
9869
- /** Enable runtime state inspection tool for the actor.
9870
- * `contextThreshold` is the character count on the serialized actionLog
9871
- * above which an `inspect_runtime()` hint is shown to the actor. */
9872
- stateInspection?: {
9873
- contextThreshold?: number;
9996
+ * Opinionated context replay presets for the Actor loop.
9997
+ *
9998
+ * - `full`: Keep prior actions fully replayed with minimal compression.
9999
+ * Best for debugging or short tasks where the actor should reread exact old code/output.
10000
+ * - `adaptive`: Keep live runtime state visible, preserve recent or dependency-relevant
10001
+ * actions in full, hide used discovery docs, and collapse older successful work
10002
+ * into checkpoint summaries as context grows. Reliability-first defaults favor
10003
+ * summaries before deletion. Best default for long multi-turn tasks.
10004
+ * - `lean`: Most aggressive compression. Keep live runtime state visible, checkpoint
10005
+ * older successful work, hide used discovery docs, and summarize replay-pruned
10006
+ * successful turns instead of replaying their full code blocks. Reliability-first
10007
+ * defaults still preserve recent evidence before deleting older low-value steps.
10008
+ * Best when token pressure matters more than raw replay detail.
10009
+ */
10010
+ type AxContextPolicyPreset = 'full' | 'adaptive' | 'lean';
10011
+ /**
10012
+ * Public context policy for the Actor loop.
10013
+ * Presets provide the common behavior; `state` and `expert` override specific pieces.
10014
+ */
10015
+ interface AxContextPolicyConfig {
10016
+ /**
10017
+ * Opinionated preset for how the agent should replay and compress context.
10018
+ *
10019
+ * - `full`: prefer raw replay of earlier actions
10020
+ * - `adaptive`: balance replay detail with checkpoint compression
10021
+ * - `lean`: prefer live state + compact summaries over raw replay detail
10022
+ */
10023
+ preset?: AxContextPolicyPreset;
10024
+ /**
10025
+ * Default options for the internal checkpoint summarizer AxGen program.
10026
+ * `functions` are not supported, `maxSteps` is forced to `1`, and `mem`
10027
+ * is never propagated so the summarizer stays stateless.
10028
+ */
10029
+ summarizerOptions?: Omit<AxProgramForwardOptions<string>, 'functions'>;
10030
+ /**
10031
+ * Hide stale discovery docs from later actor prompts after a discovered
10032
+ * callable is used successfully. This only affects prompt replay; it does
10033
+ * not delete internal history or remove runtime values.
10034
+ *
10035
+ * Defaults by preset:
10036
+ * - `full`: false
10037
+ * - `adaptive`: true
10038
+ * - `lean`: true
10039
+ */
10040
+ pruneUsedDocs?: boolean;
10041
+ /** Runtime-state visibility controls. */
10042
+ state?: {
10043
+ /** Include a compact live runtime state block ahead of the action log. */
10044
+ summary?: boolean;
10045
+ /** Expose `inspect_runtime()` to the actor and show the large-context hint. */
10046
+ inspect?: boolean;
10047
+ /** Character count above which the actor is reminded to call `inspect_runtime()`. */
10048
+ inspectThresholdChars?: number;
10049
+ /** Maximum number of runtime state entries to render in the summary block. */
10050
+ maxEntries?: number;
10051
+ /** Maximum total characters to replay in the runtime state summary block. */
10052
+ maxChars?: number;
9874
10053
  };
9875
- /** Include a compact live runtime state block ahead of the action log. */
9876
- stateSummary?: {
10054
+ /** Rolling checkpoint summary controls. */
10055
+ checkpoints?: {
10056
+ /** Enable checkpoint summaries for older successful turns. */
9877
10057
  enabled?: boolean;
9878
- maxEntries?: number;
10058
+ /** Character count above which a checkpoint summary is generated. */
10059
+ triggerChars?: number;
10060
+ };
10061
+ /** Expert-level overrides for the preset-derived internal policy. */
10062
+ expert?: {
10063
+ /** Controls how prior actor actions are replayed before checkpoint compression. */
10064
+ replay?: 'full' | 'adaptive' | 'minimal';
10065
+ /** Number of most-recent actions that should always remain fully rendered. */
10066
+ recentFullActions?: number;
10067
+ /** Prune error entries after a successful (non-error) turn. */
10068
+ pruneErrors?: boolean;
10069
+ /** Rank-based pruning of low-value actions. Off by default for built-in presets. */
10070
+ rankPruning?: {
10071
+ enabled?: boolean;
10072
+ minRank?: number;
10073
+ };
10074
+ /**
10075
+ * Replace resolved errors with compact tombstones before pruning.
10076
+ * When configured with options, they apply to the internal tombstone
10077
+ * summarizer AxGen program. `functions` are not supported, `maxSteps`
10078
+ * is forced to `1`, and `mem` is never propagated.
10079
+ */
10080
+ tombstones?: boolean | Omit<AxProgramForwardOptions<string>, 'functions'>;
9879
10081
  };
9880
- /** Entries ranked strictly below this value are purged from active context.
9881
- * Range: 0-5. Default: 2. */
9882
- pruneRank?: number;
9883
10082
  }
9884
10083
  /**
9885
10084
  * RLM configuration for AxAgent.
@@ -9902,13 +10101,8 @@ interface AxRLMConfig {
9902
10101
  maxBatchedLlmQueryConcurrency?: number;
9903
10102
  /** Maximum Actor turns before forcing Responder (default: 10). */
9904
10103
  maxTurns?: number;
9905
- /**
9906
- * @deprecated Use `contextManagement.errorPruning` instead.
9907
- * If true, prune error entries from the action log after a successful turn.
9908
- */
9909
- trajectoryPruning?: boolean;
9910
- /** Semantic context management configuration. */
9911
- contextManagement?: AxContextManagementConfig;
10104
+ /** Context replay, checkpointing, and runtime-state policy. */
10105
+ contextPolicy?: AxContextPolicyConfig;
9912
10106
  /** Output field names the Actor should produce (in addition to javascriptCode). */
9913
10107
  actorFields?: string[];
9914
10108
  /** Called after each Actor turn with the full actor result. */
@@ -9930,6 +10124,8 @@ declare function axBuildActorDefinition(baseDefinition: string | undefined, cont
9930
10124
  maxSubAgentCalls?: number;
9931
10125
  maxTurns?: number;
9932
10126
  hasInspectRuntime?: boolean;
10127
+ hasLiveRuntimeState?: boolean;
10128
+ hasCompressedActionReplay?: boolean;
9933
10129
  /** When true, Actor must run one observable console step per non-final turn. */
9934
10130
  enforceIncrementalConsoleTurns?: boolean;
9935
10131
  /** Child agents available under the `<agentModuleNamespace>.*` namespace in the JS runtime. */
@@ -9951,7 +10147,10 @@ declare function axBuildActorDefinition(baseDefinition: string | undefined, cont
9951
10147
  /** Enables module-only discovery rendering in prompt. */
9952
10148
  discoveryMode?: boolean;
9953
10149
  /** Precomputed available modules for runtime discovery mode. */
9954
- availableModules?: readonly string[];
10150
+ availableModules?: ReadonlyArray<{
10151
+ namespace: string;
10152
+ selectionCriteria?: string;
10153
+ }>;
9955
10154
  }>): string;
9956
10155
  /**
9957
10156
  * Builds the Responder system prompt. The Responder synthesizes a final answer
@@ -10385,9 +10584,10 @@ type AxAgentIdentity = {
10385
10584
  description: string;
10386
10585
  namespace?: string;
10387
10586
  };
10388
- type AxAgentNamespace = {
10389
- name: string;
10587
+ type AxAgentFunctionModuleMeta = {
10588
+ namespace: string;
10390
10589
  title: string;
10590
+ selectionCriteria: string;
10391
10591
  description: string;
10392
10592
  };
10393
10593
  type AxAgentFunctionExample = {
@@ -10399,6 +10599,15 @@ type AxAgentFunctionExample = {
10399
10599
  type AxAgentFunction = AxFunction & {
10400
10600
  examples?: readonly AxAgentFunctionExample[];
10401
10601
  };
10602
+ type AxAgentFunctionGroup = AxAgentFunctionModuleMeta & {
10603
+ functions: readonly Omit<AxAgentFunction, 'namespace'>[];
10604
+ };
10605
+ type AxAgentTestCompletionPayload = {
10606
+ type: 'final' | 'ask_clarification';
10607
+ args: unknown[];
10608
+ };
10609
+ type AxAgentTestResult = string | AxAgentTestCompletionPayload;
10610
+ type AxAgentFunctionCollection = readonly AxAgentFunction[] | readonly AxAgentFunctionGroup[];
10402
10611
  type AxContextFieldInput = string | {
10403
10612
  field: string;
10404
10613
  promptMaxChars?: number;
@@ -10454,16 +10663,14 @@ type AxAgentOptions<IN extends AxGenIn = AxGenIn> = Omit<AxProgramForwardOptions
10454
10663
  /** Shared fields from a parent agent that this agent should NOT receive. */
10455
10664
  excluded?: string[];
10456
10665
  };
10457
- /** Optional metadata for discovery modules rendered by `listModuleFunctions(...)`. */
10458
- namespaces?: readonly AxAgentNamespace[];
10459
10666
  /** Agent function configuration. */
10460
10667
  functions?: {
10461
10668
  /** Agent functions local to this agent (registered under namespace globals). */
10462
- local?: AxAgentFunction[];
10669
+ local?: AxAgentFunctionCollection;
10463
10670
  /** Agent functions to share with direct child agents (one level). */
10464
- shared?: AxAgentFunction[];
10671
+ shared?: AxAgentFunctionCollection;
10465
10672
  /** Agent functions to share with ALL descendants recursively. */
10466
- globallyShared?: AxAgentFunction[];
10673
+ globallyShared?: AxAgentFunctionCollection;
10467
10674
  /** Agent function names this agent should NOT receive from parents. */
10468
10675
  excluded?: string[];
10469
10676
  /** Enables runtime callable discovery (modules + on-demand definitions). */
@@ -10479,10 +10686,8 @@ type AxAgentOptions<IN extends AxGenIn = AxGenIn> = Omit<AxProgramForwardOptions
10479
10686
  maxBatchedLlmQueryConcurrency?: number;
10480
10687
  /** Maximum Actor turns before forcing Responder (default: 10). */
10481
10688
  maxTurns?: number;
10482
- /** @deprecated Use `contextManagement.errorPruning` instead. */
10483
- trajectoryPruning?: boolean;
10484
- /** Semantic context management configuration. */
10485
- contextManagement?: AxContextManagementConfig;
10689
+ /** Context replay, checkpointing, and runtime-state policy. */
10690
+ contextPolicy?: AxContextPolicyConfig;
10486
10691
  /** Output field names the Actor should produce (in addition to javascriptCode). */
10487
10692
  actorFields?: string[];
10488
10693
  /** Called after each Actor turn with the full actor result. */
@@ -10526,7 +10731,7 @@ declare class AxAgent<IN extends AxGenIn, OUT extends AxGenOut> implements AxAge
10526
10731
  private responderProgram;
10527
10732
  private agents?;
10528
10733
  private agentFunctions;
10529
- private discoveryNamespaces;
10734
+ private agentFunctionModuleMetadata;
10530
10735
  private debug?;
10531
10736
  private options?;
10532
10737
  private rlmConfig;
@@ -10555,6 +10760,10 @@ declare class AxAgent<IN extends AxGenIn, OUT extends AxGenOut> implements AxAge
10555
10760
  private _parentSharedFields;
10556
10761
  private _parentSharedAgents;
10557
10762
  private _parentSharedAgentFunctions;
10763
+ private _reservedAgentFunctionNamespaces;
10764
+ private _mergeAgentFunctionModuleMetadata;
10765
+ private _validateConfiguredSignature;
10766
+ private _validateAgentFunctionNamespaces;
10558
10767
  constructor({ ai, agentIdentity, agentModuleNamespace, signature, }: Readonly<{
10559
10768
  ai?: Readonly<AxAIService>;
10560
10769
  agentIdentity?: Readonly<AxAgentIdentity>;
@@ -10608,6 +10817,7 @@ declare class AxAgent<IN extends AxGenIn, OUT extends AxGenOut> implements AxAge
10608
10817
  id: string;
10609
10818
  signature?: string;
10610
10819
  }>;
10820
+ namedProgramInstances(): AxNamedProgramInstance<IN, OUT>[];
10611
10821
  getTraces(): AxProgramTrace<IN, OUT>[];
10612
10822
  setDemos(demos: readonly (AxAgentDemos<IN, OUT> | AxProgramDemos<IN, OUT>)[], options?: {
10613
10823
  modelConfig?: Record<string, unknown>;
@@ -10620,9 +10830,16 @@ declare class AxAgent<IN extends AxGenIn, OUT extends AxGenOut> implements AxAge
10620
10830
  getFunction(): AxFunction;
10621
10831
  getExcludedSharedFields(): readonly string[];
10622
10832
  private _getBypassedSharedFieldNames;
10833
+ private _createRuntimeInputState;
10834
+ private _createRuntimeExecutionContext;
10623
10835
  getExcludedAgents(): readonly string[];
10624
10836
  getExcludedAgentFunctions(): readonly string[];
10625
10837
  getSignature(): AxSignature;
10838
+ test(code: string, values?: Partial<IN>, options?: Readonly<{
10839
+ ai?: AxAIService;
10840
+ abortSignal?: AbortSignal;
10841
+ debug?: boolean;
10842
+ }>): Promise<AxAgentTestResult>;
10626
10843
  setSignature(signature: NonNullable<ConstructorParameters<typeof AxSignature>[0]>): void;
10627
10844
  applyOptimization(optimizedProgram: any): void;
10628
10845
  /**
@@ -11033,4 +11250,4 @@ declare class AxRateLimiterTokenUsage {
11033
11250
  acquire(tokens: number): Promise<void>;
11034
11251
  }
11035
11252
 
11036
- export { AxACE, type AxACEBullet, type AxACECuratorOperation, type AxACECuratorOperationType, type AxACECuratorOutput, type AxACEFeedbackEvent, type AxACEGeneratorOutput, type AxACEOptimizationArtifact, AxACEOptimizedProgram, type AxACEOptions, type AxACEPlaybook, type AxACEReflectionOutput, type AxACEResult, AxAI, AxAIAnthropic, type AxAIAnthropicArgs, type AxAIAnthropicChatError, type AxAIAnthropicChatRequest, type AxAIAnthropicChatRequestCacheParam, type AxAIAnthropicChatResponse, type AxAIAnthropicChatResponseDelta, type AxAIAnthropicConfig, type AxAIAnthropicContentBlockDeltaEvent, type AxAIAnthropicContentBlockStartEvent, type AxAIAnthropicContentBlockStopEvent, type AxAIAnthropicEffortLevel, type AxAIAnthropicEffortLevelMapping, type AxAIAnthropicErrorEvent, type AxAIAnthropicFunctionTool, type AxAIAnthropicMessageDeltaEvent, type AxAIAnthropicMessageStartEvent, type AxAIAnthropicMessageStopEvent, AxAIAnthropicModel, type AxAIAnthropicOutputConfig, type AxAIAnthropicPingEvent, type AxAIAnthropicRequestTool, type AxAIAnthropicThinkingConfig, type AxAIAnthropicThinkingTokenBudgetLevels, type AxAIAnthropicThinkingWire, AxAIAnthropicVertexModel, type AxAIAnthropicWebSearchTool, type AxAIArgs, AxAIAzureOpenAI, type AxAIAzureOpenAIArgs, type AxAIAzureOpenAIConfig, AxAICohere, type AxAICohereArgs, type AxAICohereChatRequest, type AxAICohereChatRequestToolResults, type AxAICohereChatResponse, type AxAICohereChatResponseDelta, type AxAICohereChatResponseToolCalls, type AxAICohereConfig, AxAICohereEmbedModel, type AxAICohereEmbedRequest, type AxAICohereEmbedResponse, AxAICohereModel, AxAIDeepSeek, type AxAIDeepSeekArgs, AxAIDeepSeekModel, type AxAIEmbedModels, type AxAIFeatures, AxAIGoogleGemini, type AxAIGoogleGeminiArgs, type AxAIGoogleGeminiBatchEmbedRequest, type AxAIGoogleGeminiBatchEmbedResponse, type AxAIGoogleGeminiCacheCreateRequest, type AxAIGoogleGeminiCacheResponse, type AxAIGoogleGeminiCacheUpdateRequest, type AxAIGoogleGeminiChatRequest, type AxAIGoogleGeminiChatResponse, type AxAIGoogleGeminiChatResponseDelta, type AxAIGoogleGeminiConfig, type AxAIGoogleGeminiContent, type AxAIGoogleGeminiContentPart, AxAIGoogleGeminiEmbedModel, AxAIGoogleGeminiEmbedTypes, type AxAIGoogleGeminiGenerationConfig, AxAIGoogleGeminiModel, type AxAIGoogleGeminiOptionsTools, type AxAIGoogleGeminiRetrievalConfig, AxAIGoogleGeminiSafetyCategory, type AxAIGoogleGeminiSafetySettings, AxAIGoogleGeminiSafetyThreshold, type AxAIGoogleGeminiThinkingConfig, type AxAIGoogleGeminiThinkingLevel, type AxAIGoogleGeminiThinkingLevelMapping, type AxAIGoogleGeminiThinkingTokenBudgetLevels, type AxAIGoogleGeminiTool, type AxAIGoogleGeminiToolConfig, type AxAIGoogleGeminiToolFunctionDeclaration, type AxAIGoogleGeminiToolGoogleMaps, type AxAIGoogleGeminiToolGoogleSearchRetrieval, type AxAIGoogleVertexBatchEmbedRequest, type AxAIGoogleVertexBatchEmbedResponse, AxAIGrok, type AxAIGrokArgs, type AxAIGrokChatRequest, AxAIGrokEmbedModels, AxAIGrokModel, type AxAIGrokOptionsTools, type AxAIGrokSearchSource, AxAIGroq, type AxAIGroqArgs, AxAIGroqModel, AxAIHuggingFace, type AxAIHuggingFaceArgs, type AxAIHuggingFaceConfig, AxAIHuggingFaceModel, type AxAIHuggingFaceRequest, type AxAIHuggingFaceResponse, type AxAIInputModelList, type AxAIMemory, type AxAIMetricsInstruments, AxAIMistral, type AxAIMistralArgs, type AxAIMistralChatRequest, AxAIMistralEmbedModels, AxAIMistralModel, type AxAIModelList, type AxAIModelListBase, type AxAIModels, AxAIOllama, type AxAIOllamaAIConfig, type AxAIOllamaArgs, AxAIOpenAI, type AxAIOpenAIAnnotation, type AxAIOpenAIArgs, AxAIOpenAIBase, type AxAIOpenAIBaseArgs, type AxAIOpenAIChatRequest, type AxAIOpenAIChatResponse, type AxAIOpenAIChatResponseDelta, type AxAIOpenAIConfig, AxAIOpenAIEmbedModel, type AxAIOpenAIEmbedRequest, type AxAIOpenAIEmbedResponse, type AxAIOpenAILogprob, AxAIOpenAIModel, type AxAIOpenAIResponseDelta, AxAIOpenAIResponses, type AxAIOpenAIResponsesArgs, AxAIOpenAIResponsesBase, type AxAIOpenAIResponsesCodeInterpreterToolCall, type AxAIOpenAIResponsesComputerToolCall, type AxAIOpenAIResponsesConfig, type AxAIOpenAIResponsesContentPartAddedEvent, type AxAIOpenAIResponsesContentPartDoneEvent, type AxAIOpenAIResponsesDefineFunctionTool, type AxAIOpenAIResponsesErrorEvent, type AxAIOpenAIResponsesFileSearchCallCompletedEvent, type AxAIOpenAIResponsesFileSearchCallInProgressEvent, type AxAIOpenAIResponsesFileSearchCallSearchingEvent, type AxAIOpenAIResponsesFileSearchToolCall, type AxAIOpenAIResponsesFunctionCallArgumentsDeltaEvent, type AxAIOpenAIResponsesFunctionCallArgumentsDoneEvent, type AxAIOpenAIResponsesFunctionCallItem, type AxAIOpenAIResponsesImageGenerationCallCompletedEvent, type AxAIOpenAIResponsesImageGenerationCallGeneratingEvent, type AxAIOpenAIResponsesImageGenerationCallInProgressEvent, type AxAIOpenAIResponsesImageGenerationCallPartialImageEvent, type AxAIOpenAIResponsesImageGenerationToolCall, AxAIOpenAIResponsesImpl, type AxAIOpenAIResponsesInputAudioContentPart, type AxAIOpenAIResponsesInputContentPart, type AxAIOpenAIResponsesInputFunctionCallItem, type AxAIOpenAIResponsesInputFunctionCallOutputItem, type AxAIOpenAIResponsesInputImageUrlContentPart, type AxAIOpenAIResponsesInputItem, type AxAIOpenAIResponsesInputMessageItem, type AxAIOpenAIResponsesInputTextContentPart, type AxAIOpenAIResponsesLocalShellToolCall, type AxAIOpenAIResponsesMCPCallArgumentsDeltaEvent, type AxAIOpenAIResponsesMCPCallArgumentsDoneEvent, type AxAIOpenAIResponsesMCPCallCompletedEvent, type AxAIOpenAIResponsesMCPCallFailedEvent, type AxAIOpenAIResponsesMCPCallInProgressEvent, type AxAIOpenAIResponsesMCPListToolsCompletedEvent, type AxAIOpenAIResponsesMCPListToolsFailedEvent, type AxAIOpenAIResponsesMCPListToolsInProgressEvent, type AxAIOpenAIResponsesMCPToolCall, AxAIOpenAIResponsesModel, type AxAIOpenAIResponsesOutputItem, type AxAIOpenAIResponsesOutputItemAddedEvent, type AxAIOpenAIResponsesOutputItemDoneEvent, type AxAIOpenAIResponsesOutputMessageItem, type AxAIOpenAIResponsesOutputRefusalContentPart, type AxAIOpenAIResponsesOutputTextAnnotationAddedEvent, type AxAIOpenAIResponsesOutputTextContentPart, type AxAIOpenAIResponsesOutputTextDeltaEvent, type AxAIOpenAIResponsesOutputTextDoneEvent, type AxAIOpenAIResponsesReasoningDeltaEvent, type AxAIOpenAIResponsesReasoningDoneEvent, type AxAIOpenAIResponsesReasoningItem, type AxAIOpenAIResponsesReasoningSummaryDeltaEvent, type AxAIOpenAIResponsesReasoningSummaryDoneEvent, type AxAIOpenAIResponsesReasoningSummaryPart, type AxAIOpenAIResponsesReasoningSummaryPartAddedEvent, type AxAIOpenAIResponsesReasoningSummaryPartDoneEvent, type AxAIOpenAIResponsesReasoningSummaryTextDeltaEvent, type AxAIOpenAIResponsesReasoningSummaryTextDoneEvent, type AxAIOpenAIResponsesRefusalDeltaEvent, type AxAIOpenAIResponsesRefusalDoneEvent, type AxAIOpenAIResponsesRequest, type AxAIOpenAIResponsesResponse, type AxAIOpenAIResponsesResponseCompletedEvent, type AxAIOpenAIResponsesResponseCreatedEvent, type AxAIOpenAIResponsesResponseDelta, type AxAIOpenAIResponsesResponseFailedEvent, type AxAIOpenAIResponsesResponseInProgressEvent, type AxAIOpenAIResponsesResponseIncompleteEvent, type AxAIOpenAIResponsesResponseQueuedEvent, type AxAIOpenAIResponsesStreamEvent, type AxAIOpenAIResponsesStreamEventBase, type AxAIOpenAIResponsesToolCall, type AxAIOpenAIResponsesToolCallBase, type AxAIOpenAIResponsesToolChoice, type AxAIOpenAIResponsesToolDefinition, type AxAIOpenAIResponsesWebSearchCallCompletedEvent, type AxAIOpenAIResponsesWebSearchCallInProgressEvent, type AxAIOpenAIResponsesWebSearchCallSearchingEvent, type AxAIOpenAIResponsesWebSearchToolCall, type AxAIOpenAIUrlCitation, type AxAIOpenAIUsage, AxAIOpenRouter, type AxAIOpenRouterArgs, AxAIRefusalError, AxAIReka, type AxAIRekaArgs, type AxAIRekaChatRequest, type AxAIRekaChatResponse, type AxAIRekaChatResponseDelta, type AxAIRekaConfig, AxAIRekaModel, type AxAIRekaUsage, type AxAIService, AxAIServiceAbortedError, type AxAIServiceActionOptions, AxAIServiceAuthenticationError, AxAIServiceError, type AxAIServiceImpl, type AxAIServiceMetrics, type AxAIServiceModelType, AxAIServiceNetworkError, type AxAIServiceOptions, AxAIServiceResponseError, AxAIServiceStatusError, AxAIServiceStreamTerminatedError, AxAIServiceTimeoutError, AxAITogether, type AxAITogetherArgs, type AxAITogetherChatModel, AxAITogetherModel, AxAIWebLLM, type AxAIWebLLMArgs, type AxAIWebLLMChatRequest, type AxAIWebLLMChatResponse, type AxAIWebLLMChatResponseDelta, type AxAIWebLLMConfig, type AxAIWebLLMEmbedModel, type AxAIWebLLMEmbedRequest, type AxAIWebLLMEmbedResponse, AxAIWebLLMModel, type AxAPI, type AxAPIConfig, AxAgent, type AxAgentConfig, type AxAgentDemos, type AxAgentFunction, type AxAgentFunctionExample, type AxAgentInputUpdateCallback, type AxAgentNamespace, type AxAgentOptions, type AxAgentRecursionOptions, type AxAgentic, AxApacheTika, type AxApacheTikaArgs, type AxApacheTikaConvertOptions, type AxAssertion, AxAssertionError, AxBalancer, type AxBalancerOptions, AxBaseAI, type AxBaseAIArgs, AxBaseOptimizer, AxBootstrapFewShot, type AxBootstrapOptimizerOptions, type AxChatRequest, type AxChatResponse, type AxChatResponseFunctionCall, type AxChatResponseResult, type AxCheckpoint, type AxCheckpointLoadFn, type AxCheckpointSaveFn, type AxCitation, type AxCodeInterpreter, type AxCodeRuntime, type AxCodeSession, type AxCompileOptions, AxContentProcessingError, type AxContentProcessingServices, type AxContextCacheInfo, type AxContextCacheOperation, type AxContextCacheOptions, type AxContextCacheRegistry, type AxContextCacheRegistryEntry, type AxContextFieldInput, type AxContextManagementConfig, type AxCostTracker, type AxCostTrackerOptions, AxDB, type AxDBArgs, AxDBBase, type AxDBBaseArgs, type AxDBBaseOpOptions, AxDBCloudflare, type AxDBCloudflareArgs, type AxDBCloudflareOpOptions, type AxDBLoaderOptions, AxDBManager, type AxDBManagerArgs, type AxDBMatch, AxDBMemory, type AxDBMemoryArgs, type AxDBMemoryOpOptions, AxDBPinecone, type AxDBPineconeArgs, type AxDBPineconeOpOptions, type AxDBQueryRequest, type AxDBQueryResponse, type AxDBQueryService, type AxDBService, type AxDBState, type AxDBUpsertRequest, type AxDBUpsertResponse, AxDBWeaviate, type AxDBWeaviateArgs, type AxDBWeaviateOpOptions, type AxDataRow, AxDefaultCostTracker, AxDefaultResultReranker, type AxDockerContainer, AxDockerSession, type AxEmbedRequest, type AxEmbedResponse, AxEmbeddingAdapter, type AxErrorCategory, AxEvalUtil, type AxEvaluateArgs, type AxExample$1 as AxExample, type AxExamples, type AxField, type AxFieldProcessor, type AxFieldProcessorProcess, type AxFieldTemplateFn, type AxFieldType, type AxFieldValue, AxFlow, type AxFlowAutoParallelConfig, type AxFlowBranchContext, type AxFlowBranchEvaluationData, type AxFlowCompleteData, AxFlowDependencyAnalyzer, type AxFlowDynamicContext, type AxFlowErrorData, AxFlowExecutionPlanner, type AxFlowExecutionStep, type AxFlowLogData, type AxFlowLoggerData, type AxFlowLoggerFunction, type AxFlowNodeDefinition, type AxFlowParallelBranch, type AxFlowParallelGroup, type AxFlowParallelGroupCompleteData, type AxFlowParallelGroupStartData, type AxFlowStartData, type AxFlowState, type AxFlowStepCompleteData, type AxFlowStepFunction, type AxFlowStepStartData, type AxFlowSubContext, AxFlowSubContextImpl, type AxFlowTypedParallelBranch, type AxFlowTypedSubContext, AxFlowTypedSubContextImpl, type AxFlowable, type AxFluentFieldInfo, AxFluentFieldType, type AxForwardable, type AxFunction, type AxFunctionCallRecord, AxFunctionError, type AxFunctionHandler, type AxFunctionJSONSchema, AxFunctionProcessor, type AxFunctionResult, type AxFunctionResultFormatter, AxGEPA, type AxGEPAAdapter, type AxGEPAEvaluationBatch, AxGEPAFlow, type AxGEPAOptimizationReport, AxGen, type AxGenDeltaOut, type AxGenIn, type AxGenInput, type AxGenMetricsInstruments, type AxGenOut, type AxGenOutput, type AxGenStreamingOut, AxGenerateError, type AxGenerateErrorDetails, type AxGenerateResult, AxHFDataLoader, type AxIField, type AxInputFunctionType, AxInstanceRegistry, type AxInternalChatRequest, type AxInternalEmbedRequest, AxJSRuntime, type AxJSRuntimeOutputMode, AxJSRuntimePermission, AxJudge, type AxJudgeMode, type AxJudgeOptions, type AxJudgeResult, type AxJudgeRubric, AxLLMRequestTypeValues, AxLearn, type AxLearnOptions, type AxLearnProgress, type AxLearnResult, type AxLoggerData, type AxLoggerFunction, type AxMCPBlobResourceContents, AxMCPClient, type AxMCPEmbeddedResource, type AxMCPFunctionDescription, AxMCPHTTPSSETransport, type AxMCPImageContent, type AxMCPInitializeParams, type AxMCPInitializeResult, type AxMCPJSONRPCErrorResponse, type AxMCPJSONRPCNotification, type AxMCPJSONRPCRequest, type AxMCPJSONRPCResponse, type AxMCPJSONRPCSuccessResponse, type AxMCPOAuthOptions, type AxMCPPrompt, type AxMCPPromptArgument, type AxMCPPromptGetResult, type AxMCPPromptMessage, type AxMCPPromptsListResult, type AxMCPResource, type AxMCPResourceReadResult, type AxMCPResourceTemplate, type AxMCPResourceTemplatesListResult, type AxMCPResourcesListResult, type AxMCPStreamableHTTPTransportOptions, AxMCPStreambleHTTPTransport, type AxMCPTextContent, type AxMCPTextResourceContents, type AxMCPToolsListResult, type AxMCPTransport, AxMediaNotSupportedError, AxMemory, type AxMemoryData, type AxMemoryMessageValue, type AxMessage, type AxMetricFn, type AxMetricFnArgs, type AxMetricsConfig, AxMiPRO, type AxMiPROOptimizerOptions, type AxMiPROResult, AxMockAIService, type AxMockAIServiceConfig, type AxModelConfig, type AxModelInfo, type AxModelInfoWithProvider, type AxModelUsage, type AxMultiMetricFn, type AxMultiProviderConfig, AxMultiServiceRouter, type AxOptimizationCheckpoint, type AxOptimizationProgress, type AxOptimizationStats, type AxOptimizedProgram, AxOptimizedProgramImpl, type AxOptimizer, type AxOptimizerArgs, type AxOptimizerLoggerData, type AxOptimizerLoggerFunction, type AxOptimizerMetricsConfig, type AxOptimizerMetricsInstruments, type AxOptimizerResult, type AxParetoResult, type AxPreparedChatRequest, AxProgram, type AxProgramDemos, type AxProgramExamples, type AxProgramForwardOptions, type AxProgramForwardOptionsWithModels, type AxProgramOptions, type AxProgramStreamingForwardOptions, type AxProgramStreamingForwardOptionsWithModels, type AxProgramTrace, type AxProgramUsage, type AxProgrammable, AxPromptTemplate, type AxPromptTemplateOptions, AxProviderRouter, type AxRLMConfig, type AxRateLimiterFunction, AxRateLimiterTokenUsage, type AxRateLimiterTokenUsageOptions, type AxRerankerIn, type AxRerankerOut, type AxResponseHandlerArgs, type AxResultPickerFunction, type AxResultPickerFunctionFieldResults, type AxResultPickerFunctionFunctionResults, type AxRewriteIn, type AxRewriteOut, type AxRoutingResult, type AxSamplePickerOptions, type AxSelfTuningConfig, type AxSetExamplesOptions, AxSignature, AxSignatureBuilder, type AxSignatureConfig, AxSimpleClassifier, AxSimpleClassifierClass, type AxSimpleClassifierForwardOptions, AxSpanKindValues, type AxStepContext, AxStepContextImpl, type AxStepHooks, type AxStepUsage, AxStopFunctionCallException, type AxStorage, type AxStorageQuery, type AxStreamingAssertion, type AxStreamingEvent, type AxStreamingFieldProcessorProcess, AxStringUtil, AxSynth, type AxSynthExample, type AxSynthOptions, type AxSynthResult, AxTestPrompt, type AxThoughtBlockItem, AxTokenLimitError, type AxTokenUsage, type AxTrace, AxTraceLogger, type AxTraceLoggerOptions, type AxTunable, type AxTypedExample, type AxUsable, type AxWorkerRuntimeConfig, agent, ai, ax, axAIAnthropicDefaultConfig, axAIAnthropicVertexDefaultConfig, axAIAzureOpenAIBestConfig, axAIAzureOpenAICreativeConfig, axAIAzureOpenAIDefaultConfig, axAIAzureOpenAIFastConfig, axAICohereCreativeConfig, axAICohereDefaultConfig, axAIDeepSeekCodeConfig, axAIDeepSeekDefaultConfig, axAIGoogleGeminiDefaultConfig, axAIGoogleGeminiDefaultCreativeConfig, axAIGrokBestConfig, axAIGrokDefaultConfig, axAIHuggingFaceCreativeConfig, axAIHuggingFaceDefaultConfig, axAIMistralBestConfig, axAIMistralDefaultConfig, axAIOllamaDefaultConfig, axAIOllamaDefaultCreativeConfig, axAIOpenAIBestConfig, axAIOpenAICreativeConfig, axAIOpenAIDefaultConfig, axAIOpenAIFastConfig, axAIOpenAIResponsesBestConfig, axAIOpenAIResponsesCreativeConfig, axAIOpenAIResponsesDefaultConfig, axAIOpenRouterDefaultConfig, axAIRekaBestConfig, axAIRekaCreativeConfig, axAIRekaDefaultConfig, axAIRekaFastConfig, axAITogetherDefaultConfig, axAIWebLLMCreativeConfig, axAIWebLLMDefaultConfig, axAnalyzeChatPromptRequirements, axAnalyzeRequestRequirements, axBaseAIDefaultConfig, axBaseAIDefaultCreativeConfig, axBuildActorDefinition, axBuildResponderDefinition, axCheckMetricsHealth, axCreateDefaultColorLogger, axCreateDefaultOptimizerColorLogger, axCreateDefaultOptimizerTextLogger, axCreateDefaultTextLogger, axCreateFlowColorLogger, axCreateFlowTextLogger, axCreateJSRuntime, axDefaultFlowLogger, axDefaultMetricsConfig, axDefaultOptimizerLogger, axDefaultOptimizerMetricsConfig, axGetCompatibilityReport, axGetFormatCompatibility, axGetMetricsConfig, axGetOptimizerMetricsConfig, axGetProvidersWithMediaSupport, axGlobals, axModelInfoAnthropic, axModelInfoCohere, axModelInfoDeepSeek, axModelInfoGoogleGemini, axModelInfoGrok, axModelInfoGroq, axModelInfoHuggingFace, axModelInfoMistral, axModelInfoOpenAI, axModelInfoOpenAIResponses, axModelInfoReka, axModelInfoTogether, axModelInfoWebLLM, axProcessContentForProvider, axRAG, axScoreProvidersForRequest, axSelectOptimalProvider, axSpanAttributes, axSpanEvents, axUpdateMetricsConfig, axUpdateOptimizerMetricsConfig, axValidateChatRequestMessage, axValidateChatResponseResult, axValidateProviderCapabilities, axWorkerRuntime, f, flow, s };
11253
+ export { AxACE, type AxACEBullet, type AxACECuratorOperation, type AxACECuratorOperationType, type AxACECuratorOutput, type AxACEFeedbackEvent, type AxACEGeneratorOutput, type AxACEOptimizationArtifact, AxACEOptimizedProgram, type AxACEOptions, type AxACEPlaybook, type AxACEReflectionOutput, type AxACEResult, AxAI, AxAIAnthropic, type AxAIAnthropicArgs, type AxAIAnthropicChatError, type AxAIAnthropicChatRequest, type AxAIAnthropicChatRequestCacheParam, type AxAIAnthropicChatResponse, type AxAIAnthropicChatResponseDelta, type AxAIAnthropicConfig, type AxAIAnthropicContentBlockDeltaEvent, type AxAIAnthropicContentBlockStartEvent, type AxAIAnthropicContentBlockStopEvent, type AxAIAnthropicEffortLevel, type AxAIAnthropicEffortLevelMapping, type AxAIAnthropicErrorEvent, type AxAIAnthropicFunctionTool, type AxAIAnthropicMessageDeltaEvent, type AxAIAnthropicMessageStartEvent, type AxAIAnthropicMessageStopEvent, AxAIAnthropicModel, type AxAIAnthropicOutputConfig, type AxAIAnthropicPingEvent, type AxAIAnthropicRequestTool, type AxAIAnthropicThinkingConfig, type AxAIAnthropicThinkingTokenBudgetLevels, type AxAIAnthropicThinkingWire, AxAIAnthropicVertexModel, type AxAIAnthropicWebSearchTool, type AxAIArgs, AxAIAzureOpenAI, type AxAIAzureOpenAIArgs, type AxAIAzureOpenAIConfig, AxAICohere, type AxAICohereArgs, type AxAICohereChatRequest, type AxAICohereChatRequestToolResults, type AxAICohereChatResponse, type AxAICohereChatResponseDelta, type AxAICohereChatResponseToolCalls, type AxAICohereConfig, AxAICohereEmbedModel, type AxAICohereEmbedRequest, type AxAICohereEmbedResponse, AxAICohereModel, AxAIDeepSeek, type AxAIDeepSeekArgs, AxAIDeepSeekModel, type AxAIEmbedModels, type AxAIFeatures, AxAIGoogleGemini, type AxAIGoogleGeminiArgs, type AxAIGoogleGeminiBatchEmbedRequest, type AxAIGoogleGeminiBatchEmbedResponse, type AxAIGoogleGeminiCacheCreateRequest, type AxAIGoogleGeminiCacheResponse, type AxAIGoogleGeminiCacheUpdateRequest, type AxAIGoogleGeminiChatRequest, type AxAIGoogleGeminiChatResponse, type AxAIGoogleGeminiChatResponseDelta, type AxAIGoogleGeminiConfig, type AxAIGoogleGeminiContent, type AxAIGoogleGeminiContentPart, AxAIGoogleGeminiEmbedModel, AxAIGoogleGeminiEmbedTypes, type AxAIGoogleGeminiGenerationConfig, AxAIGoogleGeminiModel, type AxAIGoogleGeminiOptionsTools, type AxAIGoogleGeminiRetrievalConfig, AxAIGoogleGeminiSafetyCategory, type AxAIGoogleGeminiSafetySettings, AxAIGoogleGeminiSafetyThreshold, type AxAIGoogleGeminiThinkingConfig, type AxAIGoogleGeminiThinkingLevel, type AxAIGoogleGeminiThinkingLevelMapping, type AxAIGoogleGeminiThinkingTokenBudgetLevels, type AxAIGoogleGeminiTool, type AxAIGoogleGeminiToolConfig, type AxAIGoogleGeminiToolFunctionDeclaration, type AxAIGoogleGeminiToolGoogleMaps, type AxAIGoogleGeminiToolGoogleSearchRetrieval, type AxAIGoogleVertexBatchEmbedRequest, type AxAIGoogleVertexBatchEmbedResponse, AxAIGrok, type AxAIGrokArgs, type AxAIGrokChatRequest, AxAIGrokEmbedModels, AxAIGrokModel, type AxAIGrokOptionsTools, type AxAIGrokSearchSource, AxAIGroq, type AxAIGroqArgs, AxAIGroqModel, AxAIHuggingFace, type AxAIHuggingFaceArgs, type AxAIHuggingFaceConfig, AxAIHuggingFaceModel, type AxAIHuggingFaceRequest, type AxAIHuggingFaceResponse, type AxAIInputModelList, type AxAIMemory, type AxAIMetricsInstruments, AxAIMistral, type AxAIMistralArgs, type AxAIMistralChatRequest, AxAIMistralEmbedModels, AxAIMistralModel, type AxAIModelList, type AxAIModelListBase, type AxAIModels, AxAIOllama, type AxAIOllamaAIConfig, type AxAIOllamaArgs, AxAIOpenAI, type AxAIOpenAIAnnotation, type AxAIOpenAIArgs, AxAIOpenAIBase, type AxAIOpenAIBaseArgs, type AxAIOpenAIChatRequest, type AxAIOpenAIChatResponse, type AxAIOpenAIChatResponseDelta, type AxAIOpenAIConfig, AxAIOpenAIEmbedModel, type AxAIOpenAIEmbedRequest, type AxAIOpenAIEmbedResponse, type AxAIOpenAILogprob, AxAIOpenAIModel, type AxAIOpenAIResponseDelta, AxAIOpenAIResponses, type AxAIOpenAIResponsesArgs, AxAIOpenAIResponsesBase, type AxAIOpenAIResponsesCodeInterpreterToolCall, type AxAIOpenAIResponsesComputerToolCall, type AxAIOpenAIResponsesConfig, type AxAIOpenAIResponsesContentPartAddedEvent, type AxAIOpenAIResponsesContentPartDoneEvent, type AxAIOpenAIResponsesDefineFunctionTool, type AxAIOpenAIResponsesErrorEvent, type AxAIOpenAIResponsesFileSearchCallCompletedEvent, type AxAIOpenAIResponsesFileSearchCallInProgressEvent, type AxAIOpenAIResponsesFileSearchCallSearchingEvent, type AxAIOpenAIResponsesFileSearchToolCall, type AxAIOpenAIResponsesFunctionCallArgumentsDeltaEvent, type AxAIOpenAIResponsesFunctionCallArgumentsDoneEvent, type AxAIOpenAIResponsesFunctionCallItem, type AxAIOpenAIResponsesImageGenerationCallCompletedEvent, type AxAIOpenAIResponsesImageGenerationCallGeneratingEvent, type AxAIOpenAIResponsesImageGenerationCallInProgressEvent, type AxAIOpenAIResponsesImageGenerationCallPartialImageEvent, type AxAIOpenAIResponsesImageGenerationToolCall, AxAIOpenAIResponsesImpl, type AxAIOpenAIResponsesInputAudioContentPart, type AxAIOpenAIResponsesInputContentPart, type AxAIOpenAIResponsesInputFunctionCallItem, type AxAIOpenAIResponsesInputFunctionCallOutputItem, type AxAIOpenAIResponsesInputImageUrlContentPart, type AxAIOpenAIResponsesInputItem, type AxAIOpenAIResponsesInputMessageItem, type AxAIOpenAIResponsesInputTextContentPart, type AxAIOpenAIResponsesLocalShellToolCall, type AxAIOpenAIResponsesMCPCallArgumentsDeltaEvent, type AxAIOpenAIResponsesMCPCallArgumentsDoneEvent, type AxAIOpenAIResponsesMCPCallCompletedEvent, type AxAIOpenAIResponsesMCPCallFailedEvent, type AxAIOpenAIResponsesMCPCallInProgressEvent, type AxAIOpenAIResponsesMCPListToolsCompletedEvent, type AxAIOpenAIResponsesMCPListToolsFailedEvent, type AxAIOpenAIResponsesMCPListToolsInProgressEvent, type AxAIOpenAIResponsesMCPToolCall, AxAIOpenAIResponsesModel, type AxAIOpenAIResponsesOutputItem, type AxAIOpenAIResponsesOutputItemAddedEvent, type AxAIOpenAIResponsesOutputItemDoneEvent, type AxAIOpenAIResponsesOutputMessageItem, type AxAIOpenAIResponsesOutputRefusalContentPart, type AxAIOpenAIResponsesOutputTextAnnotationAddedEvent, type AxAIOpenAIResponsesOutputTextContentPart, type AxAIOpenAIResponsesOutputTextDeltaEvent, type AxAIOpenAIResponsesOutputTextDoneEvent, type AxAIOpenAIResponsesReasoningDeltaEvent, type AxAIOpenAIResponsesReasoningDoneEvent, type AxAIOpenAIResponsesReasoningItem, type AxAIOpenAIResponsesReasoningSummaryDeltaEvent, type AxAIOpenAIResponsesReasoningSummaryDoneEvent, type AxAIOpenAIResponsesReasoningSummaryPart, type AxAIOpenAIResponsesReasoningSummaryPartAddedEvent, type AxAIOpenAIResponsesReasoningSummaryPartDoneEvent, type AxAIOpenAIResponsesReasoningSummaryTextDeltaEvent, type AxAIOpenAIResponsesReasoningSummaryTextDoneEvent, type AxAIOpenAIResponsesRefusalDeltaEvent, type AxAIOpenAIResponsesRefusalDoneEvent, type AxAIOpenAIResponsesRequest, type AxAIOpenAIResponsesResponse, type AxAIOpenAIResponsesResponseCompletedEvent, type AxAIOpenAIResponsesResponseCreatedEvent, type AxAIOpenAIResponsesResponseDelta, type AxAIOpenAIResponsesResponseFailedEvent, type AxAIOpenAIResponsesResponseInProgressEvent, type AxAIOpenAIResponsesResponseIncompleteEvent, type AxAIOpenAIResponsesResponseQueuedEvent, type AxAIOpenAIResponsesStreamEvent, type AxAIOpenAIResponsesStreamEventBase, type AxAIOpenAIResponsesToolCall, type AxAIOpenAIResponsesToolCallBase, type AxAIOpenAIResponsesToolChoice, type AxAIOpenAIResponsesToolDefinition, type AxAIOpenAIResponsesWebSearchCallCompletedEvent, type AxAIOpenAIResponsesWebSearchCallInProgressEvent, type AxAIOpenAIResponsesWebSearchCallSearchingEvent, type AxAIOpenAIResponsesWebSearchToolCall, type AxAIOpenAIUrlCitation, type AxAIOpenAIUsage, AxAIOpenRouter, type AxAIOpenRouterArgs, AxAIRefusalError, AxAIReka, type AxAIRekaArgs, type AxAIRekaChatRequest, type AxAIRekaChatResponse, type AxAIRekaChatResponseDelta, type AxAIRekaConfig, AxAIRekaModel, type AxAIRekaUsage, type AxAIService, AxAIServiceAbortedError, type AxAIServiceActionOptions, AxAIServiceAuthenticationError, AxAIServiceError, type AxAIServiceImpl, type AxAIServiceMetrics, type AxAIServiceModelType, AxAIServiceNetworkError, type AxAIServiceOptions, AxAIServiceResponseError, AxAIServiceStatusError, AxAIServiceStreamTerminatedError, AxAIServiceTimeoutError, AxAITogether, type AxAITogetherArgs, type AxAITogetherChatModel, AxAITogetherModel, AxAIWebLLM, type AxAIWebLLMArgs, type AxAIWebLLMChatRequest, type AxAIWebLLMChatResponse, type AxAIWebLLMChatResponseDelta, type AxAIWebLLMConfig, type AxAIWebLLMEmbedModel, type AxAIWebLLMEmbedRequest, type AxAIWebLLMEmbedResponse, AxAIWebLLMModel, type AxAPI, type AxAPIConfig, AxAgent, type AxAgentCompletionProtocol, type AxAgentConfig, type AxAgentDemos, type AxAgentFunction, type AxAgentFunctionExample, type AxAgentFunctionGroup, type AxAgentInputUpdateCallback, type AxAgentOptions, type AxAgentRecursionOptions, type AxAgentTestCompletionPayload, type AxAgentTestResult, type AxAgentic, AxApacheTika, type AxApacheTikaArgs, type AxApacheTikaConvertOptions, type AxAssertion, AxAssertionError, AxBalancer, type AxBalancerOptions, AxBaseAI, type AxBaseAIArgs, AxBaseOptimizer, AxBootstrapFewShot, type AxBootstrapOptimizerOptions, type AxChatRequest, type AxChatResponse, type AxChatResponseFunctionCall, type AxChatResponseResult, type AxCheckpoint, type AxCheckpointLoadFn, type AxCheckpointSaveFn, type AxCitation, type AxCodeInterpreter, type AxCodeRuntime, type AxCodeSession, type AxCompileOptions, AxContentProcessingError, type AxContentProcessingServices, type AxContextCacheInfo, type AxContextCacheOperation, type AxContextCacheOptions, type AxContextCacheRegistry, type AxContextCacheRegistryEntry, type AxContextFieldInput, type AxContextPolicyConfig, type AxContextPolicyPreset, type AxCostTracker, type AxCostTrackerOptions, AxDB, type AxDBArgs, AxDBBase, type AxDBBaseArgs, type AxDBBaseOpOptions, AxDBCloudflare, type AxDBCloudflareArgs, type AxDBCloudflareOpOptions, type AxDBLoaderOptions, AxDBManager, type AxDBManagerArgs, type AxDBMatch, AxDBMemory, type AxDBMemoryArgs, type AxDBMemoryOpOptions, AxDBPinecone, type AxDBPineconeArgs, type AxDBPineconeOpOptions, type AxDBQueryRequest, type AxDBQueryResponse, type AxDBQueryService, type AxDBService, type AxDBState, type AxDBUpsertRequest, type AxDBUpsertResponse, AxDBWeaviate, type AxDBWeaviateArgs, type AxDBWeaviateOpOptions, type AxDataRow, AxDefaultCostTracker, AxDefaultResultReranker, type AxDockerContainer, AxDockerSession, type AxEmbedRequest, type AxEmbedResponse, AxEmbeddingAdapter, type AxErrorCategory, AxEvalUtil, type AxEvaluateArgs, type AxExample$1 as AxExample, type AxExamples, type AxField, type AxFieldProcessor, type AxFieldProcessorProcess, type AxFieldTemplateFn, type AxFieldType, type AxFieldValue, AxFlow, type AxFlowAutoParallelConfig, type AxFlowBranchContext, type AxFlowBranchEvaluationData, type AxFlowCompleteData, AxFlowDependencyAnalyzer, type AxFlowDynamicContext, type AxFlowErrorData, AxFlowExecutionPlanner, type AxFlowExecutionStep, type AxFlowLogData, type AxFlowLoggerData, type AxFlowLoggerFunction, type AxFlowNodeDefinition, type AxFlowParallelBranch, type AxFlowParallelGroup, type AxFlowParallelGroupCompleteData, type AxFlowParallelGroupStartData, type AxFlowStartData, type AxFlowState, type AxFlowStepCompleteData, type AxFlowStepFunction, type AxFlowStepStartData, type AxFlowSubContext, AxFlowSubContextImpl, type AxFlowTypedParallelBranch, type AxFlowTypedSubContext, AxFlowTypedSubContextImpl, type AxFlowable, type AxFluentFieldInfo, AxFluentFieldType, type AxForwardable, type AxFunction, type AxFunctionCallRecord, AxFunctionError, type AxFunctionHandler, type AxFunctionJSONSchema, AxFunctionProcessor, type AxFunctionResult, type AxFunctionResultFormatter, AxGEPA, type AxGEPAAdapter, type AxGEPAEvaluationBatch, type AxGEPAOptimizationReport, AxGen, type AxGenDeltaOut, type AxGenIn, type AxGenInput, type AxGenMetricsInstruments, type AxGenOut, type AxGenOutput, type AxGenStreamingOut, AxGenerateError, type AxGenerateErrorDetails, type AxGenerateResult, AxHFDataLoader, type AxIField, type AxInputFunctionType, AxInstanceRegistry, type AxInternalChatRequest, type AxInternalEmbedRequest, AxJSRuntime, type AxJSRuntimeOutputMode, AxJSRuntimePermission, AxJudge, type AxJudgeMode, type AxJudgeOptions, type AxJudgeResult, type AxJudgeRubric, AxLLMRequestTypeValues, AxLearn, type AxLearnArtifact, type AxLearnCheckpointMode, type AxLearnCheckpointState, type AxLearnContinuousOptions, type AxLearnMode, type AxLearnOptimizeOptions, type AxLearnOptions, type AxLearnPlaybook, type AxLearnPlaybookOptions, type AxLearnPlaybookSummary, type AxLearnProgress, type AxLearnResult, type AxLearnUpdateFeedback, type AxLearnUpdateInput, type AxLearnUpdateOptions, type AxLoggerData, type AxLoggerFunction, type AxMCPBlobResourceContents, AxMCPClient, type AxMCPEmbeddedResource, type AxMCPFunctionDescription, AxMCPHTTPSSETransport, type AxMCPImageContent, type AxMCPInitializeParams, type AxMCPInitializeResult, type AxMCPJSONRPCErrorResponse, type AxMCPJSONRPCNotification, type AxMCPJSONRPCRequest, type AxMCPJSONRPCResponse, type AxMCPJSONRPCSuccessResponse, type AxMCPOAuthOptions, type AxMCPPrompt, type AxMCPPromptArgument, type AxMCPPromptGetResult, type AxMCPPromptMessage, type AxMCPPromptsListResult, type AxMCPResource, type AxMCPResourceReadResult, type AxMCPResourceTemplate, type AxMCPResourceTemplatesListResult, type AxMCPResourcesListResult, type AxMCPStreamableHTTPTransportOptions, AxMCPStreambleHTTPTransport, type AxMCPTextContent, type AxMCPTextResourceContents, type AxMCPToolsListResult, type AxMCPTransport, AxMediaNotSupportedError, AxMemory, type AxMemoryData, type AxMemoryMessageValue, type AxMessage, type AxMetricFn, type AxMetricFnArgs, type AxMetricsConfig, AxMiPRO, type AxMiPROOptimizerOptions, type AxMiPROResult, AxMockAIService, type AxMockAIServiceConfig, type AxModelConfig, type AxModelInfo, type AxModelInfoWithProvider, type AxModelUsage, type AxMultiMetricFn, type AxMultiProviderConfig, AxMultiServiceRouter, type AxNamedProgramInstance, type AxOptimizationCheckpoint, type AxOptimizationProgress, type AxOptimizationStats, type AxOptimizedProgram, AxOptimizedProgramImpl, type AxOptimizer, type AxOptimizerArgs, type AxOptimizerLoggerData, type AxOptimizerLoggerFunction, type AxOptimizerMetricsConfig, type AxOptimizerMetricsInstruments, type AxOptimizerResult, type AxParetoResult, type AxPreparedChatRequest, AxProgram, type AxProgramDemos, type AxProgramExamples, type AxProgramForwardOptions, type AxProgramForwardOptionsWithModels, type AxProgramOptions, type AxProgramStreamingForwardOptions, type AxProgramStreamingForwardOptionsWithModels, type AxProgramTrace, type AxProgramUsage, type AxProgrammable, AxPromptTemplate, type AxPromptTemplateOptions, AxProviderRouter, type AxRLMConfig, type AxRateLimiterFunction, AxRateLimiterTokenUsage, type AxRateLimiterTokenUsageOptions, type AxRerankerIn, type AxRerankerOut, type AxResponseHandlerArgs, type AxResultPickerFunction, type AxResultPickerFunctionFieldResults, type AxResultPickerFunctionFunctionResults, type AxRewriteIn, type AxRewriteOut, type AxRoutingResult, type AxSamplePickerOptions, type AxSelfTuningConfig, type AxSetExamplesOptions, AxSignature, AxSignatureBuilder, type AxSignatureConfig, AxSimpleClassifier, AxSimpleClassifierClass, type AxSimpleClassifierForwardOptions, AxSpanKindValues, type AxStepContext, AxStepContextImpl, type AxStepHooks, type AxStepUsage, AxStopFunctionCallException, type AxStorage, type AxStorageQuery, type AxStreamingAssertion, type AxStreamingEvent, type AxStreamingFieldProcessorProcess, AxStringUtil, AxSynth, type AxSynthExample, type AxSynthOptions, type AxSynthResult, AxTestPrompt, type AxThoughtBlockItem, AxTokenLimitError, type AxTokenUsage, type AxTrace, AxTraceLogger, type AxTraceLoggerOptions, type AxTunable, type AxTypedExample, type AxUsable, type AxWorkerRuntimeConfig, agent, ai, ax, axAIAnthropicDefaultConfig, axAIAnthropicVertexDefaultConfig, axAIAzureOpenAIBestConfig, axAIAzureOpenAICreativeConfig, axAIAzureOpenAIDefaultConfig, axAIAzureOpenAIFastConfig, axAICohereCreativeConfig, axAICohereDefaultConfig, axAIDeepSeekCodeConfig, axAIDeepSeekDefaultConfig, axAIGoogleGeminiDefaultConfig, axAIGoogleGeminiDefaultCreativeConfig, axAIGrokBestConfig, axAIGrokDefaultConfig, axAIHuggingFaceCreativeConfig, axAIHuggingFaceDefaultConfig, axAIMistralBestConfig, axAIMistralDefaultConfig, axAIOllamaDefaultConfig, axAIOllamaDefaultCreativeConfig, axAIOpenAIBestConfig, axAIOpenAICreativeConfig, axAIOpenAIDefaultConfig, axAIOpenAIFastConfig, axAIOpenAIResponsesBestConfig, axAIOpenAIResponsesCreativeConfig, axAIOpenAIResponsesDefaultConfig, axAIOpenRouterDefaultConfig, axAIRekaBestConfig, axAIRekaCreativeConfig, axAIRekaDefaultConfig, axAIRekaFastConfig, axAITogetherDefaultConfig, axAIWebLLMCreativeConfig, axAIWebLLMDefaultConfig, axAnalyzeChatPromptRequirements, axAnalyzeRequestRequirements, axBaseAIDefaultConfig, axBaseAIDefaultCreativeConfig, axBuildActorDefinition, axBuildResponderDefinition, axCheckMetricsHealth, axCreateDefaultColorLogger, axCreateDefaultOptimizerColorLogger, axCreateDefaultOptimizerTextLogger, axCreateDefaultTextLogger, axCreateFlowColorLogger, axCreateFlowTextLogger, axCreateJSRuntime, axDefaultFlowLogger, axDefaultMetricsConfig, axDefaultOptimizerLogger, axDefaultOptimizerMetricsConfig, axGetCompatibilityReport, axGetFormatCompatibility, axGetMetricsConfig, axGetOptimizerMetricsConfig, axGetProvidersWithMediaSupport, axGlobals, axModelInfoAnthropic, axModelInfoCohere, axModelInfoDeepSeek, axModelInfoGoogleGemini, axModelInfoGrok, axModelInfoGroq, axModelInfoHuggingFace, axModelInfoMistral, axModelInfoOpenAI, axModelInfoOpenAIResponses, axModelInfoReka, axModelInfoTogether, axModelInfoWebLLM, axProcessContentForProvider, axRAG, axScoreProvidersForRequest, axSelectOptimalProvider, axSpanAttributes, axSpanEvents, axUpdateMetricsConfig, axUpdateOptimizerMetricsConfig, axValidateChatRequestMessage, axValidateChatResponseResult, axValidateProviderCapabilities, axWorkerRuntime, f, flow, fn, s };