## Inspiration

When I was younger, my family went through a legal battle in India that should have been straightforward. We had a good case. What we didn't know was that the lawyer representing us had a quiet conflict of interest: someone in her firm had ties to the opposing party. By the time the conflict came out, it had impeded the case in ways that would take years to recover.

Nobody caught it. Not because the tools didn't exist, but because the process of cross-referencing client relationships and managing the relationships of even one case across an entire firm's caseload was manual, slow, and easy to miss. That case cost my family years. It shouldn't have.

Samaritan was built so that it never happens again.

What It Does

Samaritan is a voice-first AI agent OS for law firms, built on Amazon Nova 2 Lite and Nova Sonic via AWS Bedrock. An attorney speaks a single command, and Samaritan leverages novel AI technology to execute a full trial preparation chain: case lookup, conflict of interest detection across all active firm matters, deadline retrieval, document search, and motion drafting in a single shot.

The conflict detection is the heart of our system. Before any document is drafted, Samaritan cross-references every party in the case against every active matter in the firm. If a conflict exists, it surfaces immediately and is immediately flagged for review.

How It's Built

  • Amazon Nova 2 Lite - reasoning and multi-step agentic tool dispatch via ReAct loop
  • Amazon Nova Sonic - real-time voice output, attorneys interact hands-free
  • Amazon Titan Embed v2 - 1024-dim vector memory for semantic document and case retrieval
  • AWS Bedrock - unified inference layer across all Nova models
  • Guardian Security Layer - 15-category pre-flight threat detection, blocks prompt injection and data exfiltration before Nova is ever called
  • SHA-256 Hash-Chained Audit Log - every action cryptographically logged and tamper-evident
  • RBAC - 6 roles, 9 skills, enforced at code level not policy level
  • Whisper STT - local transcription, audio never leaves the device
  • FastAPI + WebSocket - real-time streaming responses and voice audio delivery to browser

Challenges

The hardest part was making the system feel genuinely agentic rather than just a wrapper. Any LLM can generate a motion draft. What took real engineering was the pre-flight Guardian intercept, the hash-chained audit trail, the role-scoped vector memory, and the multi-step ReAct loop that executes tools autonomously and creates an actionable result while streaming every step to the UI in real time so the attorney can see exactly what the agent is doing and why, so decisions aren’t made without approval.

What I Learned

The most important feature of any AI system deployed in a high-stakes professional environment is not capability; it's the role of accountability. An AI that can draft a perfect motion but can't prove what it accessed, what it decided, and why, is not deployable in a real law firm. Samaritan was built around that constraint from day one. No one needs a technology that complicates their cases.

What's Next

Real case management API integration (Clio, MyCase), PDF document ingestion with chunk-and-embed pipeline, and production deployment with TLS and proper auth

So the firm that couldn't protect my family's case has no excuse anymore.

Built With

  • amazon-nova-2-lite
  • amazon-nova-sonic
  • amazon-polly-neural-tts
  • amazon-titan-embed-v2
  • aws-bedrock
  • boto3
  • chromadb
  • fastapi
  • python
  • react-agent-loop
  • sha-256-audit-chain
  • websocket
  • whisper-stt
Share this project:

Updates