@ax-llm/ax 19.0.25 → 19.0.26

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ax-llm/ax",
3
- "version": "19.0.25",
3
+ "version": "19.0.26",
4
4
  "type": "module",
5
5
  "description": "The best library to work with LLMs",
6
6
  "repository": {
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: ax-agent-optimize
3
3
  description: This skill helps an LLM generate correct AxAgent tuning and evaluation code using @ax-llm/ax. Use when the user asks about agent.optimize(...), judgeOptions, eval datasets, optimization targets, saved optimizedProgram artifacts, or recursive optimization guidance.
4
- version: "19.0.25"
4
+ version: "19.0.26"
5
5
  ---
6
6
 
7
7
  # AxAgent Optimize Codegen Rules (@ax-llm/ax)
@@ -307,10 +307,9 @@ Decision rules:
307
307
 
308
308
  - Recursive-slot artifacts require an agent configured for recursive advanced mode.
309
309
  - Keep `mode: 'advanced'` top-level; child recursion behavior still follows `recursionOptions`.
310
- - When recursive behavior matters, tune against the same `maxDepth`, `promptLevel`, and tool/discovery structure you expect in production.
310
+ - When recursive behavior matters, tune against the same `maxDepth` and tool/discovery structure you expect in production.
311
311
  - Use recursive traces and recursive stats when the user wants to diagnose where token or delegation cost is coming from.
312
312
  - For recursion-efficiency tuning, prefer a deterministic metric unless the user specifically needs a qualitative LLM review of decomposition quality.
313
- - Prefer `recursionOptions.promptLevel: 'detailed'` in examples when child agents need to respect strict JS/runtime policy.
314
313
  - Tell the actor that recursive children only see passed context, not parent globals or prior tool results.
315
314
  - For synthesis-style recursive tasks, specify the desired delegation pattern explicitly, for example "use at most one focused delegated child analysis after narrowing the tool output in JS."
316
315
  - Penalize over-decomposition directly in the metric or judge prompt.
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: ax-agent
3
- description: This skill helps an LLM generate correct AxAgent code using @ax-llm/ax. Use when the user asks about agent(), child agents, namespaced functions, discovery mode, shared fields, llmQuery(...), RLM code execution, promptLevel, recursionOptions, or agent runtime behavior. For tuning and eval with agent.optimize(...), use ax-agent-optimize.
4
- version: "19.0.25"
3
+ description: This skill helps an LLM generate correct AxAgent code using @ax-llm/ax. Use when the user asks about agent(), child agents, namespaced functions, discovery mode, shared fields, llmQuery(...), RLM code execution, recursionOptions, or agent runtime behavior. For tuning and eval with agent.optimize(...), use ax-agent-optimize.
4
+ version: "19.0.26"
5
5
  ---
6
6
 
7
7
  # AxAgent Codegen Rules (@ax-llm/ax)
@@ -24,9 +24,9 @@ Your job is not just to write valid code. Your job is to choose the smallest cor
24
24
  - Assume the child-agent module is `agents` unless `agentIdentity.namespace` is set.
25
25
  - If `functions.discovery` is `true`, discover callables from modules before using them.
26
26
  - In stdout-mode RLM, use one observable `console.log(...)` step per non-final actor turn.
27
+ - Prefer `promptLevel: 'default'` for normal use; use `promptLevel: 'detailed'` when you want extra anti-pattern examples and tighter teaching scaffolding in the actor prompt.
27
28
  - For long RLM tasks, prefer `contextPolicy: { preset: 'adaptive' }` so older successful turns collapse into checkpoint summaries while live runtime state stays visible.
28
29
  - Prefer `contextPolicy: { preset: 'checkpointed' }` when you want debugging-friendly full replay first and only want summaries after prompt pressure becomes real.
29
- - Default top-level `promptLevel` to `'detailed'` and opt down to `'basic'` only when the user wants a shorter root actor prompt.
30
30
  - Prefer `actorModelPolicy` when the actor may need to upgrade under whole-prompt pressure or repeated error turns without also upgrading the responder.
31
31
  - Use `actorTurnCallback` when the user needs per-turn observability into generated code, raw runtime result, formatted output, or provider thoughts.
32
32
 
@@ -45,9 +45,6 @@ Map user intent to agent shape before writing code:
45
45
  Choose options based on user needs, not feature completeness:
46
46
 
47
47
  - Prefer `mode: 'simple'` unless recursive child agents materially improve the task.
48
- - Prefer `promptLevel: 'detailed'` when reliability matters more than prompt size.
49
- - Prefer `promptLevel: 'basic'` when the user wants a leaner prompt and the workflow is already well constrained.
50
- - Prefer `recursionOptions.promptLevel: 'basic'` for narrow delegated children unless the child is also discovery-heavy or schema-uncertain.
51
48
  - Prefer `maxSubAgentCalls` only when advanced recursion is enabled or the user needs explicit delegation limits.
52
49
  - Prefer `contextPolicy.preset: 'adaptive'` for long RLM tasks, `checkpointed` when you want "full first, summarize later", `full` for debugging, and `lean` only under real token pressure.
53
50
 
@@ -89,19 +86,16 @@ Important:
89
86
  Treat these knobs as a bundle:
90
87
 
91
88
  - `contextPolicy.preset` decides how much raw history the actor keeps seeing.
92
- - Top-level `promptLevel` decides how prescriptive the root actor prompt is.
93
- - `recursionOptions.promptLevel` overrides prompt detail for recursive `llmQuery(...)` child agents.
89
+ - `promptLevel` decides whether the actor gets just the standard rules or those rules plus detailed anti-pattern examples.
94
90
  - `actorModelPolicy` decides when the actor switches to an override model without changing the responder.
95
91
  - Model size decides how well the actor can recover from compressed context and terse guidance.
96
92
 
97
93
  Recommended combinations:
98
94
 
99
- - Short task, debugging, or weaker/cheaper model: `preset: 'full'` with `promptLevel: 'detailed'`.
100
- - Long multi-turn task, general default, medium-to-strong model: `preset: 'adaptive'` with `promptLevel: 'detailed'`.
101
- - Long task where you want raw replay until the log is actually large: `preset: 'checkpointed'` with `promptLevel: 'detailed'`.
102
- - Long task where the actor keeps making avoidable exploration mistakes: `preset: 'adaptive'` with `promptLevel: 'detailed'`.
103
- - Very long task under token pressure, stronger model only: `preset: 'lean'` with `promptLevel: 'basic'`.
104
- - Discovery-heavy or schema-uncertain work with a capable model: `preset: 'adaptive'` with `promptLevel: 'detailed'`.
95
+ - Short task, debugging, or weaker/cheaper model: `preset: 'full'`.
96
+ - Long multi-turn task, general default, medium-to-strong model: `preset: 'adaptive'`.
97
+ - Long task where you want raw replay until the log is actually large: `preset: 'checkpointed'`.
98
+ - Very long task under token pressure, stronger model only: `preset: 'lean'`.
105
99
  - Discovery-heavy work with a cheaper default actor: keep the responder cheap and add `actorModelPolicy` so only the actor upgrades under pressure.
106
100
 
107
101
  Practical rule:
@@ -111,27 +105,8 @@ Practical rule:
111
105
  - `adaptive` is the default middle ground for real agent work.
112
106
  - `checkpointed` is the conservative middle ground when you want full replay first and summarization only after a threshold.
113
107
  - `lean` should be reserved for models that can reason well from runtime state plus summaries instead of exact old code/output.
114
- - `detailed` is not automatically "better"; it is more controlling. Use it when the actor needs tighter exploration rhythm, not just because the task is hard.
115
108
  - `actorModelPolicy` is usually better than globally upgrading the whole agent when the bottleneck is actor exploration rather than responder synthesis.
116
109
 
117
- Prompt-level guidance:
118
-
119
- - `basic`: opt-down mode. Gives the actor concise exploration guidance and works best when the model is already reliable.
120
- - `detailed`: adds explicit exploration recipes, truncation recovery guidance, error-avoidance tips, and stronger one-step-per-turn discipline.
121
-
122
- Use `promptLevel: 'detailed'` when:
123
-
124
- - the actor is probing unfamiliar or messy data shapes
125
- - discovery mode is central to the task
126
- - the model keeps over-logging, combining too many steps, or guessing field/function names
127
- - you are optimizing for reliability over prompt compactness
128
-
129
- Use `promptLevel: 'basic'` when:
130
-
131
- - the model is already following the one-step rhythm well
132
- - you want a shorter actor prompt
133
- - the task is straightforward and the runtime/state carries most of the complexity
134
-
135
110
  ## Critical Rules
136
111
 
137
112
  - Use `agent(...)` factory syntax for new code.
@@ -701,9 +676,7 @@ const supportAgent = agent('query:string -> answer:string', {
701
676
  Use these top-level controls consistently:
702
677
 
703
678
  - `mode`: controls whether `llmQuery(...)` stays simple or delegates to recursive child agents in advanced mode
704
- - `promptLevel`: controls the root actor prompt guidance
705
679
  - `recursionOptions.maxDepth`: limits recursive `llmQuery(...)` depth
706
- - `recursionOptions.promptLevel`: overrides prompt guidance for recursive `llmQuery(...)` child agents
707
680
  - `maxSubAgentCalls`: shared delegated-call budget across the whole run, including recursive children
708
681
  - `actorOptions`: actor-only forward options such as `description`, `model`, `modelConfig`, `thinkingTokenBudget`, and `showThoughts`
709
682
  - `actorModelPolicy`: actor-only model override rules based on full rendered prompt size, consecutive error turns, or discovery fetches from listed namespaces
@@ -717,10 +690,8 @@ const researchAgent = agent('query:string -> answer:string', {
717
690
  contextFields: ['query'],
718
691
  runtime,
719
692
  mode: 'advanced',
720
- promptLevel: 'detailed',
721
693
  recursionOptions: {
722
694
  maxDepth: 2,
723
- promptLevel: 'basic',
724
695
  },
725
696
  contextPolicy: {
726
697
  preset: 'checkpointed',
@@ -745,9 +716,6 @@ const researchAgent = agent('query:string -> answer:string', {
745
716
 
746
717
  Semantics:
747
718
 
748
- - Top-level `promptLevel` applies to the root actor.
749
- - `recursionOptions.promptLevel` applies only to recursive `llmQuery(...)` child agents in advanced mode.
750
- - If `recursionOptions.promptLevel` is omitted, recursive children inherit the root top-level `promptLevel`.
751
719
  - `mode` stays top-level; there is no `recursionOptions.mode`.
752
720
  - The current merged actor model stays the default base model. `actorModelPolicy` only overrides it when a rule matches.
753
721
  - `actorModelPolicy` only switches the actor model. It does not change `responderOptions.model`.
@@ -766,12 +734,10 @@ When choosing these options for a user:
766
734
 
767
735
  ## Actor Prompt Controls
768
736
 
769
- Use top-level `promptLevel` for root actor guidance, `recursionOptions.promptLevel` for recursive child guidance, `actorOptions` for actor-only forward options, and `responderOptions` for responder-only tuning.
737
+ Use `actorOptions` for actor-only forward options and `responderOptions` for responder-only tuning.
770
738
 
771
739
  Key fields:
772
740
 
773
- - `promptLevel`: choose `'basic'` or `'detailed'` guidance for the root actor template
774
- - `recursionOptions.promptLevel`: choose `'basic'` or `'detailed'` guidance for recursive child agents
775
741
  - `actorOptions.description`: append extra actor-specific instructions without changing the responder prompt
776
742
  - `actorOptions.model` / `responderOptions.model`: split model choice across actor and responder when needed
777
743
  - `actorModelPolicy`: auto-switch only the actor when the rendered actor prompt is large, the run is on a consecutive error streak, or discovery fetches land in specific namespaces
@@ -783,7 +749,6 @@ const researchAgent = agent('query:string -> answer:string', {
783
749
  contextFields: ['query'],
784
750
  runtime,
785
751
  contextPolicy: { preset: 'adaptive' },
786
- promptLevel: 'detailed',
787
752
  actorOptions: {
788
753
  model: 'gpt-5.4',
789
754
  },
@@ -1037,6 +1002,7 @@ agentIdentity?: {
1037
1002
  };
1038
1003
 
1039
1004
  runtime?: AxCodeRuntime;
1005
+ promptLevel?: 'default' | 'detailed';
1040
1006
  maxSubAgentCalls?: number;
1041
1007
  maxRuntimeChars?: number;
1042
1008
  maxBatchedLlmQueryConcurrency?: number;
@@ -1054,7 +1020,6 @@ agentIdentity?: {
1054
1020
  }) => void | Promise<void>;
1055
1021
  inputUpdateCallback?: (currentInputs: Record<string, unknown>) => Promise<Record<string, unknown> | undefined> | Record<string, unknown> | undefined;
1056
1022
  mode?: 'simple' | 'advanced';
1057
- promptLevel?: 'detailed' | 'basic';
1058
1023
  actorModelPolicy?: readonly [
1059
1024
  | {
1060
1025
  model: string;
@@ -1097,7 +1062,6 @@ agentIdentity?: {
1097
1062
  ];
1098
1063
  recursionOptions?: Partial<Omit<AxProgramForwardOptions, 'functions'>> & {
1099
1064
  maxDepth?: number;
1100
- promptLevel?: 'detailed' | 'basic';
1101
1065
  };
1102
1066
  actorOptions?: Partial<AxProgramForwardOptions & { description?: string }>;
1103
1067
  responderOptions?: Partial<AxProgramForwardOptions & { description?: string }>;
@@ -1106,12 +1070,10 @@ agentIdentity?: {
1106
1070
  ```
1107
1071
 
1108
1072
  - `actorTurnCallback` fires for the root agent and for recursive child agents that run actor turns.
1109
- - `promptLevel` controls the root actor prompt.
1110
1073
  - `actorModelPolicy` applies to the actor loop and can be inherited by recursive child agents unless you override it there.
1111
1074
  - `abovePromptChars` is measured from the full rendered actor prompt, not just replayed action log text.
1112
1075
  - `namespaces` matches exact discovery namespaces from successful `getFunctionDefinitions(...)` lookups and starts affecting model choice on the next actor turn.
1113
1076
  - Consecutive error turns reset after a successful non-error turn and when checkpoint summarization refreshes to a new fingerprint.
1114
- - `recursionOptions.promptLevel` controls recursive child prompt guidance and falls back to the top-level `promptLevel`.
1115
1077
  - `maxSubAgentCalls` is a shared delegated-call budget across the entire run.
1116
1078
 
1117
1079
  ## Examples
@@ -1140,4 +1102,3 @@ Fetch these for full working code:
1140
1102
  - Do not write a full multi-step RLM actor program in one turn.
1141
1103
  - Do not combine `console.log(...)` with `final(...)`.
1142
1104
  - Do not forget `fields.shared` when child agents depend on parent inputs.
1143
- - Do not put `promptLevel` under `actorOptions`; use top-level `promptLevel` for the root actor and `recursionOptions.promptLevel` for recursive child agents.
package/skills/ax-ai.md CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: ax-ai
3
3
  description: This skill helps an LLM generate correct AI provider setup and configuration code using @ax-llm/ax. Use when the user asks about ai(), providers, models, presets, embeddings, extended thinking, context caching, or mentions OpenAI/Anthropic/Google/Azure/Groq/DeepSeek/Mistral/Cohere/Together/Ollama/HuggingFace/Reka/OpenRouter with @ax-llm/ax.
4
- version: "19.0.25"
4
+ version: "19.0.26"
5
5
  ---
6
6
 
7
7
  # AI Provider Codegen Rules (@ax-llm/ax)
package/skills/ax-flow.md CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: ax-flow
3
3
  description: This skill helps an LLM generate correct AxFlow workflow code using @ax-llm/ax. Use when the user asks about flow(), AxFlow, workflow orchestration, parallel execution, DAG workflows, conditional routing, map/reduce patterns, or multi-node AI pipelines.
4
- version: "19.0.25"
4
+ version: "19.0.26"
5
5
  ---
6
6
 
7
7
  # AxFlow Codegen Rules (@ax-llm/ax)
package/skills/ax-gen.md CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: ax-gen
3
3
  description: This skill helps an LLM generate correct AxGen code using @ax-llm/ax. Use when the user asks about ax(), AxGen, generators, forward(), streamingForward(), assertions, field processors, step hooks, self-tuning, or structured outputs.
4
- version: "19.0.25"
4
+ version: "19.0.26"
5
5
  ---
6
6
 
7
7
  # AxGen Codegen Rules (@ax-llm/ax)
package/skills/ax-gepa.md CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: ax-gepa
3
3
  description: This skill helps an LLM generate correct AxGEPA optimization code using @ax-llm/ax. Use when the user asks about AxGEPA, GEPA, Pareto optimization, multi-objective prompt tuning, reflective prompt evolution, validationExamples, maxMetricCalls, or optimizing a generator, flow, or agent tree.
4
- version: "19.0.25"
4
+ version: "19.0.26"
5
5
  ---
6
6
 
7
7
  # AxGEPA Codegen Rules (@ax-llm/ax)
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: ax-learn
3
3
  description: This skill helps an LLM generate correct AxLearn code using @ax-llm/ax. Use when the user asks about self-improving agents, trace-backed learning, feedback-aware updates, or AxLearn modes.
4
- version: "19.0.25"
4
+ version: "19.0.26"
5
5
  ---
6
6
 
7
7
  # AxLearn Codegen Rules (@ax-llm/ax)
package/skills/ax-llm.md CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: ax
3
3
  description: This skill helps with using the @ax-llm/ax TypeScript library for building LLM applications. Use when the user asks about ax(), ai(), f(), s(), agent(), flow(), AxGen, AxAgent, AxFlow, signatures, streaming, or mentions @ax-llm/ax.
4
- version: "19.0.25"
4
+ version: "19.0.26"
5
5
  ---
6
6
 
7
7
  # Ax Library (@ax-llm/ax) Quick Reference
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: ax-signature
3
3
  description: This skill helps an LLM generate correct DSPy signature code using @ax-llm/ax. Use when the user asks about signatures, s(), f(), field types, string syntax, fluent builder API, validation constraints, or type-safe inputs/outputs.
4
- version: "19.0.25"
4
+ version: "19.0.26"
5
5
  ---
6
6
 
7
7
  # Ax Signature Reference