Tarun Upaday.

Projects

A few things I have built.

Some came from work. PillWatch began with a camera and a student's question. The rest of my code is on GitHub.

TraceGuard

State-based runtime verification for tool-using AI agents.

Agents can report success even when a notification, booking, or payment never lands.

TraceGuard gives each task a completion contract: the external states that must exist when the work is done. After the agent runs, TraceGuard checks those systems.

In the first synthetic trace, the agent and its self-check reported completion. The contract caught a missing traveler notification. The research page has the trace and the current boundary of the work.

Agent reports “done”, self-check passes Completion contract states that must hold if done is true External systems booking record: present payment reference: present traveler notification: missing contract violated

Deterministic Offload

A replay test for moving repeatable decisions into code.

Some agent decisions are simple rule application. Sending those decisions through a model adds cost, latency, and drift. Mine flagged a $251 charge as material two days after silently archiving a $1,066 one, using a test I never wrote.

I built a replay method for deciding when code can take over. It tests logged decisions against the operator's corrections, uses separate error bounds for each class, and refuses when the evidence is thin. I submitted the method to TRACER, an open-source routing library, and wrote it up as a preprint while the arXiv submission awaits endorsement.

In my stack, six written rules matched every corrected decision they covered. The model missed three. Those calls now run as code, with the model's agreement logged for later review.

Decision arrives message routing Rules, as code replay-certified, per-class bounds Covered: code decides model agreement logged as evidence Uncovered: model decides judgment stays with the model

gsuite MCP

A local-first MCP server for operating multiple Google Workspace accounts through one explicit interface.

My agents use it to search and read mail, hold drafts for approval, send, schedule, write calendar events with Meet links, check free/busy, update sheet ranges, and file documents in Drive. It also covers Chat, Docs, and Contacts.

Every call names its account. Work and personal use separate aliases and OAuth clients, which keeps an agent from acting in the wrong mailbox. Deletes go to recoverable Trash.

Agents Claude, Codex gsuite MCP account: work | personal every call names its account Google Workspace Gmail · Calendar · Drive · Sheets Docs · Chat · Contacts

Google Flights Policy Recommender

An MCP server for corporate-travel-policy-aware flight search.

It searches Google Flights, checks each option against the company's travel policy, and labels it in-policy or out. Results rank by traveler preferences such as nonstop travel, airline alliance, price, duration, and red-eye avoidance.

The policy check runs during search. A traveler, or an agent booking on the traveler's behalf, starts with choices that already fit the rules.

The hosted version returns ranked choices and sends the traveler to Google Flights. A browser-driven version stops at the payment step. It does not buy a ticket.

Traveler / Claude MCP server policy + preferences (Cloud Run) Google Flights search results Policy engine in / out of policy Ranked, labeled results → Google Flights to book

PillWatch

I mentor four high school students building PillWatch, with faculty guidance from the JHU EEHPC Lab. A Raspberry Pi 5 camera reads a 21-cell pill organizer on device. A 99 percent per-cell classifier reads the whole box correctly only 81 percent of the time, so the team measures reliability across the whole box.

The team built its own data pipeline. A browser app on the Pi captures rig photos with a live preview, then pushes photos and labels to the repository every hour. Captures follow a condition checklist, with separate sessions for rare conditions. The set now has 159 photographs, including 50 fully labeled images and 1,029 labeled cells.

A raw capture from the PillWatch Raspberry Pi camera rig: the 21-cell pill organizer photographed from above

A raw rig capture, as pushed to the data repository. Shot on the Pi's IMX708 camera.

The difficult cases separate the models. On deliberately camouflaged pills, a transfer-learned YOLO holds 87.5 percent while the classic baseline falls below 40. A reference-conditioned CNN leads overall at macro-F1 0.81 with 80k parameters. Splits are by photograph, so cells from the same image never appear in both training and test data. The set is being prepared for public release with a datasheet and DOI.

Pi camera weekly pillbox photo, on demand CNN model on-device inference 7 days × 3 periods status grid, browser

Network, cameras, and automation

My home network and cameras are useful because they fail in ordinary ways. I use them to understand what happens when several products, protocols, and failure modes meet.