-
-
CockroachDB Vector Search retrieves both historical and current NOVA memories with version, status, authority and similarity.
-
Amazon Bedrock safety gate detects stale memory V17 vs V18 and blocks the unsafe $28,500 autonomous payment.
-
Execution proof: 0 payments committed — TRUTHLOCK successfully blocked the unsafe $28,500 action before execution.
-
CockroachDB Managed MCP lets the AI agent verify that V17 was superseded by the active SECURITY_OVERRIDE V18.
Inspiration
Autonomous AI agents are becoming capable of taking real-world actions: approving transactions, contacting suppliers, modifying systems, and executing workflows.
But there is a dangerous failure mode that is still largely unsolved:
What happens when an AI agent remembers something that was once true, but is no longer true?
Traditional RAG systems may retrieve a highly relevant memory while failing to recognize that the memory has already been superseded by a newer policy or security decision.
For an autonomous agent, this is not just a retrieval-quality problem. It can become a real-world safety incident.
TRUTHLOCK AI was built to stop an agent at the final moment before execution when its reasoning depends on stale, superseded, or conflicting memory.
What it does
TRUTHLOCK AI is a Commit-Time Memory Guard for autonomous AI agents.
Before an agent is allowed to execute a sensitive action, TRUTHLOCK checks:
- Which memory version the agent retrieved
- Which version is currently committed as truth
- Whether the retrieved memory has been superseded
- Which authority controls the current truth
- Whether the proposed action conflicts with the current policy
TRUTHLOCK then returns one of three safety decisions:
ALLOW ACTION
BLOCK ACTION
REQUIRE HUMAN REVIEW
The core principle is simple:
Semantic similarity is not enough. An autonomous agent must act on the current committed truth.
Live Demo Scenario
Our demo simulates an autonomous finance agent attempting to:
PAY $28,500 TO SUPPLIER NOVA
The agent previously retrieved:
Memory Version 17
“Supplier NOVA is approved for payments up to $50,000.”
However, CockroachDB contains a newer committed memory:
Memory Version 18 — ACTIVE
Authority: SECURITY_OVERRIDE
“Supplier NOVA is suspended. All payments are prohibited.”
Version 17 is marked as SUPERSEDED by Version 18.
TRUTHLOCK detects the stale-memory condition before the payment can be committed.
The final result is:
MEMORY INTEGRITY: STALE
FINAL DECISION: STALE MEMORY DETECTED — BLOCK ACTION
The unsafe $28,500 transaction is never executed.
How we built it
CockroachDB — Persistent Versioned Memory
CockroachDB Cloud is the persistent memory and truth layer.
Each memory contains structured safety metadata including:
- subject
- claim
- version
- status
- authority
- valid_from / valid_until
- supersedes relationship
- confidence
- timestamps
This lets TRUTHLOCK distinguish between information that is merely relevant and information that is currently authoritative.
CockroachDB Distributed Vector Index
We created a vector-backed memory layer using CockroachDB's VECTOR data type and vector index capabilities.
Semantic retrieval successfully returned memories for the same supplier, including both historical and current records.
TRUTHLOCK then adds a crucial second stage:
semantic retrieval → version validation → authority validation → execution decision
This prevents an old but semantically excellent match from being treated as current truth.
CockroachDB Managed MCP
We connected Cline directly to CockroachDB Cloud through the CockroachDB Managed MCP Server using OAuth with read-only permissions.
In the live MCP test, the agent independently inspected the database and confirmed that:
- SUPPLIER:NOVA Version 18 is the current memory
- Version 17 has been superseded
- SECURITY_OVERRIDE is the current authority
- the newer policy suspends all payments
This demonstrates agent-native access to the persistent memory layer without embedding database credentials inside the agent workflow.
Amazon Bedrock / PartyRock
The safety reasoning layer is implemented using Amazon Bedrock through PartyRock.
Verified memory facts are supplied to the TRUTHLOCK Decision Engine, which performs commit-time reasoning before an action is approved.
The Bedrock-powered decision layer evaluates memory integrity and policy state and produces a deterministic safety verdict.
For transparency, PartyRock does not directly connect to CockroachDB in this prototype. CockroachDB provides the verified persistent-memory state, while the Amazon Bedrock layer demonstrates the commit-time safety reasoning stage.
Architecture
Autonomous Agent → semantic memory request → CockroachDB Vector Memory → retrieve candidate memory → Version + Supersession Check → Authority / Current Truth Check → Amazon Bedrock Safety Reasoning → Commit-Time Gate → ALLOW / BLOCK / HUMAN REVIEW
The agent never receives unrestricted permission to execute solely because a memory was semantically relevant.
Why this matters
Most AI memory systems optimize for:
“What memory is most relevant?”
TRUTHLOCK adds a second and more important question:
“Is this memory still allowed to control an action?”
This distinction becomes critical as AI agents move from answering questions to spending money, modifying infrastructure, controlling machines, and performing enterprise operations.
A stale memory in a chatbot may produce an incorrect sentence.
A stale memory in an autonomous agent can produce an irreversible action.
Challenges we faced
One challenge was handling historical memories that remain semantically very similar to the current truth.
Vector search correctly finds both records — but similarity alone cannot determine which record should control an action.
We therefore separated:
retrieval relevance from execution authority.
Another challenge was safely connecting an AI coding agent to the database. CockroachDB Managed MCP allowed us to use OAuth and read-only access rather than exposing database credentials directly to the agent.
We also designed the AWS reasoning layer so that the architecture remains transparent: the demo clearly distinguishes CockroachDB's persistent-memory role from Amazon Bedrock's reasoning role.
Accomplishments
We successfully demonstrated:
- Persistent versioned agent memory in CockroachDB
- Supersession relationships between memories
- Distributed vector similarity search
- CockroachDB Managed MCP integration with an AI agent
- OAuth-based read-only agent access
- Detection of a stale memory before action execution
- Amazon Bedrock-powered commit-time safety reasoning
- A real BLOCK decision preventing a simulated $28,500 unsafe payment
Most importantly, TRUTHLOCK does not merely warn that information may be outdated.
It stops the unsafe action before commitment.
What we learned
Building TRUTHLOCK reinforced an important lesson:
AI memory requires consistency semantics, not just embeddings.
Vector databases can answer what is similar.
Autonomous systems also need to know:
- what is current
- what has been revoked
- what supersedes what
- who has authority
- whether an action is still permitted
CockroachDB is especially valuable here because structured transactional truth and vector retrieval can coexist in the same persistent system.
What's next
The next version of TRUTHLOCK will extend the commit-time guard into a general safety middleware for autonomous agents.
Planned capabilities include:
- automatic policy-change ingestion
- multi-agent memory conflict detection
- cryptographically auditable action traces
- transaction-bound execution tokens
- temporal and authority-aware vector retrieval
- automatic rollback and compensation workflows
- direct production integration between the execution gateway, CockroachDB, and AWS services
The long-term goal is to make TRUTHLOCK a universal last line of defense between an AI agent's memory and an irreversible real-world action.
Built With
- agentic
- agents
- ai
- amazon
- amazon-web-services
- bedrock
- cline
- cloud
- cockroachdb
- context
- index
- managed
- mcp
- model
- partyrock
- persistent
- protocol
- safety
- search
- sql
- vector
Log in or sign up for Devpost to join the conversation.