Ax is a TypeScript-first programming framework for building applications with large language models through typed generation, agents, workflows, and optimization tools. It is intended for developers who want one model for LLM programs across TypeScript, Python, Java, C++, Go, Rust, and other runtimes.
Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/ax-llm/ax/ax-python-signaturenpx skills add ax-llm/ax --skill ax-python-signaturegit clone --depth 1 https://github.com/ax-llm/axWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/ax-llm/ax/ax-python-signature)<a href="https://agentmods.dev/skills/ax-llm/ax/ax-python-signature"><img src="https://agentmods.dev/badge/skills/ax-llm/ax/ax-python-signature.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00035 | $0.00691 |
| Opus 5 | $0.00017 | $0.00345 |
| Sonnet 5 | $0.00007 | $0.00138 |
| Haiku 4.5 | $0.00003 | $0.00069 |
Grade A, and why
ax-python-signature scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 104 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Ax Signatures For Python
This skill helps an agent write Python code with the generated Ax package axllm. Use the generated package API, examples, and manifests; do not import TypeScript-only APIs unless you are editing the TypeScript package.
When To Use
- Declare input and output contracts with native generated-package APIs.
- Generate JSON-schema-compatible shapes for outputs, tools, prompts, and validation.
- Keep Standard Schema and TypeScript-only helper libraries out of generated-language code.
Package Facts
- Language: Python.
- Package:
axllm. - Package API docs:
API.mdandaxir-api.json. - Capability manifest:
axir-capabilities.json. - Runnable examples:
examples/. - Real network support: yes.
- Scripted no-key transport support: yes.
- Runtime profiles:
javascript-quickjs,python-pyodide.
Core Pattern
from axllm import s
sig = s("question:string -> answer:string")
schema = sig.to_json_schema("outputs")
More Patterns
Simple string contract
Use the string form when field names and types are enough.
from axllm import ax
program = ax("questionText:string -> answerText:string")
Bounded class output
A class field constrains the model to a known label set.
router = ax(
'messageText:string -> routeClass:class "support, sales, engineering"'
)
Fluent constraints
Python exposes the native fluent builder for validation constraints and objects.
from axllm import f
signature = (
f()
.input("contactEmail", f.string("Contact email").email())
.output("partySize", f.number("Guests").min(1).max(12))
.output("bookingCode", f.string().regex(r"^[A-Z]{3}-\d{4}$"))
.build()
)
JSON schema
Render the output contract for tools, validators, or external consumers.
schema = signature.to_json_schema("outputs")
Reuse the signature
Pass one built signature into AxGen and call it like any other program.
program = ax(signature)
output = program.forward(client, inputs)
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2d ago First seen · 104 lines · 35 tokens per session scan A 445d978c9f91
ax-python-signature is a skill published in the GitHub repository ax-llm/ax (2,892 stars, last pushed today), licensed Apache-2.0. It adds 35 tokens to every session and 691 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.
Other skills, from other repositories
temporal-python-testing
Test Temporal workflows with pytest, time-skipping, and mocking strategies. Covers unit testing, integration testing, replay testing, and local development setup. Use when implementing Temporal workflow tests or debugging test failures.
fastapi-templates
Create production-ready FastAPI projects with async patterns, dependency injection, and comprehensive error handling. Use when building new FastAPI applications or setting up backend API projects.
ai-ml-development
AI and machine learning development with PyTorch, TensorFlow, and LLM integration. Use when building ML models, training pipelines, fine-tuning LLMs, or implementing AI features.
ci-tests
Run the test suite for the current repo, auto-detecting Python (pytest/uv), Node (vitest/pnpm), or Rust (cargo test).
ha-dev-workflow-apply
Applies and validates the HA code-style / strict-typing / validation workflow (spec/ha/dev-workflow) against an existing HA Custom Integration — Ruff format, ordered imports, f-strings (logging excepted), file-header docstrings, full type annotations, a local mypy-strict profile as the platinum strict-typing bridge…
agent-framework-azure-ai-py
Build persistent agents on Azure AI Foundry using the Microsoft Agent Framework Python SDK.