Introduction to AI Agents
Learn more about how AI agents work, what they do and don't do, and how they fit into your existing flows
Overview
AI agents are powerful tools for streamlining your customer interactions and quickly building out complex workflows without any code, but it's important to understand how they work (and their limitations) in order to best make use of their capabilities.
This article is designed to help readers understand the role of AI agents by comparison to a familiar real-world example: a doctor's office.
Whether you're new to AI systems or just starting to design agent-based workflows, this guide will walk you through the key components in a way that’s intuitive, accessible, and grounded in real-world analogies.
The Scenario
Imagine walking into a modern hospital.
When you first arrive, you’re greeted by a triage nurse at the front desk who asks what brought you in today. They don’t treat you or run any tests - they simply decide where you should go next:

Then you meet a clinic nurse who asks questions and runs some general tests, like checking your blood pressure. If your case is simple (say you just have a cold), they may send you off for treatment right away. But if it’s more complex, they’ll escalate you to a doctor:

When you meet the doctor, they ask more targeted questions and order specific tests. Once they know how to help, they write a prescription and send you to the pharmacy:

Between each of these steps, someone helps you navigate the hospital - guiding you to the next room, running the right tests, and ultimately delivering your treatment:

At the end, the pharmacist fills your prescription and hands you the medicine:

Here's what a full flow through a hospital might look like:

In our system, we model AI workflows the same way a hospital organizes patient care. Note the similarities and how each role lines up with its hospital counterpart:

Before we dive into the flow itself, let’s take a moment to see how each role fits into the hospital story.
Key Players
Each role in the hospital has a direct counterpart in an AI workflow:
-
A Routing Agent (like a triage nurse) greets the user and decides where they should begin.
-
The user is sent to a Domain-Specific Agent (like a clinic nurse), who:
- Handles a wide range of incoming requests across areas like support, sales, or product questions.
- May use basic Tools to gather more information.
- Evaluates the situation and chooses the next Action - either handing off to a Flow Step or escalating to a Specialist Agent.
-
A Specialist Agent (like a doctor) handles more complex or specialized needs. They:
- Ask more targeted questions.
- Use specialized Tools to better understand the situation.
- Decide on the most appropriate next Action.
-
The selected Action (e.g. “send to pharmacy” or “initiate test”) is passed to a Flow Step.
-
The Flow Step executes the action - whether that’s filling a prescription, running a test, sending the user to the correct resource, or triggering another system behavior.
Here's the same information in visual form:
Hospital Role | Glassix Role | Purpose |
---|---|---|
Triage Nurse | Routing Agent | Evaluates who you are and directs you to the right place to begin. |
Clinic Nurse | Domain-Specific Agent | Handles simple cases, uses general tools, or escalates to a doctor. |
Doctor | Specialist Agent | Provides in-depth expertise in a focused area and uses specialized tools to decide what should happen next. |
Lab Test / Vitals Check | Tool | Gathers data to help agents make better decisions. |
“Send to Doctor” / “Prescribe Medication” | Action | The decision output - what should happen next. |
Pharmacy / Imaging / Lab | Flow Step | Executes the action: fills prescriptions, runs tests, routes patients, etc. |
Take a moment to familiarize yourself with the big picture, then take some time to explore what each role does in more detail.
Each Role in Detail
Triage Nurse → Routing Agent
The triage nurse is the first person a patient meets when they arrive at the hospital. Their job is to get the patient to the right place as quickly as possible - but along the way, they might answer simple questions like “where’s the bathroom,” or check your insurance details in the system before sending you on.

In our system, this maps to a Routing Agent.

Routing Agents are responsible for starting users in the right part of the flow. To do that, they might:
- Ask lightweight questions to understand intent
- Use tools to verify a user's identity
- Answer very general or common questions directly
If the request is outside their scope, the Routing Agent chooses the appropriate Action - and a Flow Step takes over from there to move the user forward.
Routing Agents are designed to give users a smart first stop, before handing off to more specialized agents when needed.
Clinic Nurse → Domain-Specific Agent
After triage, patients are typically seen by a clinic nurse - someone trained to assess needs, ask the right questions, and perform the right tests to decide on the next step in care. While they don’t perform treatments themselves, they can order tests, access records, and decide what should happen next based on what they learn.

In our system, this maps to a Domain-Specific Agent.

Domain-Specific Agents continue the conversation after routing. They work within a specific context (Support, Sales, etc.), often using the company knowledge base and user data to help decide on a course of action. They will generally also have a set of tools they can use to gather more information.
Like all agents in the system, they don’t carry out the work directly - instead, they select an Action, which is then executed by a Flow Step.
Domain-Specific Agents should be designed to:
- Answer domain-specific questions using your company’s knowledgebase
- Understand what the user is trying to accomplish and move them to the correct flow step
- Use tools to gather more information (e.g. forms, lookups) if needed
- Collect input to pass along in the flow
- Escalate when needed
In many flows, the Domain-Specific Agent is the final decision-maker, guiding the user to a resolution path that Flow Steps carry out. Only complex or highly specialized needs are passed along to Specialist Agents.
Doctor → Specialist Agent
Some situations require deeper expertise than a clinic nurse can provide. If a patient presents with unusual symptoms, needs a complex diagnosis, or requires a carefully tailored treatment plan, they’re referred to a doctor trained to handle that specific kind of case.

In our system, this maps to a Specialist Agent.

Specialist Agents are used for narrow, high-complexity scenarios that require deep domain knowledge, advanced tools, or elevated decision logic. They always appear later in a flow - after a Routing Agent and a Domain-Specific Agent have already gathered context and identified the need for specialized support.
They should be designed to:
- Work within a tightly scoped area (e.g. collections, claims, or order placement)
- Use specialized tools to gather information for specific tasks
- Move users to task-specific flows or flow steps
Like any other agent, Specialist Agents don’t take action directly. Instead, they use all available context to select the appropriate Action, which is then executed by a Flow Step.
Not every flow includes a Specialist Agent. In many cases, the Domain-Specific Agent is enough to guide the user to a resolution, especially if the flow is only handling general support or sales inquiries.
Specialist Agents are useful when a flow is intended to handle complex tasks on its own, like automated filing of insurance claims or updating billing information.
Lab Test / Vitals Check → Tool
Sometimes a nurse or doctor needs more information before they can decide what to do next. They might take your blood pressure, send you for a quick lab test, or ask you to fill out a short intake form. These tools don’t make decisions - they simply provide additional data to help the medical staff make a more informed choice.

In our system, this maps to a Tool.

Tools are resources that agents can use during a conversation to collect more information. A tool might look up a user’s account history, submit a verification check, or prompt the user to fill out a form. Tools don’t determine what happens next - they just help agents make better decisions.
They’re used by agents to:
- Gather information from the user or from external systems
- Confirm facts or perform checks
- Supplement decision-making without taking action on their own
Tools don’t appear on their own in a flow - they’re always used by an agent as part of the decision-making process. Once the agent has the information they need, they select an Action, and a Flow Step carries it out.
Tools make agents smarter - not by expanding their authority, but by giving them better inputs to base their decisions on.
“Prescribe Medication” / “Send to Imaging” → Action
Once a nurse or doctor decides what should happen next, they don’t perform the treatment themselves. Instead, they make a decision - like prescribing medication or ordering surgery - and that decision is passed along to the appropriate part of the hospital to carry out.

In our system, this maps to an Action.

An Action represents the decision an agent makes about what should happen next. It doesn’t do anything on its own - it’s a signal, passed to the flow, that a specific step should be executed next.
Agents select Actions to:
- Send the user to another agent in the flow
- Trigger downstream steps like sending a message or updating a record
- Determine how the conversation should continue
Actions are not something users see - they’re an internal output of the agent’s reasoning. Every Action must be handled by a Flow Step, which actually performs the task.
Think of Actions as decisions, not effects - they’re the bridge between an agent’s judgment and the system’s ability to respond.
Pharmacy / Imaging / Lab → Flow Step
While a nurse or doctor will decide what needs to happen - like filling a prescription or sending a patient to the lab - they don’t carry out the tasks themselves. Instead, another part of the hospital takes over: the pharmacy prepares the medication, the imaging department runs the scan, or the lab processes the test.

In our system, this maps to a Flow Step.

Flow Steps are the parts of the system that execute what the agent has decided. Flow steps don’t make choices - they carry out the Action that was selected by the agent.
Flow Steps are responsible for:
- Performing tasks like sending a message, triggering a webhook, or updating a ticket's fields
- Making API calls
- Routing the user to the next step in the flow
- Opening new tickets
Every Action selected by an agent must be paired with a Flow Step that knows how to handle it.
Flow Steps are the operational engine of the system - they’re what make the decision real. While agents think and decide, Flow Steps do.
Summary: From Hospital to Workflow
In this guide, we’ve used the structure of a hospital visit to explain how AI agent workflows operate - and how each part of the system has a focused role:
- Routing Agents (triage nurses) ask a few quick questions and decide where users should begin.
- Domain-Specific Agents (clinic nurses) guide users through a specific area of the system, helping with most requests in that domain.
- Specialist Agents (doctors) appear later in the flow to handle more specific, narrowly scoped scenarios.
- Tools (lab tests, vitals checks) help agents gather more information before making a decision.
- Actions (treatment decisions) are the outcomes of an agent’s reasoning - what should happen next.
- Flow Steps (treatment delivery) are where the system actually performs the work, based on the agent’s decision.
Always remember:
Agents decide → Flow Steps deliver.
Updated about 11 hours ago