Action Registry

The Action Registry is the "Source of Truth" for your gated APIs. It allows you to move the configuration of your infrastructure from hardcoded files to a dynamic, UI-driven control plane.

Last updated: December 30, 2025

1. Key Concepts

State-First Configuration

Unlike traditional metering where you define prices in code, Atomic Rail uses a Registry-First approach. The AtomicGate class fetches its routing and pricing table dynamically from the Registry.

Ghost Actions (Auto-Discovery)

You don't need to register an action before coding it.

  1. Add a new actionId to your code.
  2. Once the first request (real or simulated) hits the gate, it appears in the Registry as a Ghost.
  3. You can then "Claim" it to set permanent rules.

*Note: If an action is not detected automatically (e.g. due to networking issues or local development constraints), you can manually add it by clicking the

"Create Action" button in the Registry.*

2. Configuration Fields

FieldDescription
Action IDThe unique slug used in your code (e.g., premium-prompt).
API PathThe exact URL path the middleware should gate (e.g., /api/v1/generate).
Expected PriceThe USD value recorded in your analytics for successful requests.
Expected NetworkThe CAIP-2 network ID (e.g., eip155:8453 for Base).
Idempotency TTLHow long to prevent double-charging for the same request ID.
Active StatusThe "Kill Switch." If toggled off, the gate blocks all traffic to this ID.

3. The Management Lifecycle

  1. Develop: Drop a new actionId into your handler.
  2. Verify: Run a simulation in the Interactive Playground.
  3. Claim: Find the new Ghost in the Registry and configure its pricing.
  4. Scale: Monitor revenue and request volume in real-time.

4. Security

The Registry config is public but secured via HMAC signatures. The AtomicGate signs every request with your METER_HMAC_SECRET, proving it has the right to see your configuration.