@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/index.cjs +84 -83
- package/index.cjs.map +1 -1
- package/index.d.cts +7 -0
- package/index.d.ts +7 -0
- package/index.global.js +106 -105
- package/index.global.js.map +1 -1
- package/index.js +91 -90
- package/index.js.map +1 -1
- package/package.json +1 -1
- package/skills/ax-agent.md +10 -4
- package/skills/ax-llm.md +1 -1
package/package.json
CHANGED
package/skills/ax-agent.md
CHANGED
|
@@ -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.
|
|
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.
|
|
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: {
|
|
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.
|
|
4
|
+
version: "19.0.11"
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# Ax Library (@ax-llm/ax) Usage Guide
|