Inspiration

Generative AI is powerful because it can interpret natural language, adapt to context, and reason through incomplete information.

But that flexibility creates a problem in systems where facts must remain stable.

An AI agent can produce a plausible answer that was never supported by the original data, reinterpret an established fact, or act on an assumption that sounds reasonable but is not authorized.

That led to the central idea behind E.R.I. Trace:

Adapt the reasoning, not the truth.

E.R.I. Trace explores an architecture where AI agents are allowed to interpret and reason, but they are not given final authority over factual state.

The criminal investigation shown in the demo is not the core product proposition. It is a deliberately demanding test environment containing free natural-language interaction, incomplete information, evidence discovery, multiple users, ambiguous references, multilingual interfaces and actions that sometimes must be rejected.

If the architecture can preserve factual integrity under those conditions, the same pattern could potentially be explored in other controlled workflows.

What it does

E.R.I. Trace separates generative reasoning from deterministic authority.

During case creation, a deterministic Blueprint establishes the structural requirements of the case. A Builder Agent creates the narrative layer with Gemini. A deterministic Validator checks mandatory invariants, and an Auditor Agent reviews the result before the case is frozen.

Once frozen, the original case truth cannot be silently rewritten during the investigation.

During investigation, users communicate with E.R.I. using natural language.

A Gemini-powered Reasoning Agent interprets the request and converts it into a semantic intent. However, the agent does not directly modify the case.

A separate deterministic Authority layer decides whether the requested action is valid, available, already completed, ambiguous, invalid or authorized.

Only authorized actions can modify the shared investigation state.

This means that understanding an instruction is not the same as having permission to execute it.

In the demo, we intentionally make mistakes. We reference an element incorrectly and also attempt to interrogate the deceased victim. E.R.I. understands the requests, but it does not invent evidence or perform impossible actions. The deterministic layer rejects them.

E.R.I. Trace also supports collaborative investigation.

Two users can work on the same case in real time while keeping their conversations separate. Authorized discoveries are stored in a shared client-safe state, while each user's ConversationContext remains isolated by user and case.

The demo shows Device A operating as the Owner in English and Device B operating as a Member in Spanish. Both work with the same factual case while the presentation is localized independently for each user.

A Member can investigate and contribute discoveries, but only the Owner can authorize the final resolution.

The resulting case can also be exported as a client-safe PDF without exposing the protected internal truth.

How we built it

The Android client was built with Kotlin and Jetpack Compose.

Authentication and shared realtime state use Firebase services and Firestore.

The backend runs on Google Cloud Run and uses Python, Gemini and the Google Agent Development Kit.

The architecture separates several responsibilities:

Generation Blueprint → Builder Agent → Validator → Auditor Agent → Freeze

Investigation User → Reasoning Agent → Deterministic Authority → Authorized Operation → DiscoveredState

The Reasoning Agent never becomes the source of truth.

The Authority layer controls mutations.

Protected case truth and resolution criteria remain outside the normal client and reasoning paths.

The Android application receives only client-safe projections of information the user is currently allowed to know.

For collaboration, DiscoveredState is shared between authorized participants, while ConversationContext remains private per UID + caseId.

Realtime activity allows one investigator to see the authorized results produced by another without exposing the other user's private prompts.

Cloud Logging is also used during the demo to show real agent execution, including Gemini interpretation events, requested actions, verification status and generation pipeline activity.

Challenges we ran into

The hardest part was not generating content.

The hardest part was deciding exactly where generative AI should stop having authority.

Natural language creates ambiguity. A user may refer to an object indirectly, misspell a name, repeat an already completed operation or request something that sounds plausible but is not actually available.

Allowing the model to resolve every uncertainty would make the system convenient, but it would also allow the model to manufacture state.

We therefore had to separate interpretation from execution and progressively tighten the boundaries between Reasoning, Authority, Truth, DiscoveredState and ConversationContext.

Multi-user synchronization created another challenge.

Participants needed to share discoveries and operational state in real time without sharing their private conversations. This required treating shared factual state and conversational memory as two different architectural concepts.

Multilingual operation introduced a similar problem: the facts must remain identical even when two users view the same case in different languages.

Accomplishments that we're proud of

The final prototype demonstrates a complete end-to-end flow.

A case is generated through an agentic pipeline, validated, audited and frozen.

Users then investigate through unrestricted natural-language instructions.

Gemini interprets those instructions while deterministic Authority controls whether anything can actually change.

Invalid and ambiguous requests are rejected instead of being converted into invented results.

Two users can collaborate on the same case in real time, using different languages, while maintaining separate conversational contexts.

Shared discoveries synchronize between devices, but terminal authority remains with the Owner.

The final resolution is generated only from information that was legitimately discovered during the investigation, and the resulting expediente can be exported through a client-safe PDF path.

What we learned

The most important lesson from E.R.I. Trace is that controlling AI does not necessarily mean reducing its ability to reason.

Instead, we can control where reasoning has authority.

Generative models are extremely useful for interpreting human intent, adapting language and navigating complex interactions.

Deterministic systems are better suited for enforcing permissions, invariants and state transitions.

Using both together creates a stronger architecture than asking either one to do everything.

That idea became the central principle of the project:

Reasoning is not truth.
Reasoning is not authority.
Generated language is not an authorized mutation.

What's next for E.R.I. Trace

The current investigation scenario is a test bench for the architecture.

Future development could expand the framework to additional controlled workflows, improve observability and auditing, introduce more complex permission models, and generalize the deterministic Authority layer so different domains can define their own policies and state-transition rules.

Potential areas for future exploration include audit workflows, compliance, insurance review, internal investigations and controlled document analysis.

E.R.I. Trace does not claim to currently solve or be validated for those industries.

The hackathon prototype demonstrates the architectural pattern behind them.

Adapt the reasoning, not the truth.

Built With

Share this project:

Updates

Submission history