Ax go agent observability

From ax-llm/ax · View interactive version

Ax go agent observability is an AI agent skill from the GitHub repository ax-llm/ax. Use when writing Go code with `github.com/ax-llm/ax/packages/go` for agent tracing, centralized and multi-tenant usage accounting, action logs, runtime diagnostics, replay, and production debugging.

How to use this skill

Skill file

AxAgent Observability For Go

This skill helps an agent write Go code with the generated Ax package github.com/ax-llm/ax/packages/go. Use the generated package API, examples, and manifests; do not import TypeScript-only APIs unless you are editing the TypeScript package.

When To Use

Package Facts

Core Pattern

helper := ax.NewAgent("question:string -> answer:string", nil)
out := helper.Forward(llm, map[string]ax.Value{"question": "How should I proceed?"}, nil)

Centralized Usage Observer

Use the process-wide usage observer for application accounting across many agents, API routes, tenants, and users. Keep per-agent usage accessors for inspecting one agent instance after a run.

axllm.SetUsageObserver(func(event axllm.AxUsageEvent) {
    usageQueue.Enqueue(event)
})
// Later: axllm.SetUsageObserver(nil)

Relevant API Surface

Guardrails

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.