Forensic recorder for agentic software

AgentRail

The flight recorder for AI agents. Trace decisions, tool calls, evidence, and spend before an agent becomes impossible to explain.

Real Trace Rail screenshot showing the AgentRail forensic dashboard
Actual seeded M1 dashboard state

How evidence moves

AgentRail keeps cost and action proof out of the SDK hot path, then rebuilds the run for investigation.

  1. Instrument

    Add the TypeScript SDK around a trace and let spans inherit actor context unless a tool overrides it.

  2. Accept

    The ingestion endpoint returns 202 only after a fast enqueue, while worker jobs handle durable processing.

  3. Price

    Workers compute cost_usd from the shared catalog. Unknown model pricing stays null and explicit.

  4. Investigate

    The dashboard reconstructs Trace Rail, Action Ledger, and payload evidence through backend routes.

Built for AWS-native deployment

The local M1 stack maps directly to AWS services without changing AgentRail's core contract.

Ingest
API Gateway and Lambda accept spans with HMAC API keys.
Buffer
SQS keeps ingestion fast while workers process traces.
Store
RDS/PostgreSQL stores metadata and S3 stores redacted evidence.
Observe
CloudWatch tracks queue health, worker failures, and latency.
Extend
Amazon Bedrock cost and audit integrations fit the same model catalog path.

Planned AWS path: API Gateway, Lambda, SQS, RDS/PostgreSQL, S3, CloudWatch, and Amazon Bedrock cost metadata.

NPM publish-ready

Install AgentRail with npm

Copy the public package names from here. The registry commands are prepared and smoke-tested, but they still require npm authentication and ownership of the selected @agentrail-sdk scope before they are advertised as live downloads.

Available today
Source checkout + local Docker setup
Package state
pnpm pack smoke tests pass for SDK, contracts, DB, and MCP
NPM target
@agentrail-sdk/sdk for apps, @agentrail-sdk/mcp for Codex-style tools
Publish blocker
npm auth and @agentrail-sdk scope ownership

Do not treat the commands as live downloads until npm view @agentrail-sdk/sdk and npm view @agentrail-sdk/mcp resolve to this repository.

Target command after registry publish

Use these exact package names
SDK packagenpm install @agentrail-sdk/sdk

Add AgentRail tracing to a TypeScript AI application.

MCP readernpx @agentrail-sdk/mcp

Open read-only trace lookup from Codex-style tools.

import { AgentRail, BufferedDelivery, HttpSpanTransport } from "@agentrail-sdk/sdk";

const delivery = new BufferedDelivery({
  transport: new HttpSpanTransport({
    endpoint: "http://localhost:3001/v1/spans",
    apiKey: process.env.AGENTRAIL_API_KEY!,
  }),
});

const rail = new AgentRail({
  actor: { agentId: "research-agent", onBehalfOf: "user_42" },
  sink: delivery,
});

await rail.trace({ name: "research.answer" }, async (trace) => {
  await trace.span(
    {
      kind: "llm",
      name: "draft",
      model: "test.known",
      inputTokens: 1_000,
      outputTokens: 500,
    },
    async () => undefined,
  );
  await trace.action({ name: "filesystem.read" }, async () => undefined);
});

await rail.shutdown({ timeoutMs: 5_000 });

Founding tester program

AgentRail needs three developer teams to test real agent workflows: one SDK integration, one local dashboard review, and one MCP reader workflow.

About and contact

Open-source first, self-hosted by default

Run AgentRail locally, inspect recorded agent behavior, and keep sensitive evidence under your control.