Architecture
A modular, scalable, and security-hardened infrastructure built for high-performance execution memory and side-effect coordination for AI agents.
Tech Stack
Frontend
Next.js 15, Tailwind 4, Lucide
Backend
Express, Node.js, Fastify
Database
PostgreSQL, Redis
ORM
Prisma
SDK
@replaysafe/guard-sdk (TypeScript)
Verification
Postmark, SES, Stripe, SendGrid, GitHub, Slack, Twilio, S3
Core Components
Guard_API
The primary API layer for execution memory operations. Handles side effect lifecycle management, conflict detection, provider verification, and recovery plan computation. Optimized for millisecond-latency processing.
Verification_Engine
Background worker that resolves UNKNOWN side effects by querying provider APIs. Classifies failures as TRANSIENT (safe to retry) or SEMANTIC (needs human review). Polls at 60s intervals with 30s grace period.
Execution_Ledger
PostgreSQL-backed durable storage for all side effect lifecycle records. Partial unique index on (fingerprint, projectId) WHERE status = 'EXECUTING' prevents TOCTOU race conditions for cross-agent coordination.
Security_Vault
Implements field-level AES-256-GCM encryption for all sensitive provider credentials and configuration. Manages the lifecycle of cryptographic keys and performs proactive security audits.