Inspiration

Small independent café owners live inside POS reports, but the software rarely answers the question actually in their head: “Why was the drawer short?” or “Have refunds been unusual lately?” Cafe Copilot turns those operational questions into grounded, plain-language answers.

What it does

Cafe Copilot is a floating assistant inside the Project POS manager dashboard. It:

  • explains sales and cash reconciliation from live, read-only POS data;
  • compares staff performance and accountability;
  • surfaces waste and refund patterns;
  • remembers conversations and durable business notes;
  • retrieves daily summaries by meaning through CockroachDB vector search;
  • creates review-only purchase-order drafts without placing orders or writing to the POS.

Every operational number must come from a live tool result. If the data does not establish a cause, the assistant says so instead of guessing.

How we built it

CockroachDB is the persistent memory layer. Conversations, messages, notes, drafts, and vector-indexed daily summaries live in CockroachDB and are scoped by business, actor, and access mode. Amazon Bedrock powers the conversation loop and Titan embeddings; AWS Lambda hosts the streamed agent backend. The embedded React widget authenticates with Project POS and sends the signed-in user’s Supabase JWT. The backend verifies active owner/manager membership and performs POS reads through that caller’s own Row-Level-Security context.

CockroachDB tools

  • Distributed Vector Indexing: daily summaries use a fixed-width VECTOR column, CREATE VECTOR INDEX, and cosine-distance retrieval.
  • Agent Skills Repo: Cockroach Labs’ official cockroachdb-sql Agent Skill was applied to the memory schema, migrations, and queries during release review. It guided checks for distributed UUID keys, atomic conflict handling, tenant scoping, bounded reads, and execution-plan follow-ups.

AWS services

  • Amazon Bedrock: Claude via Converse Stream for tool-calling conversation and Titan Text Embeddings v2 for semantic memory.
  • AWS Lambda: Node.js streaming backend with bounded concurrency, request deadlines, origin restrictions, body/input limits, and IAM-role-based Bedrock access.

Safety and production readiness

The agent is read-only against the POS. Drafts and notes are stored only in CockroachDB. Requests are authenticated per business; memory queries are parameterized and tenant-scoped; unsupported causal explanations are forbidden. The release has automated tests, staging smoke checks, and a reproducible judge demo path.

What’s next

Add structured request tracing, shared rate limiting, tenant-filtered ANN plan benchmarks at larger scale, and more owner-approved draft workflows.

Built With

  • amazon-bedrock
  • aws-lambda
  • claude
  • cockroachdb
  • react
  • supabase
  • titan-text-embeddings
Share this project:

Updates