Thanks to visit codestin.com
Credit goes to github.com

Skip to content

yethikrishna/mynd-agent-replay

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MYND Agent Replay

The Black Box Flight Recorder for AI Agents

MYND Agent Replay is the world's first full fidelity recording, replay, and time-travel debugging platform for AI agent execution traces.

Features

🎥 Full Fidelity Recording

  • Capture every LLM call, tool invocation, and state change
  • Complete context preservation with timestamps
  • Automatic buffering and batching for performance

⏱️ Time-Travel Debugging

  • Frame-by-frame inspection of agent execution
  • Jump to any timestamp instantly
  • View complete agent state at any point in time

🧬 Behavior DNA Fingerprinting

  • Generate unique behavioral fingerprints for agent runs
  • Cosine similarity comparison between traces
  • Detect behavior changes automatically

🧪 Regression Testing Harness

  • Create baseline traces for comparison
  • Automated pass/fail detection with similarity thresholds
  • Historical test run analytics

📊 Performance Analytics

  • Heatmap generation for bottleneck detection
  • Agent performance dashboards
  • Success rate and duration metrics

🔗 Session Sharing

  • Password-protected shared sessions
  • Expirable links for collaboration
  • Permission controls

Architecture

Tech Stack

  • Frontend: SvelteKit 2.x + Tailwind CSS + TypeScript
  • Backend: Node.js + Fastify + TypeScript
  • Databases: PostgreSQL (relational), Redis (caching), TimescaleDB (time-series)
  • Auth: JWT + OAuth + API Keys
  • Payments: Stripe Subscriptions
  • Deployment: Docker + Docker Compose

Project Structure

mynd-agent-replay/
├── packages/
│   ├── backend/          # Fastify backend server
│   ├── frontend/         # SvelteKit frontend
│   └── shared/           # Agent SDK + shared types
├── docker/               # Docker configuration
├── docs/                 # Documentation
├── docker-compose.yml    # Full stack orchestration
└── package.json          # Monorepo workspace

Quick Start

Prerequisites

  • Docker & Docker Compose
  • Node.js 20+ (for development)

One-Click Startup

# Start the entire stack
docker-compose up -d

# Services available:
# - Frontend: http://localhost:5173
# - Backend API: http://localhost:3000
# - API Docs: http://localhost:3000/docs

Development Setup

# Install dependencies
npm install

# Start databases
docker-compose up postgres redis timescale -d

# Start backend dev server
npm run dev -w @mynd/backend

# Start frontend dev server (new terminal)
npm run dev -w @mynd/frontend

Agent Integration

One-Line SDK Integration

import { initReplay } from '@mynd/shared';

const replay = initReplay('mr_your_api_key');

// Start recording
await replay.startSession('agent-123', { model: 'gpt-4' });

// Record events automatically
await replay.recordLLMCall('gpt-4', 'openai', input, output, metrics);
await replay.recordToolInvocation('search', params, result, 342);
await replay.recordStateChange(prevState, newState, diff);

// End session
await replay.endSession('completed');

Function Wrapper

// Wrap your agent function for automatic recording
const recordedAgent = replay.wrapAgentFunction(myAgentFunction, 'agent-123');

// Call normally - recording happens automatically
const result = await recordedAgent(input);

API Reference

Authentication

# Register
POST /api/v1/auth/register

# Login
POST /api/v1/auth/login
# Returns JWT token for subsequent requests

Traces

# Start new trace
POST /api/v1/traces

# Record frame
POST /api/v1/traces/:id/frames

# End trace
POST /api/v1/traces/:id/end

# Get trace with all frames
GET /api/v1/traces/:id

# Get state at timestamp
GET /api/v1/traces/:id/state?t=1234567890

# Compare Behavior DNA
POST /api/v1/traces/compare

Behavior DNA Algorithm

The fingerprint is a 128-dimensional feature vector capturing:

  • LLM call patterns and model distribution
  • Tool usage frequency and distribution
  • State transition entropy
  • Timing characteristics
  • Frame interval statistics

Similarity is computed using cosine distance.

Pricing Tiers

Feature Free Pro Enterprise
Price $0 $49/mo $299/mo
Frames/month 1,000 100,000 Unlimited
Retention 7 days 90 days 365 days
Team members 1 10 Unlimited
Behavior DNA
Regression Testing
SLA

Security

  • JWT tokens with 7-day expiry
  • API keys hashed with bcrypt (never stored plaintext)
  • Passwords hashed with bcrypt (12 rounds)
  • Rate limiting: 100 requests/minute
  • CORS restricted to configured origins
  • Shared sessions support password protection

Contributing

  1. Fork the repository
  2. Create feature branch
  3. Add tests
  4. Submit PR

License

MIT License - see LICENSE file

Support

About

Black box flight recorder for AI agents — replay any decision, any action, any moment

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors