@ax-llm/ax 19.0.27 → 19.0.29

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.27",
3
+ "version": "19.0.29",
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.27"
4
+ version: "19.0.29"
5
5
  ---
6
6
 
7
7
  # AxAgent Optimize Codegen Rules (@ax-llm/ax)
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: ax-agent
3
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.27"
4
+ version: "19.0.29"
5
5
  ---
6
6
 
7
7
  # AxAgent Codegen Rules (@ax-llm/ax)
@@ -114,6 +114,7 @@ Practical rule:
114
114
  - If `functions.discovery` is `true`, call `listModuleFunctions(...)` first, then `getFunctionDefinitions(...)`, then call only discovered functions.
115
115
  - In stdout-mode RLM, non-final turns must emit exactly one `console.log(...)` and stop immediately after it.
116
116
  - Never combine `console.log(...)` with `final(...)` or `askClarification(...)` in the same actor turn.
117
+ - Inside actor-authored JavaScript, `final(...)` and `askClarification(...)` end the current turn immediately; code after them is dead code.
117
118
  - If a host-side `AxAgentFunction` needs to end the current actor turn, use `extra.protocol.final(...)` or `extra.protocol.askClarification(...)`.
118
119
  - If a child agent needs parent inputs such as `audience`, use `fields.shared` or `fields.globallyShared`.
119
120
  - `llmQuery(...)` failures may come back as `[ERROR] ...`; do not assume success.
@@ -368,9 +369,10 @@ askClarification({
368
369
  ```
369
370
 
370
371
  - Supported `type` values are `text`, `number`, `date`, `single_choice`, and `multiple_choice`.
371
- - Choice payloads require a non-empty `choices` array.
372
+ - `single_choice` payloads with missing, empty, or malformed `choices` are downgraded to a plain clarification question instead of failing the turn.
373
+ - `multiple_choice` payloads must include at least two valid choices; otherwise the actor turn fails with a corrective runtime error that tells the model how to fix the call.
372
374
  - Choice entries may be strings or `{ label, value? }` objects.
373
- - Invalid clarification payloads are treated as actor-turn runtime errors, not as successful clarification completions.
375
+ - Invalid clarification payloads such as a missing `question` are still treated as actor-turn runtime errors, not as successful clarification completions.
374
376
 
375
377
  What `AxAgentState` contains:
376
378
 
@@ -564,7 +566,7 @@ Rules:
564
566
  - Use `preset: 'adaptive'` when the task needs runtime state across many turns but older successful work should collapse into checkpoint summaries while important recent steps can still stay fully replayed.
565
567
  - Use `preset: 'checkpointed'` when you want full replay first, then only older successful history checkpointed after budget pressure becomes real.
566
568
  - Use `preset: 'lean'` when you want more aggressive compression and can rely mostly on current runtime state plus checkpoint summaries and compact action summaries.
567
- - Use `budget: 'compact'` when you want earlier summarization and tighter runtime/output truncation, `budget: 'balanced'` for the default, and `budget: 'expanded'` when you want the actor prompt to grow more before compression starts.
569
+ - Use `budget: 'compact'` when you want earlier summarization and tighter prompt-pressure thresholds, `budget: 'balanced'` for the default, and `budget: 'expanded'` when you want the actor prompt to grow more before compression starts.
568
570
  - `checkpointed + balanced` is the default. `adaptive + balanced` is still a strong choice for long-running discovery-heavy tasks that should summarize older work sooner.
569
571
  - `checkpointed` keeps the most recent `3` actions in full and keeps unresolved errors fully replayed even after checkpointing starts.
570
572
  - Non-`full` presets inject a compact `Live Runtime State` block into the actor prompt. The block is structured and provenance-aware: variables are rendered with compact type/size/preview metadata, and when Ax can infer it, a short source suffix like `from t3 via db.search` is included.
@@ -654,6 +656,8 @@ Use these top-level controls consistently:
654
656
  - `mode`: controls whether `llmQuery(...)` stays simple or delegates to recursive child agents in advanced mode
655
657
  - `recursionOptions.maxDepth`: limits recursive `llmQuery(...)` depth
656
658
  - `maxSubAgentCalls`: shared delegated-call budget across the whole run, including recursive children
659
+ - `maxRuntimeChars`: runtime/output truncation cap for console logs, tool results, and interpreter output replay
660
+ - `summarizerOptions`: default model/options for the internal checkpoint summarizer
657
661
  - `actorOptions`: actor-only forward options such as `description`, `model`, `modelConfig`, `thinkingTokenBudget`, and `showThoughts`
658
662
  - `actorModelPolicy`: actor-only model override rules based on consecutive error turns or discovery fetches from listed namespaces
659
663
  - `responderOptions`: responder-only forward options
@@ -669,6 +673,11 @@ const researchAgent = agent('query:string -> answer:string', {
669
673
  recursionOptions: {
670
674
  maxDepth: 2,
671
675
  },
676
+ maxRuntimeChars: 3000,
677
+ summarizerOptions: {
678
+ model: 'gpt-5.4-mini',
679
+ modelConfig: { temperature: 0.1, maxTokens: 180 },
680
+ },
672
681
  contextPolicy: {
673
682
  preset: 'checkpointed',
674
683
  budget: 'balanced',
@@ -693,6 +702,8 @@ const researchAgent = agent('query:string -> answer:string', {
693
702
  Semantics:
694
703
 
695
704
  - `mode` stays top-level; there is no `recursionOptions.mode`.
705
+ - `maxRuntimeChars` controls runtime/output truncation only. It is separate from `contextPolicy.budget`.
706
+ - `summarizerOptions` tunes only the internal checkpoint summarizer. It does not change actor or responder model selection.
696
707
  - The current merged actor model stays the default base model. `actorModelPolicy` only overrides it when a rule matches.
697
708
  - `actorModelPolicy` only switches the actor model. It does not change `responderOptions.model`.
698
709
  - Recursive child agents can inherit `actorModelPolicy`; use a child override only when that child needs different routing behavior.
@@ -980,7 +991,9 @@ agentIdentity?: {
980
991
  maxSubAgentCalls?: number;
981
992
  maxBatchedLlmQueryConcurrency?: number;
982
993
  maxTurns?: number;
994
+ maxRuntimeChars?: number;
983
995
  contextPolicy?: AxContextPolicyConfig;
996
+ summarizerOptions?: Omit<AxProgramForwardOptions<string>, 'functions'>;
984
997
  actorFields?: string[];
985
998
  actorTurnCallback?: (turn: {
986
999
  turn: number;
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.27"
4
+ version: "19.0.29"
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.27"
4
+ version: "19.0.29"
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.27"
4
+ version: "19.0.29"
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.27"
4
+ version: "19.0.29"
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.27"
4
+ version: "19.0.29"
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.27"
4
+ version: "19.0.29"
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.27"
4
+ version: "19.0.29"
5
5
  ---
6
6
 
7
7
  # Ax Signature Reference