Skip to content
reaatech

@reaatech/agent-replay

npm v0.1.0

A convenience re-export package that provides the complete public API of the Agent Replay ecosystem—core engine, LLM interceptors, and shared types—from a single import.

@reaatech/agent-replay

npm version License: MIT CI

Status: Pre-1.0 — APIs may change in minor versions. Pin to a specific version in production.

One package, everything you need. The convenience entry point for the Agent Replay ecosystem — re-exports the complete public API of the core engine, LLM interceptors, and shared types from a single import.

Installation

terminal
npm install @reaatech/agent-replay
# or
pnpm add @reaatech/agent-replay

Feature Overview

  • Single dependency — install one package and get the full Agent Replay API
  • Re-exports from three packages@reaatech/agent-replay-core, @reaatech/agent-replay-interceptors, and @reaatech/agent-replay-shared
  • Full type safety — all types, interfaces, and error classes included
  • Tree-shakeable — only the exports you import end up in your bundle

Quick Start

typescript
import {
  RecordingEngine,
  ReplayEngine,
  LocalFileStorage,
  OpenAIInterceptor,
  type Trace,
  type RecordingConfig,
} from "@reaatech/agent-replay";
 
// Recording
const engine = new RecordingEngine();
const session = engine.startRecording({ name: "hello-world" });
 
// Intercept OpenAI calls
const openai = new OpenAI({ apiKey: process.env.OPENAI_API_KEY });
const interceptor = new OpenAIInterceptor(engine);
await interceptor.install(openai);
 
// ... run your agent ...
 
// Stop and save
const trace = engine.stopRecording(session);
await new LocalFileStorage("./traces").save(trace);
 
// Replay (zero tokens)
const replay = new ReplayEngine();
const result = replay.replay(trace, { mode: "stubbed" });
console.log(result.outputs);

What’s Included

This package re-exports the complete public API of:

PackageContents
@reaatech/agent-replay-coreRecordingEngine, ReplayEngine, PartialReplayOrchestrator, ReplayDebugger, DiffEngine, SemanticDiffEngine, RegressionDetector, DivergenceDetector, AnomalyDetector, LocalFileStorage, TraceSerializer, TraceComparer, TraceSummarizer, AnnotationManager, StreamingRecorder, StreamingStubEngine, StructuredCloneStrategy, SnapshotterRegistry, FrameworkAdapterRegistry, DeterminismController, TraceBuilder, migrateTrace, validateTraceVersion, runCICDCheck, and all formatters
@reaatech/agent-replay-interceptorsOpenAIInterceptor, AnthropicInterceptor, BaseInterceptor, InterceptorRegistry, OpenAIAdapter, AnthropicAdapter, LLMProviderAdapter
@reaatech/agent-replay-sharedTrace, Span, Event, Checkpoint, SerializedState, LLMRequest, LLMResponse, StreamChunk, RecordedStream, RecordingConfig, ReplayConfig, AgentReplayError, RecordingFailedError, ReplayFailedError, TraceNotFoundError, StateCaptureError, DivergenceError, InterceptorError, and all types and interfaces

See each sub-package’s README for detailed API documentation:

Granular Imports

If you prefer smaller installs, you can install only the packages you need:

terminal
npm install @reaatech/agent-replay-core        # Engine only
npm install @reaatech/agent-replay-interceptors # Provider interceptors
npm install @reaatech/agent-replay-shared       # Types only
npm install @reaatech/agent-replay-cli          # CLI tool (install globally)
npm install @reaatech/agent-replay-integrations # Framework integrations

License

MIT