ax-event-runtime

Route external events to wake or resume Ax agents, flows, and programs with persisted state.

2.9k|191|Updated Feb 23, 2023
One-click install
npx skills add https://github.com/ax-llm/ax --skill ax-event-runtime
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ax-event-runtime
Source: https://github.com/ax-llm/ax/tree/main/website/static/typescript/.well-known/agent-skills/ax-event-runtime
Command: npx skills add https://github.com/ax-llm/ax --skill ax-event-runtime

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @ax-llm/ax, @ax-llm/ax-tools.

What problem does it solve?

Building LLM applications that react to webhooks, timers, queues, or task completions requires careful handling of event ingestion, identity trust, state persistence, and safe model invocation. This Skill provides the patterns and rules for wiring event sources through an inbox and routing layer into AxGen, AxAgent, and AxFlow programs without letting untrusted event data directly trigger model calls.

Core Features & Use Cases

  • Event Routing with Explicit Actions: Routes declare observe, invalidate, wake, or resume so only deliberate actions invoke a model, with dead-lettering of invalid inputs before invocation.
  • State Persistence and Continuations: Persist run state and outputs, register continuation correlation keys, and resume owning programs when task events complete, fail, or require input.
  • Adapters for MCP and UCP: Integrate MCP catalog subscriptions and UCP webhook sources with verified identity, signature checking, and replay protection.
  • Use Case: Imagine an incident-response agent that must wake when an incident.created webhook arrives, persist its triage output before delivering it to a sink, and resume when a human task completes. This Skill defines the exact source, route, target, store, and sink configuration to do that safely.

Quick Start

Set up an Ax event runtime that wakes my triage agent whenever an incident.created webhook event arrives and persists the result to a sink.

Frequently Asked Questions about ax-event-runtime

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I trigger an Ax agent from a webhook event?

Create an event source, build a target wrapping your agent with input mapping and a sink, then add a route that matches the event type and calls .wake(target). Sources never call the program directly; only wake or resume routes invoke the model.

What is the difference between wake and resume in Ax event routing?

Wake starts a fresh program run from an event, while resume continues an existing run using a registered continuation correlation key. Use resume only with an owned correlation key, typically for task completion or input-required events.

Can Ax event runtime handle MCP server subscriptions?

Yes, use AxMCPEventSource with an explicit resource subscription policy and axMCPEventRoutes for catalog invalidation, progress observation, and task resume. Identity must come from the authenticated client, and resource notifications never get an implicit wake route.

Does the in-memory Ax event store support multiple processes?

No, the in-memory store is volatile and single-process. For cooperating Node processes on one local disk, use AxSQLiteEventStore with coordination set to multi-worker, but never on a network filesystem.

Why do my events never invoke the Ax program?

Events only invoke a program when a matching route declares wake or resume. Observe and invalidate routes never call the model, and inputs that fail signature validation are dead-lettered before invocation.