ax-gen

Generate AxGen code for typed LLM workflows with validation and streaming.

2.9k|186|Updated Feb 23, 2023
One-click install
npx skills add https://github.com/ax-llm/ax --skill ax-gen-ax-llm
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ax-gen
Source: https://github.com/ax-llm/ax/tree/main/website/static/typescript/.well-known/agent-skills/ax-gen
Command: npx skills add https://github.com/ax-llm/ax --skill ax-gen-ax-llm

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps you produce correct AxGen code without guessing the right APIs, validation flow, or execution patterns for structured LLM outputs.

Core Features & Use Cases

  • Generates canonical AxGen setups for typed signatures, schemas, and reusable generators.
  • Covers forward and streamingForward flows, assertions, field processors, function calling, caching, step hooks, and self-tuning.
  • Useful when building structured extraction, multi-step agents, tool-using workflows, or retry-safe generation in TypeScript with @ax-llm/ax.

Quick Start

Ask the skill to generate AxGen code for your specific signature, schema, and runtime behavior using @ax-llm/ax.

Frequently Asked Questions about ax-gen

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate structured LLM outputs with TypeScript validation?

To generate structured LLM outputs with TypeScript validation, you define typed signatures and schema-backed outputs using AxGen code. This approach satisfies both runtime and type-safety constraints by applying field processors and assertions.

What's the best way to implement streaming responses in typed LLM workflows?

The best way to implement streaming in typed LLM workflows is using the streamingForward() function within AxGen code. This enables streaming structured outputs while maintaining schema validation and type-safety constraints.

Can I use AxGen for multi-step agents and function calling?

Yes, AxGen supports multi-step agents and function calling. It generates canonical setups for tool-using workflows, step hooks, and function calling to build retry-safe generation workflows in TypeScript with @ax-llm/ax.

Does @ax-llm/ax support self-tuning and caching for LLM generators?

Yes, @ax-llm/ax supports self-tuning and caching for LLM generators. AxGen code implements these features alongside step hooks and assertions to optimize typed workflow execution and structured extraction.

Why does my AxGen code fail TypeScript type-safety checks?

AxGen code fails TypeScript type-safety checks when ai(), ax(), forward(), or streamingForward() are used incorrectly. You must properly configure typed signatures, schema-backed outputs, and field processors to satisfy both runtime and type-safety constraints.