9 min readJust now
–
Press enter or click to view image in full size
Let me be clear from the start: I don’t think AI agents can replace Realtors. My wife is a Realtor, so I might be biased. When I am making one of the biggest financial decisions of my life, I want to talk to an invested human being, not a corporate app. Someone who understands not just the market, but me. Someone who knows that the neighborhood with the great block parties also has that one green space where a Star Wars reenactment happens every Saturday morning at 8:15.
Press enter or click to view image in full size
Simon Pegg and Nick Frost Reenact Scene from Star Wars
But you know what I do think AI can…
9 min readJust now
–
Press enter or click to view image in full size
Let me be clear from the start: I don’t think AI agents can replace Realtors. My wife is a Realtor, so I might be biased. When I am making one of the biggest financial decisions of my life, I want to talk to an invested human being, not a corporate app. Someone who understands not just the market, but me. Someone who knows that the neighborhood with the great block parties also has that one green space where a Star Wars reenactment happens every Saturday morning at 8:15.
Press enter or click to view image in full size
Simon Pegg and Nick Frost Reenact Scene from Star Wars
But you know what I do think AI can replace? Web forms.
I hate web forms. You hate web forms. Tim Berners-Lee, the person who invented the web, hates web forms. All the joy of standing in line at the DMV, except at least at the DMV you can make eye contact with someone and silently communicate your shared suffering. No one wants to look at you when you are filling out a form.
The Problem with Pretty Faces
Chat LLMs are wonderful things. They’re engaging, conversational, and infinitely more friendly than staring at a wall of empty text boxes with little red asterisks demanding your compliance. They can actually listen to what you have to say and translate that into structured information you can feed back into your standard software tools. It’s like having a really good assistant who takes excellent notes during a casual conversation.
But here’s the catch, and it’s a big one: LLMs are Language Models. Not Physics Models. Not Legal Models. Not “Understanding the Fundamental Nature of Reality” Models. They can reflect back at us the language we use to describe physics and law, but they don’t understand the things themselves. At least not yet.
Press enter or click to view image in full size
Mars Attacks!
Think of it this way: they have a gorgeous, engaging face that makes conversation feel natural and human. But the body holding up that face? That’s a little … underdeveloped. They’re incredibly good at sounding right, but if it is your reputation on the line, they must also be right.
Enter BPMN: A map for guiding a conversation
This is where Business Process Model and Notation (BPMN) comes in, and why it matters more than you might think.
BPMN is two things LLMs are not:
Transparent:
- BPMN diagrams are easy to read and understand
- Executable BPMN with Python is also easy to read and understand … and it does exactly what is says it will do.
Deterministic:
- You can specify exact data points to gather. (“Are they already using a Realtor?”)
- You can create gateways that only go down certain paths when relevant. (“Legally, we can’t offer advice if they’re with another Realtor — let’s not waste anyone’s time.”)
- You can build business rules with DMN. (“As of today, we’re only taking clients looking for houses in our service area. Can I refer you to someone?”)
- You can chain many rules and decisions and data points together. BPMN is frequently used to manage complex processes, such as banking, taxes, and government regulations.
- BPMN gives you consistent metrics. (Twenty potential customers are buying, fourteen are selling, and of those fourteen, two are in the final stages of signing a contract…)
The only downside? User engagement in a BPMN process is typically accomplished with …. web forms.
Flipping the Script
Here’s where things get interesting.
Many of the AI agents you’ve heard about rely on the LLM to drive the entire process — making decisions about when to engage you, when to use a tool, when to do the digital equivalent of wandering off to the bathroom for who knows how long. The problem is there’s no real constraint, no guardrails, no skeleton holding everything together.
What we actually need is to apply the LLM where it’s useful — as an interface to human beings. A comfortable, engaging, adaptive, and responsive frontend that’s not in direct control, but rather guided by a deterministic workflow.
We’re effectively constructing a system a bit more like our own human brain — a “team of rivals” that together appears to be one cohesive thing, when in fact it’s a bunch of diverse systems that see the world in very different ways, but provide what appears to be unified single consciousness.
Someday that deterministic backend might itself be some form of advanced AI. But if we want to make predictable, efficient use of LLMs today, we need to give them a backbone — a grounded flow that can direct the conversation, ensure the right things happen, and guarantee we actually reach our goal.
An Example: The Real Estate Intake Process
Let me walk you through a real example, step by step. We’ll provide a link at the end of this article where you can see this process run, and engage with it directly.
Press enter or click to view image in full size
This is a BPMN Diagram we will be running in our example. Read on to see how it works!
Step 1: The Overall Process
Imagine we’re looking at just a small part of the intake process for a real estate agent. What we want here is to define a specific set of questions we need answered. We’re essentially giving the LLM a form we want to fill out, then having it ask the user questions so it can complete that form on the user’s behalf.
Here’s the beautiful part: we can check the form to see how responses are coming back and take control back from the AI once we have the information we need to move on to the next step.
This is a simple example of the first step, but imagine it doesn’t end here. We move on to another form, and another, and another — but only the forms that make sense for this particular person/customer/client. We pass all the context along as we go, so if we already have an answer from a previous conversation, we don’t ask again.
For the user, they’re just having a normal, flowing conversation. For us, we’re guiding them through a very well-defined process that gets us exactly the information we need, and we always know exactly where everyone is in the pipeline.
Let’s break this down step by step. There’s a link at the bottom that will let you try this yourself. You’ll need a Claude API key to make the calls, but otherwise you can just click the play button to start the process.
Step 2: Setting Up a Schema
Press enter or click to view image in full size
We use something called JSON Schema to handle our forms in SpiffWorkflow. It’s a little clunky to write by hand, so we often ask an LLM to help us build it. But it’s incredibly useful — a computer can read this schema on the right, and instantly build the web form on the left, and as you’ll see in a moment, it’s a very useful thing to hand to an AI.
In our first step, we simply create a variable called schema that we can pass into the LLM.
Press enter or click to view image in full size
Step 3: Configuring the LLM
Press enter or click to view image in full size
but the rest is just following the process described above. Build something useful, and let me know how it goes.
Now we send this schema to the LLM with instructions to engage the user so it can complete the form. This involves a little “Prompt Engineering” (forgive the buzzword). We’re using Claude in this example — tool use isn’t standard across all models, but the process is roughly the same.
Setting the system prompt is critical. This tells the LLM what role it’s playing:
system = """You are a friendly and conversational and direct real estate agentYou are honest and up front about being an AI.You only ask one question at a time.Your sole mission is to complete this json schema: """ + json.dumps(schema)
Then we pass in the entire JSON schema we defined earlier.
Setting up the “tools” is where it gets clever. We tell the LLM it has a tool for saving JSON data. We do this so we can capture that data and hold onto it. We’re not really giving it a tool so much as allowing the LLM to have a conversation with more than just the end user — we’re giving it a way to talk to the BPMN model as well; to pass along information it’s collected in exactly the format we need.
tool_description = """Saves responses from the user as json.Use as often as possible to save information, while you continue to ask additional questions.The tool does not provide any information when executed."""
Step 4: Engage the AI
Press enter or click to view image in full size
Here we simply call the Claude API to engage the AI. We could use a local LLM or another system — we’re basically making a standard web request, sending in the information we prepared previously.
When the response comes back, it arrives in multiple parts. One is content to display to the user (the conversational bit). The other is a message for the tool we defined earlier — it’s the data that would be submitted as part of the form.
contents = response.get("content")user_responses = {}is_complete = Falsefor content in contents: # This is a message to show the customer if content["type"] == "text": user_message = content["text"] if content["type"] == "tool_use": # These are the form reponses user_responses = content["input"]["json"]
Step 5: Check the Responses So Far
The message sent to the tool is just a chunk of JSON we can examine. If a response comes back that means we should halt the conversation, we can do so. We can also check whether we’ve gathered all the information we need so far.
if "workingWithAgent" in user_responses: workingWithAgent = user_responses["workingWithAgent"]else: workingWithAgent = False
Step 6: Gateway — What Do We Do Next?
Press enter or click to view image in full size
BPMN Gateways allow us to make decisions. Do we keep on asking questions, or do we have enough information to move on to the next phase?
This is where BPMN’s power really shines:
- If we have all the data, we move on to the next step — whatever needs to happen next in the process
- If there’s a critical response (like the user mentioning they already have a real estate agent), we can provide a friendly message and stop the process. Don’t waste peoples time.
- Otherwise, we set up the next schema (what would have been another web form) and allow the LLM to keep asking follow-up questions, gathering more information naturally
Wrapping Up
So that’s it. If you’d like to see this process run, check out the companion video on YouTube. If you want to try it yourself and make changes — put in your own schema, adjust the prompts — you can do that too.
I’ll say it again: I don’t think these LLMs are a good replacement for people. No matter how good LLMs become, or how well-structured this BPMN process is, there’s no replacement for having a conversation with an expert who really understands you, shifting regulations, changing economies, neighborhood resources, and all the subtle things that make a place a home.
But we can build better tools for ourselves — tools that help keep us on track, remind us where things are in the process, and, most importantly, get the damn web forms out of our lives.
I’m fully ready to leave that behind us as we head into the future.
See it in action in a companion video. Want to try this yourself? You’ll need aClaude API key, then you can head over to our SpiffWorks Editor where we have this diagram up and ready to run, add the key and try things out. Tell us how it goes!