# Build AI Agents

An **AI Agent** is an automation that follows one of your insurance business processes — submission intake, claim indexing, COI creation, and so on. You build an AI Agent by defining a **flow**: a trigger that brings work in, followed by the nodes that classify, extract, match, route, review, and write back each case.

This section walks through creating, configuring, testing, and publishing AI Agents. This page gives you the overall model and lifecycle; the pages it links to cover each step in detail.

## The AI Agent lifecycle

Most teams build an AI Agent by moving through these steps. You can return to any step and revise as you go — the flow stays a draft until you publish it.

1. **Define the business process.** Decide what the agent should do: what comes in, what decisions it makes, what it writes back, and when a person should review. Starting from a use-case template gives you a working baseline for a common process.
2. **Create or select a flow.** Start an AI Agent from a use-case template or build one from scratch. See [Create an AI Agent](./create-agent.md).
3. **Configure a trigger.** The trigger starts the flow and brings in the initial input. See [Configure triggers](./triggers.md).
4. **Compose nodes.** Add and connect the nodes that do the work, configuring each node's inputs and settings. See the [Node catalog](./node-catalog.md).
5. **Configure required outputs.** Set the fields and results the flow must produce so downstream nodes — and your systems of record — receive what they expect.
6. **Select an environment.** Choose the environment the flow runs in. Environments and the variables resolved within them are covered in [Configure environments and variables](./environments-variables.md).
7. **Run the draft.** Execute the draft against sample input to test and debug it before it goes live. See [Test and debug a draft](./test-debug-draft.md).
8. **Inspect runs.** Open run history from the builder to see how a run executed, node by node, and confirm the results.
9. **Publish.** Publish the current draft so it runs in production. See [Drafts and publishing](./drafts-publishing.md).

## Nodes are the primary building block

Bevaya is node-based. Rather than turning on features, you compose **nodes** into a flow, and the behavior of the agent emerges from the nodes you choose and how you connect them. Classification, extraction, matching, routing, human review, and system write-back are all outcomes of nodes working together.

Each node is a configurable step with **inputs**, **configuration**, and **outputs**:

- The **trigger** runs first and injects the initial input — a document package, an email and its attachments, or another event — into the flow.
- Each subsequent **node** reads from the data available to it, does its work, and produces outputs.
- **Downstream nodes consume the outputs** of the nodes before them. Connecting nodes is how data flows from one step to the next, so the order in which you place and connect nodes determines how a case is processed.

## Node categories

Nodes are grouped into categories. Each category has its own reference page describing every available node, its inputs, outputs, and configuration:

- **Triggers** start a flow and bring in the initial input. See [Configure triggers](./triggers.md).
- **App integration nodes** connect to external systems — for example, creating, searching, and updating claims in your core system, or working with email. See [App integration nodes](./app-integration-nodes.md).
- **Utility nodes** handle common building-block tasks such as file preprocessing, field validation, making API requests, running custom code, and flagging an item for human review. See [Utility nodes](./utility-nodes.md).
- **Action nodes** complete work within Bevaya, such as marking an item complete. See [Action nodes](./action-nodes.md).
- **Control nodes** direct the path of a flow with conditional branching, multiple-condition branching, and loops. See [Control nodes](./control-nodes.md).
- **InsurGPT nodes** apply Bevaya's insurance-trained intelligence for tasks like document segmentation, extraction, and insights. See [InsurGPT nodes](./insurgpt-nodes.md).

The [Node catalog](./node-catalog.md) lists every node across all categories in one place.

## Working in the builder

While you build, a few controls in the builder are worth knowing:

- **Draft.** Your edits are held in a draft. The builder shows the draft's state, including when changes are synced.
- **Version selector.** Lets you select the version you're viewing, including the current **Draft**.
- **Environment selector.** Lets you choose the environment to test, run, or publish against.
- **Run Draft.** Executes the current draft so you can test and debug it before publishing.
- **View Runs.** Opens run history so you can inspect how runs executed.
- **Publish.** Publishes the current draft so it can run in production.

## Where to go next

- [Create an AI Agent](./create-agent.md) — start from a template or from scratch.
- [Configure triggers](./triggers.md) — choose and set up how a flow starts.
- [Node catalog](./node-catalog.md) — every node, by category.
- [Configure environments and variables](./environments-variables.md) — set the runtime context.
- [Test and debug a draft](./test-debug-draft.md) — run a draft against sample input.
- [Drafts and publishing](./drafts-publishing.md) — publish a draft to production.
