The Story of HealSync AI

πŸ’‘ Inspiration DevOps environments are rapidly shifting from human-operated queues to autonomous AI agent systems. Today, agents spin up in response to metrics spikes, run diagnostics, and trigger container redeployments. However, we noticed a critical flaw in current agentic architectures: volatile memory.

If a container hosting a DevOps agent crashes, restarts, or runs out of memory, its context, operational history, and active thought state are lost. Traditional databases are optimized for human speeds, but an autonomous agent writes constantly, spawns dynamically across regions, and requires memory that never goes down.

We were inspired to build HealSync AIto demonstrate that CockroachDB is the ultimate system of record for agentic memory. By providing globally distributed, always-on PostgreSQL-compatible persistence, CockroachDB ensures that if an agent dies, a new instance instantly resumes from the exact millisecond of state history, equipped with long-term vector-indexed runbook context.

πŸ› οΈ How We Built It HealSync AI is structured as a decoupled DevOps cockpit:

  1. The Persistent Memory Layer: Built around CockroachDB tables storing active incidents, logs, and a runbooks library.
  2. The RAG Engine: Generates numerical representations of system symptoms and queries CockroachDB's distributed vector index using cosine similarity to retrieve matching runbooks: $$\text{Cosine Similarity}(\mathbf{q}, \mathbf{r}) = \frac{\mathbf{q} \cdot \mathbf{r}}{|\mathbf{q}| |\mathbf{r}|} = \frac{\sum_{i=1}^{n} q_i r_i}{\sqrt{\sum_{i=1}^{n} q_i^2} \sqrt{\sum_{i=1}^{n} r_i^2}}$$
  3. The Remediation Agent: Orchestrates CLI command outputs (simulating ccloud, aws, and local diagnostics tools) and writes action-by-action thoughts directly to database records.
  4. The Operations Cockpit: A premium glassmorphism Single Page Application (SPA) dashboard styled with vanilla CSS, streaming real-time agent output directly from the FastAPI backend using Server-Sent Events (SSE).

🚧 Challenges We Faced Our biggest challenge was environment resilience. During local deployment, downloading large deep learning dependencies (like PyTorch and SentenceTransformer weights, which exceed $700\text{ MB}$) in sandboxed environments frequently timed out.

To overcome this, we designed a dual-mode vector pipeline. If the transformer models fail to load, HealSync AI dynamically falls back to a deterministic, high-efficiency TF-IDF bag-of-words vector generator. By hashing token frequencies into a normalized $384$-dimensional space: $$\mathbf{v}{\text{normalized}} = \frac{\mathbf{v}}{\sqrt{\sum{j=1}^{384} v_j^2}}$$ we ensured that semantic runbook matching remains functional offline and out of the box, with zero performance interruption.

πŸŽ“ What We Learned We learned that persistent database memory is not just an storage add-onβ€”it is the core component that makes AI agents reliable in production. We also discovered how to design high-concurrency systems where database updates are streamed to client screens with sub-second latencies using SSE. Building HealSync AI solidified our belief that always-on, distributed SQL engines like CockroachDB are foundational to the future of autonomous systems.

Built With

Share this project:

Updates

Submission history