# AI & Agents

> The four AI steps, what each one decides, and why none of them needs an API key.

Glow's AI steps run on Gemini models, hosted and paid for by us. There is no API key to find and no contract to sign, so a step works the first time you drop it on the canvas. Prefer your own provider? The [AI connectors](#two-ways-to-run-ai-in-a-workflow) in the Apps menu take your key instead.

Four steps use AI, and they differ in how much you hand over.

  - [Workflow Assistant](/build/ai-features/workflow-assistant): Describe the automation you want and it builds the workflow for you.
  - [AI Prompt](/build/ai-features/ai-prompt): One question, one answer. Classify, summarise or rewrite.
  - [AI Data Transform](/build/ai-features/ai-transform): Pull ordered values out of messy input, one instruction per value.
  - [AI Agent](/build/ai-features/ai-agent): Give it a goal and the accounts it may use, and it works out the steps.

## Which one to reach for

The question is how much judgement the task needs, and whether the answer takes more than one move.

| If you want to                                             | Use                                                         |
| ---------------------------------------------------------- | ----------------------------------------------------------- |
| Build the workflow itself                                  | [Workflow Assistant](/build/ai-features/workflow-assistant) |
| Ask one question and use the answer                        | [AI Prompt](/build/ai-features/ai-prompt)                   |
| Get up to three ordered values from one piece of text      | [AI Data Transform](/build/ai-features/ai-transform)        |
| Let it decide its own next move, and act through your apps | [AI Agent](/build/ai-features/ai-agent)                     |

One step gets mistaken for an AI step because of its name. [Summarize](/build/action-steps/summarize) groups a list and works out a count, total or average for each group. It is arithmetic, not a model. To summarise a piece of writing, use AI Prompt.

### AI Prompt or AI Agent?

This is the choice that matters. Both take instructions in plain language, and they differ in how much you hand over.

|                         | [AI Prompt](/build/ai-features/ai-prompt) | [AI Agent](/build/ai-features/ai-agent)                                             |
| ----------------------- | ----------------------------------------- | ----------------------------------------------------------------------------------- |
| **What it does**        | One question in, one answer out           | A goal in, and it works out the steps                                               |
| **Model calls**         | One per run                               | As many as it decides it needs                                                      |
| **Speed and cost**      | Lowest                                    | Highest, and hardest to predict                                                     |
| **Same input, twice**   | Same shape of answer                      | Can take a different route each time                                                |
| **Can act in an app**   | No                                        | Yes, through the accounts you switch on                                             |
| **Pick the model**      | No                                        | Yes, **Brain (model)**                                                              |
| **Remembers**           | Nothing between runs                      | Across runs, if you turn Memory on                                                  |
| **Ceiling to plan for** | None beyond the run's own limits          | Bounded by your plan's step timeout — see [System Limits](/reference/system-limits) |

Start with AI Prompt. It is one call, it is quick, and the answer comes back the same shape every time. Move to the agent when the work genuinely takes several moves that cannot be planned in advance, or when it has to act in another system to finish.

A prompt that works is easier to fix in six months than an agent that mostly works. [Choosing an AI Step](/build/ai-features/choosing-a-step) sets out what each one gives up in exchange for what it is good at.

### And AI Data Transform, for pulling out values

[AI Data Transform](/build/ai-features/ai-transform) is narrower than either. Write one instruction per value you want — "the customer's full name", then "the plan they asked about" — and it returns an ordered list. Read the first as `{{ N.result.0 }}`, the second as `{{ N.result.1 }}` and the third as `{{ N.result.2 }}`.

Use it when a messy email or form has to become a few values. It takes **three instructions at most**, making one model call per instruction at the same time rather than one after another. For a fourth value, AI Prompt with a described response shape does the same job. Find it in the dock under **Tools → Data → Change**, not in the AI group.

### AI inside a routing step

Two routing steps can use a model for a single rule without being AI steps themselves. In [Conditions](/build/action-steps/conditions#writing-an-ai-condition) and [Filter](/build/action-steps/filter-items#describing-a-rule-in-words), a rule's type can be set to **AI Condition** and the test written in words: "the message sounds like a complaint".

Reach for it only where a comparison cannot express the test. It costs a model call each time it is evaluated: in Filter, that is once per item in the list. It is also a judgement rather than a comparison, so two runs on the same input can differ. [Switch](/build/action-steps/switch) is typed-only.

## Two ways to run AI in a workflow

The four steps above are Glow's own. There is also an **AI** group in the Apps menu holding connectors for the major providers, which you use with your own account. Both can sit in the same workflow.

|             | Glow's AI steps             | AI app connectors              |
| ----------- | --------------------------- | ------------------------------ |
| **Model**   | Gemini, chosen by us        | Whatever your provider offers  |
| **API key** | None                        | Yours                          |
| **Billing** | Your Glow plan              | Your account with the provider |
| **Setup**   | Drop the step on the canvas | Connect the account first      |

Use Glow's own steps unless you have a reason not to: nothing to set up, and one bill.

Reach for a connector when you already pay for a provider, or when a particular model is written into how your team works.

### The providers you can connect

**OpenAI (ChatGPT)**, **Anthropic (Claude)**, **Google Gemini**, **Mistral AI**, **xAI**, **DeepSeek**, **Cohere**, **Llama AI** and **Ollama** all appear under **AI** in the Apps menu.

Each one authenticates with an API key you paste in once, the same as any other app connection. Usage is billed to your account with that provider and covered by your agreement with them. Keys are stored encrypted. See [Credentials](/manage/apps-and-integrations/credentials).

## Choosing a model

Among Glow's own steps, the **AI Agent** is the only one that lets you pick a model, from the **Brain (model)** dropdown in its settings. The rest run on a managed default.

Model names change with each generation, but they sort into families whose trade-off does not move. **Flash** is faster and cheaper; **Pro** reasons better over long or ambiguous input. A new agent starts on Pro, which is the safe choice rather than the cheap one. See [Models](/build/ai-features/supported-models) for which to use where.

## What a run actually uses

An AI step is charged as **model calls**, and the count is something you can read off the workflow before you build it.

- **AI Prompt** makes one call per run.
- **AI Data Transform** makes one per instruction, so three instructions is three calls, made at the same time.
- **An AI Condition** rule makes one call each time it is evaluated. Inside [Filter](/build/action-steps/filter-items#describing-a-rule-in-words) that is once per item, so a hundred-item list is a hundred calls.
- **The AI Agent** makes as many as it decides it needs, and that number varies between runs on the same input.

Volume multiplies all of it. A workflow running a thousand times a day makes the AI Prompt / AI Agent choice a thousand times over. Measuring one representative run before you go live is worth the ten minutes. See [System Limits](/reference/system-limits) for the ceilings on your plan.

## Try it before you trust it

A model gives you an answer whether or not it had enough to work with, so the useful question is never "does it run" but "is it right on the cases I care about".

### Run the step on its own

Select the step and open **Test & Debug**. It runs without the rest of the workflow, so you can iterate on the wording without waiting for a trigger.

### Feed it your awkward cases

Not the tidy example — the email with no signature, the form where somebody typed "n/a", the invoice in a second language. Five real cases tell you more than fifty clean ones.

### Read the output, not the tick

A step that shows green stored _something_. Open the result and check the values are the ones a later step will need, in the shape it expects.

### Then wire up what comes after

Once the answer is stable, connect the steps that read it. Building downstream on an unstable answer means changing both later.

> **Describe the shape you want and the guessing stops.** Both AI Prompt and the
> AI Agent take a **Response shape**, which turns free prose into named fields a
> [Condition](/build/action-steps/conditions) can route on. It is the single
> biggest thing you can do to make an AI step behave like the rest of your
> workflow.

## The wider AI catalogue

Glow's own steps are the start, not the limit. The app catalogue carries hundreds of AI services you connect the same way as Gmail or Slack, and a workflow can chain them: read a document with one, reason over it with a Glow step, store the result in another.

| To do this                                  | Connect one of                                                                               |
| ------------------------------------------- | -------------------------------------------------------------------------------------------- |
| **Semantic search over your own documents** | Pinecone, Weaviate, Qdrant, Milvus                                                           |
| **Turn speech into text**                   | AssemblyAI, Trint, IBM Cloud Speech to Text                                                  |
| **Turn text into speech**                   | ElevenLabs, Amazon Polly, Voicemaker                                                         |
| **Pull fields out of a scan or a PDF**      | Mindee, PDF.co, OCR.space                                                                    |
| **Search the web for an answer**            | Perplexity, Exa, Tavily                                                                      |
| **Generate an image or a video**            | Runway, DreamStudio, Leonardo AI, HeyGen                                                     |
| **Run an open-source model**                | Hugging Face, Replicate                                                                      |
| **Call a provider with your own key**       | OpenAI, Anthropic, Mistral and the rest of the [AI group](#two-ways-to-run-ai-in-a-workflow) |

Search the **[Integrations Directory](https://getglow.ai/integrations)** for the service you already use — it lists every trigger and action Glow supports for each one.

### Retrieval over your own documents

A vector database is the piece that makes "ask a question, get the right passage back" work, and Glow connects to the ones people already run. The shape is two workflows rather than one setting:

### Index what you have

A workflow triggered by a new file reads its text, sends it to your embedding provider, and writes the vector to Pinecone, Weaviate, Qdrant or whichever you use.

### Query it when you need an answer

A second workflow embeds the incoming question, queries the same database for the closest passages, and hands those to an [AI Prompt](/build/ai-features/ai-prompt) or [AI Agent](/build/ai-features/ai-agent) as context.

The reasoning is Glow's; the storage is yours, in a service you control and pay for directly.

For a document that is simply on the web, none of that is needed: point an [AI Agent](/build/ai-features/ai-agent) at the URL and it reads what is there, PDFs and images included, as long as the address is publicly reachable.

## What AI steps cannot see

An AI step reads only what you write into its fields. It has no view of the workflow around it, and nothing reaches it implicitly: a value from an earlier step has to be written in as a placeholder, such as `{{ 3.ret.company }}`.

That is worth knowing before you debug an answer that looks wrong. Nine times out of ten the model never had the information.

## What's Next?

- Start with a single call in [AI Prompt](/build/ai-features/ai-prompt).
- Hand a multi-step job to the [AI Agent](/build/ai-features/ai-agent).
- Pick the right model for the job in [Models](/build/ai-features/supported-models).
