Relationship Agent: From prototype to Gmail discovery

Week one got me a working app and a Gmail connection. Finding the people I actually wanted to stay in touch with was harder, and I learned a few expensive lessons about building with AI along the way.

Share
Relationship Agent: From prototype to Gmail discovery

Build Note 1 | October 26–November 1, 2026

This is part of my Relationship Agent Build Notes series. Start with Entry 0.

I spent a lot of time looking at the personal CRM space. I found products that were interesting, and I could see why somebody would use them. They just seemed to be solving a different problem than I wanted to solve. I wanted something that could work out who mattered to me regardless of how often I actually spoke to them. I wanted it to learn how we knew each other and whether there was a good reason to reconnect, largely from information that already existed. I didn't want another contact database to build and maintain.

Maybe someone had built what I was looking for and I just hadn't found it. Or maybe nobody had built it because the problem was much harder than I understood. I wasn't sure it was possible, much less whether I could build it without being a software engineer. That's where I started.

By the end of the first week, I had a working application connected to my Gmail account. I also had a fairly clear demonstration that connecting to the data and making sense of it were two different problems.

Week 1 activity Count
Pull requests merged 6
Issues opened 9
Issues closed 5
Hands-on build sessions ~7

Milestone: First read-only Gmail connection and live relationship-discovery experiment.

Getting an application running

The first version was a small Next.js application built with React, TypeScript and Tailwind. It had a dashboard, individual profiles and five fictional contacts. GitHub Copilot handled much of the implementation through issues and pull requests. ChatGPT helped break the work into steps, inspect the results and figure out what to do next. I made the product decisions and tested the application.

The prototype was useful because it established a workflow. I could define a feature, have an agent implement it, and then work through testing and reviewing the pull request with ChatGPT. It didn't tell us whether the underlying product idea worked. Fictional contact records will behave pretty much however you want them to.

Ultimately, I want this thing to work across all the channels I use to communicate with people: email, LinkedIn, text messages, WhatsApp, and eventually calendars and meeting notes. But connecting everything at once would have been a project of its own. Gmail was the easiest place to start. It gave us years of correspondence and an API we could use to test the idea with real data before taking on the other integrations.

The first meaningful technical hurdle was connecting Gmail. We used Google's OAuth authorization flow with PKCE and state validation, requested the read-only gmail.readonly scope and handled credentials through encrypted, HTTP-only cookies. The initial integration looked only at message headers and metadata, not email bodies. I could authorize access to my own account and see the application working with real correspondence, without making a broad copy of my mailbox.

I was also learning the best way to manage the tools I’m using to write and run code. The application ran in GitHub Codespaces, while I was controlling it from my Mac. Starting a Codespace, updating the right branch, running the server, forwarding a local port for the Google sign-in callback and shutting everything down were all separate tasks. We spent a surprising amount of time on that plumbing before adding scripts to make starting and stopping the environment repeatable. That took most of a Sunday, in between watching the Dolphins lose again.

Then there was the economics of the tools. Around the end of the week, we used up essentially a month's allowance of Copilot code-review credits in a day. We'd been treating an AI review as a routine step for almost every change. It turned out ChatGPT could inspect the diffs and handle the ordinary review work well enough for our purposes, so we changed the division of labor. Copilot remained useful for implementation; ChatGPT took on most of the iterative review and diagnosis. I'm still learning the most efficient combination of tools, and the cost of a workflow isn't always obvious until you run it a few times.

Finding the wrong people

Once Gmail was connected, the product had to identify people I might actually want to stay in touch with. Our first discovery pass sampled a limited set of messages across roughly ten years, using metadata to rank possible relationships. The results weren't great. Transactional senders, automated messages and other high-volume correspondence competed with people I knew were important to me.

The application was technically doing what we'd asked. The problem was that the sample and ranking logic reflected a poor model of what makes a relationship meaningful. Someone who sends a lot of email is not necessarily important. Someone who mattered a lot at an earlier point in my career might appear only occasionally in a recent sample.

We worked through several iterations. We started with mail I had sent, spread the sampling across quarters and then added broader monthly coverage, limited incoming-message enrichment and filtering for bulk mail. Each change had a tradeoff: Gmail requests and processing time were bounded, so sampling more deeply in one place meant looking less broadly somewhere else.

One of the more useful additions was a positive-control diagnostic. Instead of just looking at a poor list and guessing why it was poor, I could nominate a person who should be found. The diagnostic would tell us whether that person had been sampled, excluded by a filter or simply ranked below the visible cutoff. In one test, a meaningful contact was present among 42 candidates but ranked twelfth, just outside the ten the interface displayed. That was a different problem from failing to find the person at all, and it suggested a different next experiment.

I ended the week knowing a lot more about how to operate the development process, and with a real application that could connect securely to Gmail and produce a candidate list. I had not established that it could understand a relationship, or even reliably identify the right people. The first week showed that I could direct the construction of working software. Whether I could build the software I actually wanted was still an open question.

Read more