Inspiration

The hackathon's framing stuck with us: "an agent whose memory goes offline doesn't degrade gracefully, it stops." Most AI copilots built on top of sensitive workflows — fraud review, compliance, investigations — are stateless. Every case gets judged from a blank slate, and there's no way to check whether the model's confidence is backed by anything real. We wanted to build something where that wasn't true: an agent that remembers, cites what it remembers, and keeps working even when part of its memory layer fails.

What it does

CaseMind is an AML/fraud case-investigation copilot. A case narrative comes in — via API or a live frontend — and CaseMind:

  1. Retrieves semantically similar prior cases from CockroachDB using Distributed Vector Indexing (VECTOR(1536) + the <-> operator).
  2. Reads the entity's own decision history through CockroachDB's Managed MCP Server (select_query tool), with an automatic, logged fallback to direct SQL if that call fails for any reason.
  3. Feeds both into Amazon Bedrock (Claude Haiku 4.5) for reasoning, using Titan Embed Text v1 to generate the vectors behind step 1.
  4. Writes the decision back to CockroachDB along with the exact case IDs that informed it — so the reasoning is auditable after the fact, not a black-box output.

How we built it

The whole loop runs inside a single AWS Lambda function, triggered either by an S3 event or a synchronous API Gateway POST /cases call. Infrastructure is provisioned with Terraform. CockroachDB Cloud (Standard plan) holds the structured case/entity/decision tables, the vector index, and serves MCP-based reads. A Lovable-built frontend calls the live API directly and visualizes the retrieval → reasoning → decision pipeline in real time, with evidence citations highlighted inline.

We also built a 5-archetype memory ablation test: each case (structuring, shell-company layering, trade-based laundering, and two benign patterns) was run twice against the same live model — once blind (no retrieval) and once informed (real vector search + real entity history) — for 10 live Bedrock calls total. Blind and informed reasoning agreed on the decision 5/5 times, but 100% of informed runs cited real evidence versus 0% of blind runs, because blind reasoning has nothing to point to. That told us something specific: memory's value here isn't flipping the verdict, it's making the verdict checkable against real rows instead of an assertion.

We took the "memory that never goes down" framing literally and tested it: agent/resilience_monitor.py forcibly severs a live database connection mid-session and verifies the client recovers and keeps serving requests, backed by continuous health checks against the production cluster.

Challenges we ran into

  • Honesty about scope. CockroachDB Standard is fully managed and multi-tenant — it doesn't expose per-node or per-region control to a customer. So we couldn't test literal region failover, only application-layer connection resilience. Rather than imply something we hadn't built, we disclosed this limitation directly in the README and scoped our resilience claims to what we actually tested.
  • MCP authorization. Getting the MCP service account cluster-level SQL access required a manual console step (Service Accounts → Edit Roles) that wasn't reachable through the Cloud API — we built and shipped the full MCP integration with a safe, logged SQL fallback before that grant was even in place, so the agent loop was never blocked on it.
  • A $3 budget, for real. We enforced a hard AWS spending cap using an automated IAM-deny Budget action, not just an email alert — meaning a runaway cost would be blocked automatically, not just flagged after the fact.

Accomplishments we're proud of

Every claim in our tool-usage write-up is something we independently verified against the live, deployed system — real API calls, real database rows, real audit logs — not just described in a README. The ablation results are unedited, un-cherry-picked output from actual model calls.

What we learned

That "agentic memory" is easy to claim and hard to prove. The useful version of memory for an agent like this isn't just retrieval — it's retrieval plus a fallback plan plus a way to independently verify, after the fact, that the retrieval actually happened and actually mattered. Building the ablation test taught us that memory's real contribution is often subtler than "better answers" — here, it was auditability.

What's next

An interactive audit trail in the frontend (click a decision, see the exact retrieved cases and history behind it), broader case-type coverage beyond our five tested archetypes, and surfacing the resilience/fallback metrics directly in the UI instead of only in logs.

Accomplishments that we're proud of

Every claim in our tool-usage write-up is something we independently verified against the live, deployed system — real API calls, real database rows, real audit logs - not just described in a README. The ablation results are unedited, un-cherry-picked output from actual model calls: 5/5 archetypes where blind and memory-informed reasoning agreed on the decision, and 100% of memory-informed runs citing real evidence versus 0% of blind runs. We also proved the resilience claim rather than asserting it - forcibly severing a live database connection mid-session and confirming full recovery.

What we learned

That "agentic memory" is easy to claim and hard to prove. The useful version of memory for an agent like this isn't just retrieval — it's retrieval plus a fallback plan plus a way to independently verify, after the fact, that the retrieval actually happened and actually mattered. Building the ablation test taught us that memory's real contribution is often subtler than "better answers" — here, it was auditability. We also learned the value of disclosing scope honestly: CockroachDB Standard doesn't expose region-level control to customers, so rather than imply a capability we hadn't built, we stated that limitation directly rather than let a judge discover it.

What's next for CaseMind

An interactive audit trail in the frontend — click a decision, see the exact retrieved cases and history that produced it. Broader case-type coverage beyond the five archetypes we tested. Surfacing the resilience and MCP-fallback metrics directly in the UI instead of only in logs. And, if we move beyond hackathon scope, testing true multi-region resilience on a Dedicated CockroachDB cluster — something we deliberately didn't claim here since it wasn't something we could verify within this project's budget and timeline.

Built With

Share this project:

Updates

Submission history