{"slug": "axllm", "title": "AxLLM", "summary": "AxLLM launches Ax, a multi-language LLM framework that uses typed signatures to replace prompt glue with automated prompt generation, parsing, validation, and retry loops. Built on research from DSPy, GEPA, RLM, and PEEK, Ax supports TypeScript, Python, Java, C++, Go, and Rust through a compiled intermediate representation.", "body_md": "Ax\n\n# Stop writing prompt glue.\n\nA one-line signature declares what goes in and what comes out. Ax turns it into the prompt, the parser, the validators, and the retry loop — and hands back typed data your code can trust. The same programming model in TypeScript, Python, Java, C++, Go, and Rust.\n\n```\n{\n  \"sentiment\": \"positive\"\n}\n```\n\nBuilt by **@dosco** — follow on X for new releases and to chat about Ax.\n\n[Follow @dosco on X](https://x.com/intent/follow?screen_name=dosco)\n\nGet started\n\n## Quick install\n\nOne Ax programming model, six languages — pick yours and drop the package in.\n\n`npm install @ax-llm/ax`*on npm*\n\n### Agent skills — for Claude Code & Cursor\n\nNew to this? Ax ships installable, versioned **skills**: small instruction files that teach your coding agent (Claude Code, Cursor, and others) exactly how Ax's API works, so it writes correct Ax code instead of guessing. Point your agent at them with one command.\n\n```\nnpx skills add https://ax-llm.github.io/ax/typescript/ --skill '*'\n```\n\n[Browse agent skills](/typescript/skills/)\n\nWhy signatures?\n\n## Describe the input and output. Ax handles the model call.\n\nThe hero demo is the whole philosophy. A signature says what data the model receives and what typed data your app expects back. Ax uses that one contract to render prompts, call providers, parse output, validate constraints, retry with feedback, stream partial results, record traces, seed examples, and optimize behavior later.\n\n### The contract becomes the system boundary.\n\nInstead of spreading prompt text, JSON parsing, retry logic, tool schemas, tracing, and eval metadata across your app, Ax hangs them from the signature.\n\nSignature pipeline\n\n### One line becomes a running pipeline.\n\nThe signature you write is lowered into prompt rendering, streaming parsers, validators, retry feedback, and trace metadata — the same pipeline that produced the typed output above.\n\nAxIR compiler\n\n## We didn't port Ax six times. We compiled it.\n\nAx is built around a portable intermediate representation. TypeScript is the reference runtime; the AxIR compiler lowers signatures, schemas, providers, generators, agents, flows, MCP, and optimizers into one shared semantic core — then emits native package surfaces for Python, Java, C++, Go, and Rust. Native names, native errors, native builders. Same behavior.\n\n### Signature syntax\n\nString signatures become AxIR contracts that the compiler can lower into prompts, schemas, validators, examples, traces, and typed outputs.\n\n### Field schema IR\n\nFluent fields, media types, arrays, enums, constraints, and validators preserve field semantics across native packages.\n\n### Structured schema output\n\nSchema-backed output keeps generated code aligned with the same parse, retry, docs, telemetry, and optimization contract.\n\nCompiler pipeline\n\n### TypeScript reference runtime -> AxIR -> native APIs.\n\nThe package compiler emits language-shaped APIs instead of transpiling TypeScript. Each backend keeps native names, errors, builders, callbacks, transports, and runtime profiles while sharing the same Ax semantics.\n\nConformance gate\n\n### Capability manifests keep every backend honest.\n\nGenerated package examples, API metadata, capability manifests, and conformance fixtures are checked by `axir verify`\n\n. That is why the language switcher in the hero is a demo, not a promise — every backend earns its place in the matrix.\n\nThe ideas behind it\n\n## Built on DSPy, GEPA, RLM, and PEEK.\n\nAx is more than another LLM framework — it is where a serious research lineage ships. The typed signatures, validation with retry feedback, reflective optimization, runtime-backed agents, and context maps you just saw all come from these papers.\n\nDeclarative modules, signatures, examples, and self-improving LLM pipelines shape Ax's programming model.\n\nConstraints, validation, and self-refinement inform Ax signatures, schemas, retry feedback, and output reliability.\n\nReflective prompt evolution and Pareto tradeoffs map directly to Ax optimization for generators, flows, and agents.\n\nExternal runtime loops and recursive model calls inform AxAgent's runtime state, execution boundary, and small-context turns.\n\nPersistent context maps and orientation caches are the product instinct behind Ax memory, skills, and context management.\n\nAgents\n\n## Agents built for context, tools, memory, and code.\n\nAxAgent is designed around DSPy, RLM, and PEEK ideas: typed signatures define the job, generated code and host runtimes hold durable state, context maps drive context management, and discovery-based tools load only the schemas needed for the next action. That keeps agents useful with small models and big ones, while built-in memory, skills, child agents, telemetry, and `agent.optimize(...)`\n\nmake them practical to operate.\n\n### Discovery\n\nLarge tool catalogs stay out of the base prompt. The agent discovers groups and loads concrete schemas only when they matter.\n\n### Context maps\n\nRuntime state, context maps, summaries, and checkpoints preserve orientation without replaying every token.\n\n### Memory + skills\n\nBuilt-in memory, skills, MCP tools, and child agents become typed capabilities behind the same signature contract.\n\n### Optimization\n\n`agent.optimize(...)`\n\ntunes instructions, examples, and agent behavior against evals, judges, and saved artifacts.\n\nFunction discovery\n\n### Agents navigate large tool catalogs without stuffing every schema into the prompt.\n\nFunction groups, child agents, MCP tools, memory, and runtime state are discovered and loaded as needed, which keeps even small models focused on the next useful action.\n\nContext policy\n\n### State grows in the runtime instead of the prompt.\n\nContext maps, summaries, checkpoint state, and runtime references keep long-running work usable without turning every turn into a full transcript replay.\n\nAudio\n\n## Build text, voice, and realtime AI apps.\n\nAx treats audio as part of the same typed programming model: direct speech-to-text, direct text-to-speech, signature audio artifacts, conversational audio turns, realtime/native audio, and agent audio inputs.\n\n### Use the smallest audio surface that matches the job.\n\n`ai.transcribe(...)`\n\nfor batch speech-to-text.`ai.speak(...)`\n\nfor batch text-to-speech.`speech:audio`\n\nfor typed programs that return synthesized audio artifacts.`.chat()`\n\naudio config for conversational or realtime audio turns.- Agents transcribe audio inputs before planner, executor, and responder stages.\n\n### Transcribe and speak\n\nUse direct batch APIs when the app needs speech-to-text, text-to-speech, transcripts, or reusable audio artifacts.\n\n### Conversational audio\n\nUse provider audio chat and realtime configurations when voice belongs inside the model conversation.\n\n### Agent audio\n\nLet agents accept recordings and return spoken outputs while their internal tool loops operate on stable text.\n\nOptimization\n\n## Improve quality after it works.\n\nGEPA, the Genetic-Pareto optimizer, tunes prompts, demos, flows, and agents against evals. Pareto frontiers make quality, latency, cost, and brevity tradeoffs explicit instead of hiding them behind one metric.\n\n### Pick the artifact that matches production reality.\n\nUse optimized programs when quality matters, cheaper frontier points when cost dominates, and saved artifacts when the same tuned behavior needs to be deployed repeatedly.\n\nThe full surface\n\n## Everything you need to build useful LLM systems.\n\nEvery capability above hangs off the same signature contract. Start with a single typed generation call, then grow into tools, agents, voice, workflows, telemetry, optimization, and native packages without switching mental models.\n\n### Structured generation ax()\n\nDeclare typed inputs and outputs, then get parsed host values with streaming, validation, retries, and traces.\n\n### Signatures s() + f()\n\nUse concise string signatures, fluent fields, media types, enums, arrays, constraints, and Standard Schema output.\n\n### Tools and MCP fn()\n\nExpose typed host functions, MCP servers, runtimes, flows, and child agents as callable capabilities.\n\n### Agents agent()\n\nBuild agents with tool discovery, memory, skills, child agents, context policy, and persistent runtime state.\n\n### Audio speech:audio\n\nTranscribe speech, synthesize speech, return typed audio artifacts, and use conversational or realtime audio turns.\n\n### Workflows flow()\n\nCompose typed steps, branches, and parallel work into explicit LLM application flows.\n\n### Optimization optimize()\n\nImprove prompts, demos, programs, flows, and agents against evals, judges, and production tradeoffs.\n\n### Providers ai()\n\nUse OpenAI, Responses, Claude, Gemini, OpenAI-compatible gateways, local routers, embeddings, and model catalogs.\n\n### Telemetry traces\n\nInspect model calls, tool calls, usage, cost, latency, errors, optimizer metrics, and agent turns.\n\n### Native packages AxIR\n\nUse the same Ax concepts from TypeScript, Python, Java, C++, Go, and Rust package surfaces.\n\nProduction-ready from day one\n\n## The operational pieces are built in, not bolted on.\n\nExtensive test coverage, OpenTelemetry integration, cost tracking, provider routing, and enterprise-grade error handling all belong to one program story.\n\n**1000+** tests\n\n**40+** OTel metrics\n\n**15+** LLM providers\n\n**6** languages\n\n### OpenTelemetry\n\nDistributed traces span LLM calls, function invocations, MCP calls, and agent turns.\n\n### Detailed metrics\n\nTrack latency, tokens, errors, context windows, thinking budgets, and custom labels.\n\n### Streaming and validation\n\nStructured outputs stream through parsers, assertions, retries, and correction feedback.\n\n### Cost tracking\n\nEstimate provider costs per request and make optimization tradeoffs concrete.\n\n### Multi-language\n\nOne semantic core spans TypeScript, Python, Java, C++, Go, and Rust package shapes.\n\n### Enterprise controls\n\nRate limits, sampling, redaction, provider routing, and error handling fit production workflows.\n\nOperate Ax systems\n\n### Observe the run from model call to optimized artifact.\n\nUse the telemetry guide for the concrete spans, counters, histograms, and labels emitted by Ax programs.\n\nPatterns\n\n## Declare capabilities, not prompts.\n\nSignatures make common LLM tasks readable, testable, and portable. The contract is the unit Ax can validate, trace, optimize, and document.\n\n### Classification\n\nCategorize text into predefined classes.\n\n### Extraction\n\nPull structured data from unstructured text.\n\n### Question answering\n\nAnswer questions with provided context.\n\n### Multimodal\n\nProcess images and audio alongside text.\n\n### Validation\n\nAuto-validate outputs with constraints.\n\n### Streaming\n\nReceive structured results as they generate.\n\n### Translation\n\nTranslate between languages with typed IO.\n\n### Workflows\n\nReturn multiple typed outputs from one call.\n\nMCP and tools\n\n### External servers become typed Ax functions.\n\nUse MCP servers through `AxMCPClient.toFunction()`\n\nin `ax()`\n\ngeneration or pass MCP clients into agents for discovery-aware tool use.\n\nLLM providers\n\n## Use any model.\n\nPick OpenAI, Claude, Gemini, a gateway, or a local OpenAI-compatible endpoint in `ai()`\n\n. Your signatures, tools, traces, and outputs stay the same.\n\nNeed routing, embeddings, audio, or context caching? [Read the LLM guide](/typescript/concepts/llms/).\n\nAlso checkout\n\n## Connect AI agents to your database.\n\n[GraphJin](https://graphjin.com) compiles GraphQL to efficient SQL and doubles as an MCP server, giving Ax agents direct, governed access to application data.\n\n### Use GraphJin as an MCP tool inside Ax agents.\n\nPostgreSQL, MySQL, SQLite, MongoDB, Oracle, MSSQL, and Snowflake can sit behind one data access layer for AI workflows.\n\nStart now\n\n## Write your first signature today.\n\nOne line in, typed data out — on npm now, and in five more languages straight from this repo.\n\nBuilt by [@dosco](https://x.com/intent/follow?screen_name=dosco) — follow on X for new releases and to chat about Ax.\n\nBuilding with an AI coding agent? [Install the Ax skills](/typescript/skills/) and let it write Ax for you.", "url": "https://wpnews.pro/news/axllm", "canonical_source": "https://axllm.dev/", "published_at": "2026-06-24 05:46:46+00:00", "updated_at": "2026-06-24 06:14:21.969885+00:00", "lang": "en", "topics": ["large-language-models", "developer-tools", "ai-tools"], "entities": ["AxLLM", "Ax", "DSPy", "GEPA", "RLM", "PEEK", "TypeScript", "Python"], "alternates": {"html": "https://wpnews.pro/news/axllm", "markdown": "https://wpnews.pro/news/axllm.md", "text": "https://wpnews.pro/news/axllm.txt", "jsonld": "https://wpnews.pro/news/axllm.jsonld"}}