Quick Reference 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. typescript skills skill-llm src/ax/skills/ax-llm.md skill Quick Reference

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:

Shell
npx skills add https://ax-llm.github.io/ax/typescript/ --skill 'ax-llm'

Published skill file: ax-llm/SKILL.md.

Source

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

TaskRead
Start a program, choose factories, or find basic examplesQuick reference
Configure providers, models, reasoning, embeddings, routing, or balancingAI providers
Make typed decisions, use Jev, or retain probabilities and scoresTypesafe / Jev
Define signatures, field types, schemas, or validationSignatures
Generate structured output, stream results, or attach toolsGeneration
Build agents, use tools, or delegate to child agentsAgents
Configure code execution, RLM loops, sessions, or runtime stateAgent runtime
Choose context maps, trajectory policy, optimization, or recallAgent context
Add persistent memory, recall, or dynamic skill discoveryMemory and skills
Inspect tracing, callbacks, logs, usage, or replayAgent observability
Evaluate or tune agents and their playbooksAgent optimization
Compose workflow graphs, branches, or parallel stepsWorkflows
Connect MCP servers, transports, authentication, or catalogsMCP
Ingest events, schedule wakeups, resume runs, or use stores and sinksEvent runtime
Transcribe, synthesize, or exchange conversational audioAudio
Optimize prompts with BootstrapFewShot or GEPAOptimization
Evolve reusable context or learn from run-end feedbackPlaybooks
Improve candidates using reward scores and evaluator feedbackRefinement

Essential Conventions

  • Prefer ai(...), ax(...), agent(...), flow(...), optimize(...), s(...), and fn(...). Use string signatures or fluent f() 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.
TypeScript
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.

Docs