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

axBuildDistillerDefinition

TypeScript
function axBuildDistillerDefinition(
   baseDefinition: undefined | string, 
   contextFields: readonly AxIField[], 
   options: Readonly<{
  agentFunctions?: ReadonlyArray<{
     alwaysInclude?: boolean;
     description?: string;
     name: string;
     namespace: string;
     parameters?: AxFunctionJSONSchema;
     returns?: AxFunctionJSONSchema;
  }>;
  availableModules?: ReadonlyArray<{
     namespace: string;
     selectionCriteria?: string;
  }>;
  contextMapText?: string;
  discoveryMode?: boolean;
  formatCallable?: AxCodeRuntime["formatCallable"];
  hasCompressedActionReplay?: boolean;
  hasInspectRuntime?: boolean;
  hasLiveRuntimeState?: boolean;
  isJavaScriptRuntime?: boolean;
  memoriesMode?: boolean;
  memoryUsageMode?: boolean;
  primitiveOverrides?: ReadonlyMap<string, readonly string[]>;
  promptLevel?: "default" | "detailed";
  runtimeCodeFenceLanguage?: string;
  runtimeCodeFieldTitle?: string;
  runtimeLanguageName?: string;
  runtimeUsageInstructions?: string;
  skillsCatalog?: ReadonlyArray<{
     description?: string;
     id: string;
     name: string;
  }>;
  skillsMode?: boolean;
  skillUsageMode?: boolean;
  templateOverride?: string;
  usageTrackingMode?: boolean;
}>): string;

Defined in: https://github.com/ax-llm/ax/blob/3306475085414d36aee4411ad2466e08e53bef8a/src/ax/agent/rlm.ts#L518

Builds the context-understanding actor system prompt (the distiller). The distiller is the pipeline’s reconnaissance phase: it explores long-context inputs AND the executor’s capability surface (function schemas, module catalog, skills index, discovery) so its evidence is shaped to what the executor’s tools will actually consume. It cannot execute tools — its callables are throwing stubs.

Parameters

ParameterType
baseDefinitionundefined | string
contextFieldsreadonly AxIField[]
optionsReadonly<{ agentFunctions?: ReadonlyArray<{ alwaysInclude?: boolean; description?: string; name: string; namespace: string; parameters?: AxFunctionJSONSchema; returns?: AxFunctionJSONSchema; }>; availableModules?: ReadonlyArray<{ namespace: string; selectionCriteria?: string; }>; contextMapText?: string; discoveryMode?: boolean; formatCallable?: AxCodeRuntime["formatCallable"]; hasCompressedActionReplay?: boolean; hasInspectRuntime?: boolean; hasLiveRuntimeState?: boolean; isJavaScriptRuntime?: boolean; memoriesMode?: boolean; memoryUsageMode?: boolean; primitiveOverrides?: ReadonlyMap<string, readonly string[]>; promptLevel?: "default" | "detailed"; runtimeCodeFenceLanguage?: string; runtimeCodeFieldTitle?: string; runtimeLanguageName?: string; runtimeUsageInstructions?: string; skillsCatalog?: ReadonlyArray<{ description?: string; id: string; name: string; }>; skillsMode?: boolean; skillUsageMode?: boolean; templateOverride?: string; usageTrackingMode?: boolean; }>

Returns

string

Docs