UNPKG

agentfootprint

Version:

The explainable agent framework — backtrack a wrong answer to the exact context that caused it (evidence, not guesses). Built on footprintjs.

22 lines • 782 B
/** * agentfootprint/resilience — provider decorators for production reliability. * * Three composable wrappers around `LLMProvider`. Each preserves the * `LLMProvider` interface (drop-in replacement) and stacks freely: * * const provider = withRetry( * fallbackProvider( * anthropic({ apiKey }), * openai({ apiKey }), * ), * { maxAttempts: 5 }, * ); * * Reads as: try anthropic; on failure fall back to openai; the whole * chain is wrapped in retry with 5 attempts. */ export { withRetry } from './withRetry.js'; export { withFallback } from './withFallback.js'; export { fallbackProvider } from './fallbackProvider.js'; export { withCircuitBreaker, CircuitOpenError, } from './withCircuitBreaker.js'; //# sourceMappingURL=index.js.map