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 skills add ax-llm/ax --skill ax-event-runtimegit 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-event-runtime)<a href="https://agentmods.dev/skills/ax-llm/ax/ax-event-runtime"><img src="https://agentmods.dev/badge/skills/ax-llm/ax/ax-event-runtime.svg" alt="Measured on agentmods" height="20"></a>- NVIDIA SkillSpector pass
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.00036 | $0.01477 |
| Opus 5 | $0.00018 | $0.00739 |
| Sonnet 5 | $0.00007 | $0.00295 |
| Haiku 4.5 | $0.00004 | $0.00148 |
Grade A, and why
ax-event-runtime 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 today.
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.
Copies of this mod
1 near-identical copy found in the catalogue:
- ax-event-runtime — 100% identical, 0 lines differ
How it starts
The opening of the file, as written. The whole thing — 152 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Ax Event Runtime
Use this skill when an Ax program should react to notifications, webhooks, timers, queues, task completion, or application events.
Mental Model
source -> inbox -> route -> target -> stored run -> sink
Sources never call an Ax program directly. A route must explicitly choose
observe, invalidate, wake, or resume. Only the last two invoke a model.
Minimal Pattern
const source = new AxPushEventSource('application');
const target = eventTarget('triage')
.program(triageAgent)
.ai(llm)
.input((input) => input.field('incident', eventPath.data()))
.sink({ id: 'result', write: saveResult })
.build();
const events = eventRuntime({
sources: [source],
routes: [
eventRoute('incident-created')
.types('incident.created')
.wake(target)
.build(),
],
});
await events.start();
await source.publish({ event, identity, trust: 'authenticated' });
Rules
- Supply identity from authenticated adapter state, never from event data.
- Treat events without verified identity as anonymous and untrusted.
- Map event data into signature inputs; do not synthesize a user message.
- Use
eventPath.data('field')and other segment-safe selectors. Do not use dotted JSONPath strings or repurposes()as a mapping language. - Use
.project(path)only for same-name signature projection. Explicit.field()mappings override projection; missing or invalid signature inputs dead-letter before model invocation. - Use
eventInput().project(...).field(...)when a declarative mapping should be callback-free and reusable, then pass that plan to.input(),.wakeInput(), or.resumeInput(). - Callback
mapInputis an escape hatch, not a validation bypass: its result is normalized to the program signature and mapper failures dead-letter before invocation. - Use
.wakeInput()and.resumeInput()when the two actions need different contracts. Neither action silently uses the other action's mapping. - Use
observefor progress/logs andinvalidatefor catalog changes. - Use
resumeonly with an owned continuation correlation key. - Use
createProgram(instance)for stateful multi-tenant Agents. - Declare
retrySafety: 'idempotent'only when stable delivery keys protect every possible side effect. - Persist outputs before final sink delivery; redrive sink failures separately.
- Use
debounceMsandcoalesce: 'latest'only when replacing intermediate events is part of the route's declared policy. - Observe source failures with
onSourceError. - The in-memory store is volatile and single-process.
- For cooperating Node processes on one local disk, use
AxSQLiteEventStorefrom@ax-llm/ax-tools/event/sqlitewith explicit retention andcoordination: 'multi-worker'. Never recommend SQLite on a network filesystem. - Close the runtime and caller-owned protocol clients explicitly.
- Fan out to several Agents with several matching routes, not a multi-target route. This preserves independent authorization, ordering, retries, and runs.
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.
- today Changed · +6 lines 1b6fa5966439
- 4d ago First seen · 146 lines · 36 tokens per session scan A 8c8ed96edea4
ax-event-runtime is a skill published in the GitHub repository ax-llm/ax (2,893 stars, last pushed today), licensed Apache-2.0. It adds 36 tokens to every session and 1,477 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
output-dev-credentials
Store and reference encrypted secrets in Output SDK workflows using @outputai/credentials. Use when integrating API keys, database passwords, or third-party tokens.
output-error-direct-io
Fix direct I/O in Output SDK workflow functions. Use when workflow hangs, returns undefined, shows "workflow must be deterministic" errors, or when HTTP/API calls are made directly in workflow code.
output-dev-workflow-cost
Calculate and display the cost of an Output SDK workflow execution run. Use when checking LLM token costs, API service costs, or total spend for a specific workflow run.
output-credentials-edit
View and edit encrypted credentials in an Output.ai project. Use when adding secrets, updating API keys, verifying credential values, or retrieving a specific credential.
capture-api-response-test-fixture
For provider response parsing tests, we aim at storing test fixtures with the true responses from the providers (unless they are too large in which case some cutting that does not change semantics is advised).
langbot-eba-adapter-dev
Build, refactor, and test LangBot platform adapters for the Event-Based Agents architecture. Use when adding or migrating Telegram, Discord, or other messaging platform adapters to the EBA adapter layout, validating unified event/message conversion, writing live adapter probes, or using standalone plugin runtime plus…