A brass flip counter on a desk showing the number 3 as its flap begins to turn, with a short stack of envelopes beside it and many more drifting past the window behind.

The Number Should Go Down Too

On December 1st we turned Dash on for everyone who uses Pepper. It came out of a request we’d been hearing since we first launched, when part of our user base kept asking for the agent to be more proactive. I’d seen proactive agents on other platforms, and I wasn’t convinced that people really wanted to trust one to act on their behalf.

Chris and I talked about this a lot, and then Chris went off and worked on a new system for proactivity called Dash. The idea was that it would go through your email and show you what it was doing. Over the weeks we worked on it, we refined it to be both more transparent and more proactive. Chris’s launch post explains what Dash does. This one is about how it works, including a few things we got wrong along the way.

I argued last year that an agent’s freedom depends on its guardrails, and Dash starts with a smaller step. It notices what needs you and lets you decide what to do about it. That’s only useful if it notices in time.

Twice a Day Wasn’t Enough

The original Dash was a batch job that ran at 7 a.m. and 5 p.m. Each run listed the last seven days of your Gmail, and a model decided what needed you and wrote a card for it.

That didn’t feel particularly satisfying for an agentic system, because what happens the rest of the day when new things are coming in to you? If someone needed a decision from you at 9:10 in the morning, Dash wouldn’t know until 5 p.m. You’d still have to watch your inbox in between.

We could’ve run the job more often, but it already cost too much to offer to everyone. So I went to explore two sides of this. One was how to make the whole system cheaper, and the other was how to make it feel instant.

Google Tells Us Something Changed

Flow diagram. Gmail publishes to Cloud Pub/Sub, which calls Pepper's webhook, which writes to a Postgres event log. The Gemini Decision 1 judge reads each message, routing code sends it to the writer or skips it, and Gemini 3.8 Flash writes a Dash card every five minutes. A dashed line shows the six-hour catch-up from Gmail to the log.
How an email becomes a Dash card.

To make it feel instant, we used an event bus. Gmail tells us that something changed, we write that into a log, and anything in Pepper that cares about mail reads from the log. I’d used this pattern before, in Gemini CLI. At a standup in early November, while I was explaining our new push events, I said, “This is how I designed the permissions policy engine. It was an event bus.”

For mail, we use Gmail push notifications on Google Cloud Pub/Sub. We ask Gmail to watch an inbox, and Gmail publishes to a topic whenever that inbox changes. Pub/Sub then calls our webhook with a signed token, and we verify that before we do anything else. Here’s what the notice looks like once it’s decoded.

{
  "emailAddress": "user@example.com",
  "historyId": "9876543210"
}

The notice doesn’t include the message, or even a message ID. It only tells us the mailbox and a point in its history. So we keep a cursor for each mailbox and ask Gmail what changed since the last time we looked. We write the message IDs and labels to a Postgres table, and we never write the content. Each row has a deduplication key, so if we get the same notice twice we don’t create a second event.

We decided early on to use that Postgres table as the bus instead of adding a separate broker. Each consumer keeps its own cursor and failed work is retried. If an event fails five times we set it aside, so it can’t block the ones behind it.

In our November measurements, the median Gmail change reached our log in six tenths of a second, and the 99th percentile was 2.1 seconds. A handler typically picked it up about 40 seconds later, partly because we wait on purpose so that things can settle. Calendar changes go into the same log, but they come through Google’s webhook channels, so mail is the part that runs on Pub/Sub.

Gemini Decision 1 Reads Everything First

Most mail doesn’t need anything from you, and the model that writes the cards is the expensive part of Dash. So before a message gets to the writer, we have a cheaper model read it and judge whether it could matter.

For the judge we use Gemini Decision 1, and it’s working great for us. Most models answer you by generating text. With this one you send typed questions through Google’s Decisions API, and you get back calibrated probabilities with no output tokens at all. We ask four questions about each message in a single request. Was it automated, does it ask you to do something, what kind of mail is it, and should you see it today?

Our first judge was a small general model with a prompt, and at first its numbers looked fine. When it wanted to drop a message, the card writer agreed 96% of the time. But when we looked at 97 messages that had become cards, it would’ve dropped 24 of them.

The reason those numbers looked so good is that most mail is obviously noise, so two models are going to agree on most of it. We’d picked the wrong metric. What we really needed to know was how many cards a person would lose, so we started grading on that. I ran into the same problem when I built a scoreboard for my own agent.

When we graded on lost cards, a later version of the small-model judge lost 11 of 204, and Gemini Decision 1 lost none of the same 204. It was also more conservative about what it skipped, and I’m fine with that, because nobody can tell us about a card they never saw.

The calibrated probabilities also gave us something we could set a threshold on, and that’s hard to do when a model just tells you it’s confident. We fitted ours against 858 graded messages and added a margin, and anything below it goes to the writer.

We don’t let the judge make the final call, though. That happens in ordinary code, and this is a trimmed version of the function.

if judgment.verdict != "drop":
    return WRITER
if judgment.mail_kind == "personal_logistics" or is_reply(facts):
    return WRITER
if thread.writer_entry or thread.card:
    return WRITER
if judgment.mail_kind not in {"marketing", "bot_notification"}:
    return WRITER
if judgment.confidence < policy.min_confidence:
    return WRITER
if in_holdout(facts.message_id, percent=5):
    return HOLDOUT
return SKIP_WRITER

We only skip a message when every check passes. The writer still reads it if the judge is down, if it’s a reply, or if the thread already has a card. We also send the writer about 5% of the mail we’d otherwise skip, so that we keep counting our mistakes in production. An email with instructions hidden inside might shift a probability, but the judge can’t act on those instructions. We made a similar choice with the agent that never merges, which can open a pull request but can’t merge it.

Why We Wait Five Minutes

The writer is Gemini 3.8 Flash. We could’ve run it on every new message that got past the judge. Instead we run it in five-minute batches, so that things that come in together get looked at together.

Mail tends to arrive in bursts. If three messages land in one thread in a couple of minutes, the writer might make a card for the first and then have to change it twice. When we batch them, it reads the thread once, at the newest message, and it sees the other mail that came in alongside it in the same call. If two threads look like the same request, the live pass holds them for the next full scan, which can see everything and group them.

It’s cheaper too, because ten messages in one thread over two minutes can be a single call.

So an event usually gets to us in about a second, the judge sees it in about a minute, and then you get a card within minutes. For email, I think that’s close enough to instant. I’d rather wait a few minutes and get one card that makes sense than get three right away that don’t.

When the Push Doesn’t Arrive

Google’s documentation says that in rare situations notifications can be delayed or dropped. A watch also stops sending updates unless you renew it at least every seven days. If we only had the push, we could miss an email and never know it.

So we don’t count on the push by itself. We renew every watch daily, and every six hours we re-read each account’s history from its saved cursor, so we pick up whatever the push missed. If that cursor is too old for Google to honor, we take a fresh baseline and flag the account for a resync. If a batch fails, we retry it after 30 minutes or leave it for the next scan. If a deploy interrupts a scan, we catch it up afterward.

We kept the twice-a-day schedule too. We send the overnight work through the Batch API at half the standard price. We submit it at 1 a.m. and finish at 6:30, and if the batch didn’t complete something we run it the ordinary way. The 5 p.m. scan is still there for the sources that haven’t moved to events.

A Quarter of Where We Started

We wanted Dash to be something we could give to everyone, so a lot of work went into getting it to a sustainable cost. When we measured it with a small group in November, we’d brought Dash down to about a quarter of its original cost per person. That was before the overnight batches went live.

Thinking tokens were 57% of the original bill. You don’t need that much thought to decide whether an email deserves a card, so we turned the writer’s thinking down.

We also looked at caching. Every call starts with the same long instructions, and automatic caching is supposed to catch that, but it had only caught one of 234 calls. So we moved to explicit caching, where you create the cached content yourself and refer to it. The two changes landed within days of each other, so I can’t tell you how the savings split between them.

We tried Flex inference and it didn’t work for us at all. It’s cheaper if you can wait, and a scheduled scan seemed like work that could wait, so we gave each call 25 seconds. All 69 scheduled calls ran past that and were sent again at the standard price. We took it out four days after it shipped. Our transcription service had its own trouble with Flex. In one day, 338 of the 377 chunks of audio it sent came back as over capacity and ran at the standard price, so we moved that work to the Batch API.

The judge didn’t save us much money either. It skips around 15% of the mail it grades, and by our model that barely moves the total. The reason we keep it is that it lets us look at every message as it arrives. I wrote in August that not everyone needs superintelligence, and Dash runs on a decision model and a fast model with its thinking turned down.

Seventeen Minutes

The live sweep is supposed to finish inside its five-minute slot, and on launch day one pass took about 17 minutes.

The reason was that the sweep went through people one at a time in a loop. That had been fine with a small group. We didn’t lose any mail, but cards were late. We merged a fix the next day that gave the sweep four workers, a time budget, and an order that starts with whoever has waited longest. The overnight batch had a similar problem at its morning finish, and we’ve since merged a fix for that one too.

We’d measured the judge, the cache, and the push latency before launch, but we’d only done it with a small group. We didn’t know how long one pass would take with everyone in it.

Watching the Number

All you see of this is a small number next to Dash in Pepper’s navigation. When a message comes in and the judge passes it along, the writer makes a card and the number goes up. You deal with the card, and the number goes down in every tab you have open. If a card covers several linked things, acting on it settles all of them. If you’ve already replied to a thread, the live pass won’t make you a card for it.

For me that’s the magic of all of this. The number just kind of increases as things need your attention, and it goes away when they don’t. My inbox count has never worked like that.

Choosing What the Model Sees

If you’re careful with data management and context, I think cheaper models will win every time. You do that by managing context, and also by building tools that are deterministic, so that you add intelligence in the right places. In Dash the event log, the cursors, and the routing function are all ordinary code. A model only comes in to judge whether a message matters and to write the card, and we don’t leave it up to chance what it looks at.

I also think Decision models are incredibly useful for a lot of different applications. They’re lightweight, they’re fast, you get structured data back, and they’re really helpful for making quick, intelligent decisions inside your application. Dash is one place we use them, and we’ll have others in Pepper over time.

I Don’t Have to Check My Email

Dash was fun when it ran twice a day, but I treated it a little bit like I treat email. I’d look at it in the morning or the afternoon, and then I didn’t think about it the rest of the day. It was so delightful to see the number incrementing throughout the day the first time I hooked it up to Pub/Sub.

Having it make those decisions right away relieves something I didn’t even really think about. I can just ignore everything else, because I know Dash is looking for the important stuff. I don’t have to go check my email, because I know Dash will catch the things I need to pay attention to. Then sometime later in the day I can go and deal with everything else in bulk.

Hooking up accounts that I don’t regularly monitor is super important here too. Dash can keep an eye on them, and Pepper can get context from them. I have an old Google Voice number hooked up to a consumer Gmail account that I haven’t looked at in years. All of my Gmail accounts are connected to Pepper, and therefore to Dash. When a voicemail came in there for a medical follow-up for a member of my family, I got a Dash card telling me it had happened. I wouldn’t have seen that message otherwise.

I argued in August that the chat box is a detour. A chat box couldn’t have helped here, because I didn’t know there was anything to ask about. I think that makes this feature applicable to a really wide range of people.

Pepper Doesn’t Run on a Heartbeat

A while ago a friend was speculating about Pepper’s architecture and said, “Obviously you’re using a heartbeat as the basis.” I said no. A heartbeat agent wakes up on a timer, looks around, and decides whether there’s anything to do.

The reason I said no, and the reason we don’t use a heartbeat in Pepper, is that increasingly Pepper is event driven. I want Pepper to do the right thing for you when the event happens, not on a schedule. I like this better. Dash still has timers in it. The five-minute sweep groups work that’s already arrived, the six-hour read checks for what the push missed, and the daily scans cover sources that haven’t moved over yet. Mail gets into Dash because something happened to it.

You’ll see more event-driven features in Pepper over time. I’m still cautious about agents that act for people without being asked. But an agent that responds to events, puts a model only where judgment is needed, and leaves the decision to you is something I’m comfortable giving everyone now. All of these come together to make Dash a really interesting feature, and an important one for how we’re developing this platform.

Leave a Reply