Ax For TypeScript
Build or debug TypeScript LLM applications with @ax-llm/ax. Use for Ax providers, structured generation, signatures, agents and tools, memory, MCP, workflows, audio, and optimization.
Install
Install only this skill for TypeScript:
npx skills add https://ax-llm.github.io/ax/typescript/ --skill 'ax-llm'Published skill file: ax-llm/SKILL.md.
Source
- Source: src/ax/skills/ax-llm.md
- Version:
25.4.8
Skill Instructions
Use this entry point for @ax-llm/ax. Read the guides relevant to the task before
writing code; the linked guides are bundled locally and need no extra skill
installation. Load additional guides when the task crosses into another area.
Choose A Guide
| Task | Read |
|---|---|
| Start a program, choose factories, or find basic examples | Quick reference |
| Configure providers, models, reasoning, embeddings, routing, or balancing | AI providers |
| Make typed decisions, use Jev, or retain probabilities and scores | Typesafe / Jev |
| Define signatures, field types, schemas, or validation | Signatures |
| Generate structured output, stream results, or attach tools | Generation |
| Build agents, use tools, or delegate to child agents | Agents |
| Configure code execution, RLM loops, sessions, or runtime state | Agent runtime |
| Choose context maps, trajectory policy, optimization, or recall | Agent context |
| Add persistent memory, recall, or dynamic skill discovery | Memory and skills |
| Inspect tracing, callbacks, logs, usage, or replay | Agent observability |
| Evaluate or tune agents and their playbooks | Agent optimization |
| Compose workflow graphs, branches, or parallel steps | Workflows |
| Connect MCP servers, transports, authentication, or catalogs | MCP |
| Ingest events, schedule wakeups, resume runs, or use stores and sinks | Event runtime |
| Transcribe, synthesize, or exchange conversational audio | Audio |
| Optimize prompts with BootstrapFewShot or GEPA | Optimization |
| Evolve reusable context or learn from run-end feedback | Playbooks |
| Improve candidates using reward scores and evaluator feedback | Refinement |
Essential Conventions
- Prefer
ai(...),ax(...),agent(...),flow(...),optimize(...),s(...), andfn(...). Use string signatures or fluentf()field builders. - Check the installed package’s types and version before borrowing an example from another release. These guides ship with the package version above.
- Use provider credentials from the application’s environment.
import { ai, ax } from '@ax-llm/ax';
const llm = ai({ name: 'openai', apiKey: process.env.OPENAI_APIKEY });
const answer = ax('question:string -> answer:string');
const result = await answer.forward(llm, { question: 'What is a signature?' });For example, an agent with persistent recall needs the agent and memory guides; a provider-backed workflow needs the provider, generation, and workflow guides. Specialist skills remain optional for users who want separate skill entries.