Back to projects

September 2026 hackathon

Relay

A web service where requesters and staff on small design and marketing teams follow a design request from intake to approval in one place.

At the AI HACK hackathon in September 2026, I built Relay, which handles design requests from intake through delivery and approval. Requests are accepted without waiting for AI analysis. The AI only writes summaries grounded in the original text and asks follow-up questions.

Period
2026.09
Format
Hackathon (2 people)
Team
2 people · hackathon team
Role
Built the React UI, the Go API and AI analysis worker, and the PostgreSQL schema in a four-day hackathon, and deployed it.
Tech stack
Go, PostgreSQL, React, TypeScript, River, Cloudflare Tunnel

Accept the request first; let the AI read it afterwards

Relay is a service where requesters and staff handle a design or marketing request on a single request record. Staff set up a request form and an intake link, and requesters submit through that link. Follow-up questions, comments, deliveries, change requests, and approval are all recorded on the same request.

The hackathon theme was "AI agents that make business work autonomous," and the development window was four days. I built the UI in React and TypeScript, the API and AI worker in Go, and the data layer in PostgreSQL, published through Cloudflare Tunnel.

At first, the AI check was part of intake. That meant a slow or failed AI response stalled the request itself. I separated intake from the AI check. Once the required fields are filled in, the request is accepted the moment it is sent.

The AI then reads the request in the background and asks only about information that is really missing. Eight questions is a ceiling, not a target. Answers are optional, and a requester can answer just some of them. While the AI runs, staff can still read the request, talk, and submit deliverables.

Staff can narrow the questions with a "what to confirm with the requester" note on the form (up to 2,000 characters). The note is passed to the AI as business context only; it grants no permissions or actions.

Stop having the AI build task lists; keep only grounded summaries

Staff sometimes saw "The AI could not finish organizing this request." Tracing it, I found that the worker marked the whole analysis as failed whenever the AI produced zero tasks. Even when the follow-up questions were generated successfully, it showed as a failure.

Removing just that condition was an option. But the condition did not match what the screen told people either, so instead of removing it, I redesigned the approach of having the AI build a task list at all.

I stopped AI task generation and had it write only a per-request summary. Each summary item must carry a quote taken from the request, an answer, a comment, a change request, or the delivery text. The server checks that the quote appears in that source and that the summary line matches the quote. If any item fails, the whole output is discarded. Because of this check, summaries become extracts of the original text; a line the AI paraphrased cannot be stored.

matchmatchmismatchmismatchAI writes summaryquote per itemQuote in source?Line matches quote?Save the summaryDiscard all
The check before an AI summary is saved. If any item fails, the whole output is discarded (illustrates the summary design above).

AI output now goes to the request's summary field instead of tasks, and an analysis is no longer marked failed for having zero tasks.

Implementation details
  • Each summary item carries an evidence kind, ID, and quote.
  • Output is discarded if a quote is missing from the source or a line does not match its quote (lines with URLs or dates are discarded too).
  • The summary is rebuilt whenever an answer, comment, or change request arrives.
  • If the underlying facts change while the AI is running, its result does not overwrite anything.
  • Removed automatic task management and manual tasks (the existing tasks table is kept).
The requester's own words become the evidence for AI summaries

AI analysis that always died around 60 seconds

Production logs showed two kinds of failure. Request analysis timed out at about 60 seconds. Weekly summaries returned HTTP 200 but stopped generating at 1,200 tokens.

Both failures were logged as the same error, so a response from the AI router could not be told apart from a failure inside Relay. I first recorded duration, HTTP status, finish reason, and output limit for every AI call, and split failures into six kinds: timeout, output limit, validation failure, HTTP error, connection error, and credentials. API keys, request text, and response bodies are never logged.

Analysis was stopping because the job queue, River, has a default job timeout of 60 seconds. I set the HTTP limit for AI calls to 180 seconds and the whole analysis job to 210 seconds, overriding River's default per worker. The 1,200-token cap on weekly summaries was removed in favor of the output limit set in the operations console (up to 8,000). Truncated output is still treated as invalid, and the report falls back to the aggregated facts alone.

Only the requester's approval completes a request

When staff enter a link to the deliverable, a delivery message drafted by the AI opens. Staff edit it, and only pressing send creates an immutable delivery version and sends the requester a notification and email. If no key is set, the run limit is reached, or the AI fails, staff get an editable template instead and the request state does not change.

The requester reviews the delivery and either requests changes or approves. A change request leads to the next version, and only approval completes the request. Retrying the same send does not duplicate the delivery version or the notification.

Each workspace's AI API key is stored encrypted with AES-GCM, and the read API returns only whether a key is set and its last few characters. Keys never go into prompts, the browser, or job arguments.

Completion is decided by human approval
API keys are stored encrypted and never returned by the API