Inspiration
Digital and physical evidence can lose value within minutes because of battery failure, wireless exposure, environmental damage, incorrect handling, or incomplete custody records. We wanted to build a system that helps field investigators identify these risks without allowing AI to replace accountable human decisions.
What it does
Sakshya Rakshak is a forensic decision-support platform for active investigation scenes.
It uses five Gemini agents:
- SOP and Procedure Agent
- Evidence Integrity Agent
- Scene Risk Agent
- Audit and Compliance Agent
- Coordinator Agent
The specialist agents analyze the case in parallel. The Coordinator combines their findings into prioritized recommendations.
Gemini provides advice only. It cannot approve actions, modify evidence state, or change authoritative risk scores. Consequential actions require human authorization and deterministic validation.
The platform also provides:
- Evidence inventory and handling requirements
- Procedural workflow tracking
- Scene and environmental risk advisories
- Chain-of-custody records
- Human approval controls
- SHA-256-linked, tamper-evident audit events
- Clear separation between Live Gemini and deterministic fallback mode
How we built it
We built the frontend with React, TypeScript, Vite, and Tailwind CSS.
The server-side TypeScript API provides:
GET /api/healthGET /api/casePOST /api/agents/analyzePOST /api/actions/approveGET /api/auditGET /api/risk
We used the official @google/genai SDK for secure server-side Gemini integration. Four specialist agents run concurrently, and the Coordinator synthesizes their validated outputs.
Authoritative risk calculations, approval rules, and state transitions are implemented in deterministic TypeScript. Audit events are linked using SHA-256 hashes.
The application is deployed on Google Cloud Run. The Gemini API key is stored in Google Secret Manager and is never exposed to the browser.
Challenges we ran into
The largest challenge was separating AI recommendations from authoritative application behavior. Gemini is useful for contextual analysis, but forensic actions require predictable validation and human accountability.
We also had to:
- Recover agent contracts from Gemini API logs after an AI Studio workspace failed to restore
- Move the recovered work into a persistent GitHub repository
- Prevent browser-supplied prompts and model overrides
- Keep API keys completely server-side
- Distinguish technical guidance from legally binding requirements
- Keep scenario-generated weather and battery data clearly labeled as demonstration data
- Configure IAM permissions for Cloud Run source deployment and Secret Manager
Accomplishments that we're proud of
- Built five specialized Gemini agents with server-owned instructions
- Executed four specialist agents concurrently
- Added Coordinator synthesis with Live Gemini identification
- Prevented AI from mutating evidence or approving actions
- Implemented deterministic risk scoring bounded from 0 to 100
- Implemented human-gated state transitions
- Created a SHA-256-linked, tamper-evident audit chain
- Added deterministic fallback behavior when Gemini is unavailable
- Passed 57 automated checks across the deterministic and live-agent milestones
- Deployed the working application to Google Cloud Run
- Verified a production
LIVE_GEMINImulti-agent response
What we learned
We learned that a responsible agentic system needs more than multiple prompts.
The application must clearly define:
- What AI may recommend
- What only a human may authorize
- What must be calculated deterministically
- What evidence supports every recommendation
- How every consequential action is recorded
- How the system behaves when the model is unavailable
We also learned that API logs, source control, tests, checkpoints, and explicit execution modes are essential when building with agentic development tools.
What's next for Sakshya Rakshak — AI Forensic Decision Support
Next, we plan to add:
- Durable case and audit storage
- Role-based officer authentication
- Signed officer approvals
- Verified legal and procedural content
- Offline-first field operation
- Camera-assisted evidence intake
- Barcode and QR-based evidence tracking
- Secure document and evidence-report generation
- External weather integration with clear source attribution
- Institutional pilots with forensic, legal, and public-safety professionals
- Additional forensic scenarios beyond the current demonstration case
Built With
- agentic
- ai
- api
- artifact
- build
- cloud
- css
- express.js
- gemini
- genai
- human-in-the-loop
- manager
- multi-agent
- node.js
- react
- registry
- responsible
- run
- sdk
- secret
- systems
- tailwind
- typescript
- vite
Log in or sign up for Devpost to join the conversation.