ax-agent-observability

ax-agent-observability is a skill for Claude Code, Codex from ax-llm/ax. It costs 95 tokens per session (3,970 once invoked), scanned A, original, Apache-2.0.

A guide for observing Ax agents while they run. It covers logs, progress callbacks, function-call hooks, traces, chat history, and usage accounting.

In plain words
What is it for?
Use it to inspect model prompts and responses, report progress, trace agent programs, monitor function calls, or measure usage by task, user, or stage.
Why use it?
Without runtime visibility, it is difficult to understand what an agent did, why it failed, how much it used, or how far a long task has progressed. These hooks provide structured information for debugging and operations.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to inspect model prompts and responses, report progress, trace agent programs, monitor function calls, or measure usage by task, user, or stage.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ax-llm/ax/ax-agent-observability
About the project

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.

ax-llm/ax · 2,893 stars · on GitHub · axllm.dev

Install

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.

Any agent
npx skills add ax-llm/ax --skill ax-agent-observability
Clone the repo
git clone --depth 1 https://github.com/ax-llm/ax

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for ax-agent-observability

README.md
[![agentmods](https://agentmods.dev/badge/skills/ax-llm/ax/ax-agent-observability/github.svg)](https://agentmods.dev/skills/ax-llm/ax/ax-agent-observability)
Your own site
<a href="https://agentmods.dev/skills/ax-llm/ax/ax-agent-observability"><img src="https://agentmods.dev/badge/skills/ax-llm/ax/ax-agent-observability/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for ax-agent-observability

Your own site · 80×15
<a href="https://agentmods.dev/skills/ax-llm/ax/ax-agent-observability"><img src="https://agentmods.dev/badge/skills/ax-llm/ax/ax-agent-observability.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 95 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,970 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00095 $0.03970
Opus 5 $0.00048 $0.01985
Sonnet 5 $0.00019 $0.00794
Haiku 4.5 $0.00010 $0.00397

Measured yesterday against content hash 6ae03e86c1eb, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

ax-agent-observability 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 yesterday.

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.

website/static/typescript/.well-known/agent-skills/ax-agent-observability/SKILL.md · 409 lines

How it starts

The opening of the file, as written. The whole thing — 409 lines — stays where its author put it; the contents beside it link to each section on GitHub.

AxAgent Observability Rules (@ax-llm/ax)

Use this skill when an agent needs runtime visibility, progress reporting, tracing, usage accounting, or chat-log access. For ordinary agent setup use ax-agent. For RLM runtime policy use ax-agent-rlm. For memories and dynamic skill loading use ax-agent-memory-skills.

Choose The Smallest Hook

  • Need a quick prompt/runtime trace during development -> start with debug: true.
  • Need structured per-turn code, raw runtime result, formatted output, provider thoughts, or actor stage -> use actorTurnCallback.
  • Need context-pressure and compaction telemetry -> use onContextEvent.
  • Need real-time task progress emitted by actor code -> use agentStatusCallback.
  • Need every runtime function call before execution -> use onFunctionCall.
  • Need model prompts/responses after a run -> use getChatLog().
  • Need centralized chat/embed usage across APIs, users, agents, and services -> use axGlobals.onUsage plus usageContext.
  • Need token usage by actor/responder -> use getUsage() and resetUsage().
  • Need usage split by context and task stages -> use getStagedUsage().
  • Need Ax program traces -> use getTraces().
  • Do not add multiple hooks unless the user clearly needs each output stream.

Global Runtime Defaults

OpenTelemetry and debug defaults come from the shared Ax runtime surface:

import { axGlobals, axCreateDefaultColorLogger } from '@ax-llm/ax';
import { metrics, trace } from '@opentelemetry/api';

axGlobals.rateLimiter = async (next, info) => next();
axGlobals.tracer = trace.getTracer('agent-app');
axGlobals.meter = metrics.getMeter('agent-app');
axGlobals.debug = true;
axGlobals.logger = axCreateDefaultColorLogger();
axGlobals.onUsage = (event) => usageQueue.enqueue(event);

Each agent run snapshots these globals. A forward-scoped rateLimiter, tracer, or meter overrides agent defaults, child-generator defaults, service hooks, and globals for that invocation. Ax carries it through the distiller, executor, responder, repeated actor turns, citation repair, built-in llmQuery, context-map work, checkpoint/tombstone summaries, and other direct internal model calls without mutating child programs or leaking across concurrent runs.

Read the full file on GitHub · 409 lines

Changes

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.

  1. yesterday Changed 6ae03e86c1eb
  2. 5d ago First seen · 409 lines · 95 tokens per session scan A 2c76c420966e

Subscribe to this mod's changes

ax-agent-observability is a skill published in the GitHub repository ax-llm/ax (2,893 stars, last pushed yesterday), licensed Apache-2.0. It adds 95 tokens to every session and 3,970 once invoked, about $0.0005 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.