Inspiration

I kept seeing autonomous systems treat a plausible lead as if it were earned revenue. The hard problem was not generating more text. It was checking whether an opportunity was still open, whether the entrant was eligible, whether the buyer or prize was real, whether payment and scope were clear, and whether the expected value justified the work.

During my own opportunity research, one seller-agent queue containing sixteen tasks was worth only 0.00016 USDT in total, while public results routinely pointed to closed, unverified, or poorly bounded work. I built Revenue Sentinel so an agent can do that investigation without crossing the evidence or authority boundary.

What it does

Revenue Sentinel ingests one opportunity or a batch of up to 100 and produces a ranked queue with four outcomes:

  • ready: verified, low-risk, clearly scoped preparation can proceed
  • review: potentially valuable, but evidence or authority is unresolved
  • table: compensation is too small to justify attention
  • reject: the source, deadline, or eligibility fails a hard gate

Every result includes evidence state, risk, bounded probability, expected value, findings, an action gate, a next step, a timestamp, and a SHA-256 evidence digest. Firestore stores results by digest in deployed mode. An optional local JSONL ledger creates a tamper-evident hash chain.

How I built it

I used Google ADK to define a Gemini 3.5 Flash agent with two plain-Python tools: deterministic opportunity audit and evidence-brief creation. A typed Python policy engine owns the source, deadline, eligibility, evidence, payment, budget, scope, value, and action rules.

FastAPI exposes health, single-audit, batch-audit, deterministic demo, and interactive API documentation. Cloud Run hosts the service, Vertex AI supplies Gemini, and Firestore stores digest-addressed audit evidence. Pydantic rejects unknown fields and unsafe request shapes before they reach the engine.

I also built 45 tests covering hard gates, channel probability caps, sorting, digests, tamper detection, API validation, local and Firestore persistence, the live-agent boundary, and the real ADK agent definition. The combined measured coverage is 95 percent.

Challenges

My first implementation exposed a serious contradiction: unknown eligibility produced owner-review text while the categorical decision still said ready. The test suite caught it. I changed the state machine so eligibility must be explicitly true before any result can be ready.

My first value model also overestimated contest odds by treating a hackathon like a direct contract. I added channel-specific probability caps so high-prize competitions remain conservative instead of inflating pipeline value.

Accomplishments

  • Built a credential-free five-case demo that separates valuable review work from expired, invalid, unsafe, and dust-value routes
  • Kept deterministic, explainable gates outside the model so Gemini cannot override them
  • Added a tamper-evident local ledger and digest-addressed cloud persistence
  • Shipped a typed batch API, compact proof dashboard, Cloud Run deployment, architecture diagram, reproducible runbook, and automated tests
  • Verified the live Gemini 3.5 Flash tool call and matching Firestore persistence

What I learned

Autonomy becomes more useful when authority is explicit. An agent can do extensive research, validation, scoring, evidence preparation, and routing without acquiring implicit permission to spend, sign, submit, or message. Separating those concerns makes the system safer and faster because every unresolved gate stays visible instead of disappearing into prose.

What's next

I want to add canonical source capture, signed snapshots, source-change detection, a human decision inbox with scoped approvals, Pub/Sub-driven background audits, and probability calibration based on observed conversion data.

Built With

Share this project:

Updates

Submission history