This is a submission for the Agentic Postgres Challenge with Tiger Data
What I Built
The Justice Stabilizer (TJS) is a novel Agentic AI framework designed to solve the problem of unreliable eyewitness testimony—the leading cause of wrongful convictions. My inspiration was the realization that human memory is a 'poor camera' under stress.
TJS transforms the process by replacing flawed memory recall with verifiable, objective cognitive evidence. The system works by forcing the witness into a state of Cognitive Suction—eliminating emotional and sensory distractions (known as Flame Suction) to ensure they focus only on rational structures of the suspect's face.
I used Agentic Postgres to create a Cognitive Memory Vault that manages not just the facts of the case, but the mental pattern of the witness. This allows investigators to query the system based on how the witness's mind worked, which is the key to verifiable evidence.
Demo
Codepen Demo Link
https://codepen.io/nad-Yunny/pen/LEGdvZG
How I Used Agentic Postgres
Postgres is the central nervous system of TJS, acting as the logic engine that allows the AI Agents to reason, secure, and compare cognitive evidence. I leveraged three key Agentic features:
- Vector Embeddings for Semantic Cognitive Search
Jargon TJS: Cognitive Suction Pattern Analysis.
Postgres Use: I used the pgvector extension to enable semantic search on the witness's mental focus patterns. When the Witness Data Stream is processed, the AI generates a detailed text summary of the rational focus (the Cognitive Suction pattern). This text is converted into a vector embedding and saved in a dedicated Postgres column.
Creativity: This allows the investigator to query: "Find all past witnesses who were mentally distracted by complex colors," even if they haven't explicitly mentioned the distraction. Postgres searches for semantically similar gaze patterns across all cases, validating current testimony based on underlying cognitive reality.
- Postgres Triggers for Autonomous AI Agent Activation
Jargon TJS: Flame Suction Processing.
Postgres Use: I utilized Postgres Triggers to manage the Agentic workflow. When a new batch of witness data is completed and entered into the Forensics Log, a Postgres Trigger immediately fires an external function (via Tiger CLI integration) to launch the Cognitive Analysis Agent.
Creativity: This creates an autonomous, event-driven pipeline. The database itself dictates when the analysis of Flame Suction metrics (external noise/distraction) must begin, ensuring that the AI processing is tied directly to the data transaction's integrity.
- Advanced Indexing for Ethical Friction and ZK Proof
Jargon TJS: Ethical Friction (Zero-Knowledge Proof).
Postgres Use: TJS must ethically protect the sensitive raw mental data. To enforce the Ethical Friction mandate, Postgres stores only the final Certified Reliability Score (CRS) alongside a Zero-Knowledge Proof (ZK Proof) hash. We use specialized indexing to ensure the court can only query the CRS Score and the final validated fact, not the raw, sensitive cognitive data. This uses the database layer to enforce ethical boundaries.
Overall Experience
Building TJS with Agentic Postgres was transformative. I learned that Postgres is far more than a simple storage layer; it is a powerful reasoning engine capable of managing complex AI workflows.
What Worked Well: The combined power of Postgres Triggers and pgvector was exceptional. The Triggers created a reliable event queue, and the vector search immediately provided a way to perform semantic verification—a capability traditional SQL databases could never offer.
What Surprised Me: I was surprised by how much simpler the architecture became by letting Postgres handle the orchestration. Instead of relying on complex message queues, the database became the single, secure, and performant command center for every step of the Agentic analysis, truly making it the brain of the system.
This project, The Justice Stabilizer, is being submitted as an Architectural Concept. I used Codepen to demonstrate Cognitive Suction (the AI's capability) and pgvector search to prove the ability of Agentic Postgres to perform semantic searches on mental patterns. Due to data privacy concerns, the project is not deployed on Tiger Cloud, but all its core features are designed to function using Tiger CLI and pgvector.
Top comments (0)