Inspiration
When a distributed database experiences transaction contention, latency spikes, or region failovers aSREs face a high-stress race against time. They must correlate cryptic telemetry logs, search through fragmented Wiki runbooks, and test risky remediation commands under pressure. While AI agents are increasingly capable, traditional agent architectures fail in production because their memory is either lost on crashes or locked in local files. We built AegisDB with a simple conviction: Agents that think and act need memory that never goes down. By pairing CockroachDB Cloud Serverless as the indestructible relational and vector memory tier with Amazon S3 as the authoritative knowledge base, AegisDB creates an autonomous, always-on SRE Copilot capable of triaging, mitigating, and documenting production incidents with very less human involvement.
What it does
AegisDB is a high-availability Autonomous AI SRE Copilot Key capabilities include:
- Indestructible Agentic Memory: Stores conversation histories, active incident lifecycles (P1–P4), resolution logs, and operational policies inside CockroachDB Cloud Serverless with full ACID guarantees.
- Native Semantic RAG via
pgvector: Performs 384-dimensional dense vector searches directly in CockroachDB using the cosine distance operator (<=>) to instantly match incoming alarms with indexed runbooks and past incident postmortems
- Native Semantic RAG via
- Authoritative Amazon S3 Knowledge Base: Connects to Amazon S3 (
s3://cockroachsre-knowledge-base) to fetch production playbooks (runbooks/) and automatically publish structured postmortem logs (incident-logs/<date>/). - Autonomous Incident Remediation & Terminal Execution: Ingests alarms, queries relevant playbooks, generates non-destructive SQL DDLs/Python scripts, and executes them inside a stateful WinPTY terminal with ANSI escape filtering.
- Heterogeneous Multi-Model Collaboration Team: Deploys a specialized sub-agent team (Reasoning Architect, Coding Specialist, Multimodal Vision Specialist) orchestrated by any model and synthesized via a Consensus Aggregator.
- CockroachDB SRE Management Console: Features a live relational memory explorer, incident lifecycle tracker, runbook viewer with one-click S3 sync, and a live CockroachDB Managed MCP Server process inspector.
How we built it
AegisDB is designed as a resilient 4-tier architecture:
- Memory & Knowledge Tier (CockroachDB + Amazon S3 + Redis):
- CockroachDB Serverless: Serves as the indestructible relational system of record across
incidents,runbooks,fix_history,user_memories,api_keys, androle_assignments. - Inline
pgvector: Embeds runbooks and incidents intoVECTOR(384)columns using a localSentenceTransformer('all-MiniLM-L6-v2')model for 100% free, zero-quota local embeddings with sub-millisecond similarity matching. - Amazon S3: Acts as the authoritative cloud repository for SRE Markdown runbooks and incident JSON logs, connected via a bidirectional
boto3sync pipeline. - Autonomous Agent Orchestration:
- Built a Python async backend featuring a dynamic model router that directly communicates with many many provider options.
- Orchestrated parallel sub-agent workflows where the Reasoning Specialist drafts architectural remediation plans, the Coding Specialist writes SQL/code, and the Consensus Synthesizer merges findings into a cohesive Master Remediation Report
- Tool Execution & Observability:
- Integrated with the CockroachDB Cloud Managed MCP Server(
https://cockroachlabs.cloud/mcp) for live statement statistics (crdb_internal.statement_statistics), range lease distribution and schema inspection. - Built a stateful WinPTY Terminal Manager on Windows for executing remediation commands with real-time streaming output.
- Desktop UI Layer:
- Developed a dark glassmorphic desktop interface using Tauri v2, React 19, and TypeScript, with native Windows system tray minimizing and daemon lifecycle management.
Challenges we ran into
- Zero-Quota Vector Ingestion: Relying on external cloud embedding APIs created rate-limiting bottlenecks during large runbook syncs. We solved this by implementing inline
pgvectorinside CockroachDB paired with local MiniLM embeddings, achieving zero-cost, blazing-fast vector queries. - Context Window Token Explosion in Multi-Agent Pipelines: Passing multi-turn technical reports to multiple parallel sub-agents was inflating token counts. We resolved this by restructuring context assembly to place system guardrails at the top, pruning dialogue turns, and capping sub-agent tool loops.
- Windows Native PTY Handling: Terminal output in Windows PowerShell often generated chaotic ANSI cursor escape codes (
\x1b[row;colH). We engineered an ANSI sanitizer that strips intermediate typing noise and produces clean command streams. - Resilient S3 ⇄ CockroachDB Dual-Sync: Preventing stale or duplicate chunk embeddings required atomic wipe-and-replace SQL transactions (
DELETE WHERE source = %sfollowed by fresh chunk insertions) and application-level UPSERTs
Accomplishments that we're proud of
- True Indestructible Agentic Memory: The copilot can restart, fail over, or run across multiple machines without losing a single conversational fact, active incident state, or guardrail policy
- Closed-Loop SRE Workflow: From alarm ingestion $\rightarrow$ S3 runbook matching $\rightarrow$ safe script generation $\rightarrow$ terminal execution $\rightarrow$ CockroachDB auto-resolve $\rightarrow$ S3 postmortem upload.
What we learned
- Why CockroachDB is the ultimate database for AI Agents: Agents write and read constantly, spawn asynchronously, and cannot tolerate database maintenance windows or failover downtime. CockroachDB's distributed architecture is the ideal system of record for agent state
- The power of unified relational + vector memory: Querying relational incident metadata and dense vector embeddings in a single SQL query (
SELECT ... ORDER BY embedding <=> %s::VECTOR) completely eliminates the operational overhead of managing external vector databases.
What's next for AegisDB
- Team-Shared Global Memory: Synchronizing SRE guardrails and postmortems across multi-tenant engineering teams via CockroachDB Cloud Multi-Region clusters
Built With
- ai-agents
- amazon-web-services
- boto3
- claude-api
- cockroachdb
- devops
- fastapi
- gemini-api
- langchain
- mcp
- openai
- pgvector
- python
- react
- redis
- rust
- site-reliability-engineering
- tauri
- typescript
- vector-database

Log in or sign up for Devpost to join the conversation.