Skip to content
reaatechREAATECH

reaatech/circuit-breaker-agents

0Last commit: Jun 4, 2026GitHub →

These packages give you a circuit breaker designed specifically for agent-to-tool and agent-to-agent communication, with per-tool circuit isolation, confidence-aware tripping, and cost-based rate limiting. You would adopt them to prevent cascading failures when an LLM agent repeatedly calls a degraded tool, or to automatically route traffic away from expensive or unreliable model endpoints. The most distinctive thing is that circuits are identified by a logical `circuitId` (not a hostname), and the state machine uses a lazy auto-transition model with no timers, plus optional leader-elected persistence across restarts via Firestore, DynamoDB, or Redis.

Packages

7 packages

@reaatech/circuit-breaker-agents

v0.1.1
A meta-package that re-exports all public APIs from `@reaatech/circuit-breaker-core` and `@reaatech/circuit-breaker-persistence` as a single dependency, providing classes (`CircuitBreaker`, `StateMachine`), persistence adapters (`InMemoryAdapter`, `FirestoreAdapter`, `DynamoDBAdapter`, `RedisAdapter`), leader election, strategies, metrics collectors, error classes, and TypeScript types.
status
published
published
2 days ago

@reaatech/circuit-breaker-core

v0.1.1
A circuit breaker state machine for agent-to-tool and agent-to-agent communication, providing a `CircuitBreaker` class with lazy auto-transition state evaluation, configurable trip strategies (error threshold, confidence threshold, cost threshold), recovery strategies (gradual exponential ramp-up or single all-or-nothing), and pluggable metrics collection — depends only on `zod` at runtime.
status
published
published
2 days ago

@reaatech/circuit-breaker-example-basic

pending npm
Description pending.
status
awaiting publish

@reaatech/circuit-breaker-example-dynamodb

pending npm
Description pending.
status
awaiting publish

@reaatech/circuit-breaker-example-firestore

pending npm
Description pending.
status
awaiting publish

@reaatech/circuit-breaker-example-redis

pending npm
Description pending.
status
awaiting publish

@reaatech/circuit-breaker-persistence

v0.1.1
Persistence adapters for circuit breaker state that survive restarts and share state across instances. Exports a `PersistenceAdapter` interface with four implementations: `InMemoryAdapter` (zero dependencies), `FirestoreAdapter` (peer: `@google-cloud/firestore`), `DynamoDBAdapter` (peer: `@aws-sdk/client-dynamodb`), and `RedisAdapter` (peer: `ioredis`), each providing `connect`, `disconnect`, `saveState`, `loadState`, `deleteState`, `saveBatch`, `loadAll`, `tryAcquireLeadership`, `releaseLeadership`, and `healthCheck` methods.
status
published
published
2 days ago

Comments

Sign in with GitHub to comment and vote.

Loading comments…