$ show FailproofAI/runtime
Exosphere is a reliability runtime for AI agents, providing a state-based workflow orchestration platform. The system consists of three main components: a Python SDK (`exospherehost`) for defining nodes and execution graphs, a FastAPI state-manager backend that handles state transitions, retries, cron triggers, and secret encryption, and a Next.js dashboard for monitoring and managing workflows. The architecture follows a microservices-like pattern within a monorepo, with the SDK acting as a client library and the state-manager as the central orchestration engine. Key capabilities include dynamic graph execution, infinite parallel fanout/unite patterns, configurable retry policies (exponential, linear, fixed with jitter), signal-based state pruning and re-queuing, and a graph-level key-value store. The system relies on MongoDB for persistence and uses Beanie ODM. The codebase demonstrates solid engineering practices with well-structured controllers, middleware for request ID propagation and exception handling, and a comprehensive test suite, though some tests are incomplete or skipped. The project is in early beta (v0.0.3b1) with active development and monthly releases.
The LLM identified 5 files worth highlighting for reuse:
Provides symmetric encryption and decryption of secrets using AES-GCM. The class is self-contained, uses a single key from environment, and can be extracted into any Python project needing secure secret storage. Demonstrates proper use of nonce, ciphertext, and tag concatenation.
Defines a configurable retry policy model with nine strategies (exponential, linear, fixed, with/without jitter) and a `compute_delay()` method. The model is reusable across any system requiring retry logic, and the enum-based strategy selection with parameterized backoff is a clean pattern.
Resolves placeholders like `${{node.outputs.field}}` and `${{store.key}}` in input strings at runtime. The logic is isolated, handles nested references, and can be reused in any workflow system needing dynamic input resolution. Demonstrates careful parsing and error handling.
Implements `UvicornTestServer`, a reusable test fixture that starts a Uvicorn server in a separate thread for integration testing. The pattern is generic and can be extracted for any FastAPI or ASGI application test suite. Handles server lifecycle, port allocation, and graceful shutdown.
A React component that renders a workflow execution graph using React Flow. It converts API data into layered nodes and edges, supports status-based styling, and opens detail modals. The component is self-contained with clear props and can be adapted for any directed graph visualization in a React application.