@ax-llm/ax 19.0.9 → 19.0.11

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.9",
3
+ "version": "19.0.11",
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
3
3
  description: This skill helps with building AxAgent-based agents using @ax-llm/ax. Use when the user asks about agent(), AxAgent, child agents, tool functions, RLM mode, stopping agents, composing multi-agent hierarchies, shared fields, shared agents, or global shared fields/agents.
4
- version: "19.0.9"
4
+ version: "19.0.11"
5
5
  ---
6
6
 
7
7
  # AxAgent Guide (@ax-llm/ax)
@@ -348,17 +348,20 @@ When composing agent hierarchies, you often need to pass data or utility agents
348
348
 
349
349
  ### `fields.shared` — Pass fields to direct children (one level)
350
350
 
351
- Fields listed in `fields.shared` are automatically injected into direct child agents at runtime. They bypass the parent's LLM entirely.
351
+ Fields listed in `fields.shared` are automatically injected into direct child agents at runtime. By default, they bypass the parent's LLM.
352
352
 
353
353
  ```typescript
354
354
  const parentAgent = agent('query:string, userId:string, knowledgeBase:string -> answer:string', {
355
355
  agents: { local: [childAgent] },
356
356
  contextFields: ['knowledgeBase'],
357
- fields: { shared: ['userId'] }, // userId is injected into child agents automatically
357
+ fields: {
358
+ shared: ['userId'], // userId is injected into child agents automatically
359
+ local: ['userId'], // and remains available in the parent Actor/Responder too
360
+ },
358
361
  });
359
362
  ```
360
363
 
361
- - `userId` is removed from the parent's Actor/Responder prompts
364
+ - Without `fields.local`, `userId` is removed from the parent's Actor/Responder prompts
362
365
  - Children can opt out via `fields: { excluded: ['userId'] }`
363
366
 
364
367
  ### `fields.globallyShared` — Pass fields to ALL descendants (recursive)
@@ -372,6 +375,8 @@ const parent = agent('query:string, sessionId:string -> answer:string', {
372
375
  });
373
376
  ```
374
377
 
378
+ Use `fields.local: ['sessionId']` when a globally shared field should also remain visible in the current parent agent.
379
+
375
380
  ### `agents.shared` — Add agents to direct children (one level)
376
381
 
377
382
  Utility agents listed in `agents.shared` are added to every direct child agent's available agents list.
@@ -970,6 +975,7 @@ Extends `AxProgramForwardOptions` (without `functions`) with:
970
975
  };
971
976
 
972
977
  fields?: {
978
+ local?: string[]; // Keep shared/global fields visible in this agent
973
979
  shared?: string[]; // Fields passed to direct child agents (one level)
974
980
  globallyShared?: string[]; // Fields passed to ALL descendants recursively
975
981
  excluded?: string[]; // Fields this agent should NOT receive from parents
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.9"
4
+ version: "19.0.11"
5
5
  ---
6
6
 
7
7
  # Ax Library (@ax-llm/ax) Usage Guide