Skip to content
prem.shah
All writing

Opinion· 3 min read

Your AI problem is actually a state machine problem

The most useful thing we did when building Signal came before any AI: mapping every state a lead can be in. That one diagram made everything after it simpler.


When people ask how Signal works, they expect the answer to be the AI. It isn't. Signal, the GTM outreach engine I lead, took sales reps from reaching about 12 accounts a month to about 115, and the AI that writes its emails is a few hundred lines of code.

The most useful thing we did came before any of that code: we drew the states.

Draw the map before you build

A state is simply where something stands right now. A lead can be new, contacted, replied, interested, qualified, in a meeting, won or lost. It can also drop out along the way: the email bounced, they weren't interested, or they asked not to be contacted.

Before building anything substantial, we mapped every state a lead can be in and every way it can move from one to the next. It took a few rounds to get right, but the result was a single diagram of the entire sales process, from first email to signed deal.

That diagram became our shared mind map. Everyone, from engineers to sales leads, could point at the same picture and agree on what should happen next.

Why it makes everything simpler

Once the states are clear, every feature becomes a question about the map:

  • What should a rep do today? Whatever moves their best leads forward. Signal ranks each rep's list by how well a company fits, where each conversation stands, and how interested the last reply sounded. Leads waiting on a reply come first; finished ones drop away.
  • When should we follow up? When a lead has sat in one state for too long.
  • What goes into the CRM? The moves between states, and why they happened.
  • What is the AI allowed to do? Only suggest moves the map allows.

Instead of building features one by one and wiring them together later, everything hangs off one model. New features slot into the map rather than fighting it.

Customers can read it too

A state diagram isn't just an engineering tool. A sales leader can look at one and say "that's not how we work", which is far cheaper to hear before you build than after.

It also shows you where the gaps are. When we mapped what happens after a lead is qualified, the diagram made it obvious where knowledge was being lost: in the handover from inside sales to the technical sales reps. That gap became the next phase of Signal.

Where the AI fits

The AI writes the emails, reads the replies and debriefs reps after meetings. It never decides on its own what happens next.

When a reply comes in, the AI sorts it into one of the outcomes on the map and scores how interested the person sounds. After a meeting, it can only suggest a next step the map allows from where the deal is now.

The AI proposes. The state decides.

So what?

If you're building with AI, draw the states first: what can happen to a customer, in what order, and who is allowed to make it happen. Then add the model where judgement or language actually help.

A great prompt on a broken state machine is a confident mistake, at scale.

AI is the feature. Plumbing is the product.

  • #AI engineering
  • #State machines
  • #Product