Inspiration
When an autonomous AI agent manages production cloud infrastructure, loss of context isn't an inconvenience—it's a critical outage. Traditional databases were built for human-scale interactions, but autonomous agentic swarms spawn dynamically, write state constantly, and execute complex workflows across distributed regions.
If an agent crashes mid-remediation or suffers a network partition, a typical in-memory or single-region vector store loses context. The agent either halts or, worse, hallucinates destructive commands based on fragmented memory.
We built Chitin.ai to solve this exact problem. Named after nature’s tough, indestructible exoskeleton molecule (chitin), Chitin.ai provides autonomous infrastructure remediation agents with an unbreakable, persistent memory layer powered by CockroachDB and AWS.
What it does
Chitin.ai is an autonomous incident remediation engine that intercepts live cloud infrastructure failures, matches them against historical post-mortems, and safely executes repair workflows with zero loss of state.
Listens & Ingests: Monitored via AWS EventBridge and CloudWatch, system error logs and stack traces are captured in real-time.
Semantic Memory Retrieval: The agent converts incoming error payloads into 1536-dimensional vector embeddings via Amazon Bedrock (Titan Text V2) and queries CockroachDB’s Distributed Vector Index to retrieve the most relevant historical post-mortems using cosine distance (<=>).
ACID Transactional State Management: Before taking action, the agent writes its execution state, decision tree, and intent into CockroachDB transactional tables (active_remediations), ensuring that if the agent process terminates, another node picks up the exact execution step with zero context drift.
Safe Diagnostic & Action Execution: Using the CockroachDB Cloud Managed MCP Server for safe, read-only system inspection and the agent-ready ccloud CLI, Chitin.ai adjusts cluster sizing, provisions nodes, or updates configuration state dynamically on AWS.
How we built it
Chitin.ai is built using a resilient multi-agent architecture across CockroachDB and AWS:
CockroachDB Tooling Integration CockroachDB Distributed Vector Indexing: Stores and indexes 1536-dimensional embeddings directly inside CockroachDB using VECTOR(1536) and CREATE VECTOR INDEX. This eliminates the need for a separate vector database while ensuring strict transactional consistency between operational data and semantic embeddings.
CockroachDB Cloud Managed MCP Server (https://cockroachlabs.cloud/mcp): Connects the reasoning agents natively to CockroachDB clusters to run audit logs and inspect diagnostic metadata safely without custom proxy overhead.
ccloud CLI (Agent-Ready): Embedded directly into the agent executor module to issue JSON-structured control-plane commands (ccloud cluster list, ccloud backup, etc.) with service-account-based RBAC.
Open-Source Agent Skills Repo: Encodes CockroachDB expertise for automated schema tuning, query optimization, and cluster node health verification.
AWS Infrastructure Integration Amazon Bedrock: Powers the core reasoning loop and embedding generation via Amazon Titan Text Embeddings V2 (amazon.titan-embed-text-v2:0).
AWS Lambda & EventBridge: Functions as the event-driven entry point, converting CloudWatch log streams into structured incident triggers.
Amazon S3: Stores raw log dumps and generates verifiable post-mortem PDF audit reports after each automated incident resolution.
Challenges we ran into
Formatting Vector Strings in SQL: Ensuring sub-second similarity search required fine-tuning how vector embeddings were cast into CockroachDB's VECTOR type in Python (psycopg3) while retaining distributed indexing efficiency across scale.
Preventing Race Conditions in Agent Swarms: Multi-agent swarms competing to remediate the same incident can cause race conditions. We resolved this by utilizing CockroachDB’s serializable isolation levels and FOR UPDATE transaction locks in our state tables.
Safe CLI Execution: Teaching the agent executor to safely invoke the ccloud CLI required wrapping terminal outputs in structured JSON validators to guarantee that destructive actions are blocked unless explicit execution confidence metrics are met.
Accomplishments that we're proud of
True Zero-Downtime Agent Memory: Created a system where an agent can be hard-killed mid-execution, and a secondary agent instance will read the transaction log from CockroachDB and resume the exact step within milliseconds.
Unified Data Layer: Successfully consolidated operational transactional data, active agent state, and semantic vector embeddings into a single, globally resilient CockroachDB cluster—eliminating consistency gaps between vector indexes and relational data.
Deep Tool Utilization: Built a project that natively harnesses all four CockroachDB tools alongside multiple AWS serverless services.
What we learned
Agentic Systems Require Relational Guarantees: We learned that unstructured long-term memory (like plain vector stores) is insufficient for production agents. Autonomous agents need ACID transactional guarantees for state tracking combined with vector similarity for semantic search.
The Power of MCP: Integrating the CockroachDB Managed MCP Server showed us how clean and secure client-to-database communication becomes when AI agents can query database telemetry using standard model context protocols.
What's next for Chitin.ai
Multi-Region Active-Active Swarms: Expanding Chitin.ai across multi-region AWS deployments using CockroachDB's geo-partitioning to enable local incident remediation agents with sub-millisecond memory access worldwide.
Self-Expanding Incident Memory: Automatically synthesizing every resolved outage into a new post-mortem embedding, creating a continuously learning, self-healing enterprise infrastructure network.
Community Agent Skills Expansion: Contributing new automated CockroachDB remediation skills back to the open-source CockroachDB Agent Skills Repo.
Built With
- ai-agents
- amazon-web-services
- aws-bedrock
- aws-lambda
- cloudwatch
- cockroachdb
- devops
- eventbridge
- infrastructure-as-code
- mcp-server
- postgresql
- psycopg3
- python
- vector-search
Log in or sign up for Devpost to join the conversation.