> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ouraicalling.com/llms.txt
> Use this file to discover all available pages before exploring further.

# System prompt vs. flow builder

> Two ways to define assistant behavior — and when to use which

An assistant can be driven in two ways: a **single system prompt** or a **visual flow**. Both use the same voice engine; the difference is how much structure you impose on the conversation.

## Single system prompt

The simplest setup: one prompt describes the assistant's role, knowledge, and rules; one **first message** defines the greeting. The LLM handles the entire conversation freely within those instructions.

**Best for:**

* FAQ and reception assistants ("answer questions, take messages")
* Assistants whose job doesn't branch into distinct phases
* Fast prototyping — you can rewrite a prompt in seconds

**Configuration:**

* **Agent type** — chosen in the Create assistant modal and later under Settings → General (**Single prompt** vs **Conversational flow**). Mode is stored as `flow_json`: `null` = prompt, object = flow.
* **System prompt** — role, tone, rules, and facts. Use **Choose template** on the canvas (Prompt mode) or when creating the assistant. Applying a template copies into the prompt (and optional first message); it does not keep a live link to the template.
* **First message** — the opening line, spoken when the call connects.
* **Greeting mode** — `agent speaks first` (typical inbound) or `user speaks first` (the assistant waits; useful for outbound where the callee says "Hello?").
* **Allow interruption** (`greeting_allow_interruptions`) — optional; default off so the opening greeting plays to the end before barge-in. Separate from conversation-level **Allow interruptions** in Call settings. Ambient/background audio starts after the greeting finishes.
* **Audio greeting** — optionally upload or record an audio file (mp3/wav/ogg/m4a, ≤ 5 MB) that is played verbatim at call start instead of the synthesized voice. It overrides the first-message text; the text is still used as the transcript and as the fallback for chat, voicemail, and when decode/playback fails at call start. Manage it via the `POST`/`DELETE /assistants/{id}/greeting-audio` endpoints or the Greeting card in the editor.
* **Assistant picture** — optionally upload a PNG/JPEG/WebP image (≤ 1 MB; compressed server-side to ≤512×512 / \~400 KB) shown in the product UI instead of the default colored orb. Hover the avatar in the assistant header to upload or replace it. Manage it via `POST`/`DELETE /assistants/{id}/avatar` (not via PATCH).

## Flow builder

The [flow builder](/flow-builder/overview) turns the call into a graph: multiple specialized agents, condition branches, HTTP tools, data-collection steps, transfers, and explicit endings. The engine hands the conversation from node to node.

In the editor, switch to **Flow** (or create with Conversational flow). The **base system prompt** is edited under Settings → General → **Advanced prompt** (and collapsed on the canvas). Agent-node instructions are **appended** to that base — they do not replace it.

**Best for:**

* Calls with distinct phases (qualify → collect data → book → confirm)
* Reliable data capture (names, emails, phone numbers with built-in validation)
* Calls that must branch ("existing customer?" → different paths)
* Transfers with rules (warm transfer to sales only after qualification)

## Which should you choose?

| Situation                           | Recommendation                                                                                            |
| ----------------------------------- | --------------------------------------------------------------------------------------------------------- |
| "Answer questions about X"          | System prompt                                                                                             |
| "Collect a callback number, always" | Flow (a `collect` node validates it)                                                                      |
| "Route support vs. sales"           | Flow (a `condition` node branches)                                                                        |
| "Call an API mid-conversation"      | Either — flows give you `tool` nodes; prompt-only assistants can use [MCP tools](/api/tools-and-webhooks) |
| First prototype                     | System prompt, then graduate to a flow                                                                    |

<Note>
  A flow's `agent` nodes can leave instructions empty — the assistant's system prompt (Advanced prompt) is used as the base. When an agent node has its own text, that text is **appended** to the system prompt, not substituted. Start with a prompt and add flow structure without duplicating the whole persona.
</Note>

## Settings that apply either way

Regardless of mode, every assistant has: engine mode ([pipeline / realtime / half-cascade](/assistants/engine-modes)), model and voice selection, [knowledge base](/assistants/knowledge-base), [conversation-quality settings](/assistants/conversation-quality), recording and consent options, max call duration, idle timeout, and a webhook URL for call results.

**iOS / Android Call Screen Handling** (Settings → Conversation, or the Pre-Call node in the flow builder) lets the agent answer screening services (“Who’s calling?”) with a name, company, and reason, then wait for a human. Stored on `pre_call` and mirrored into `flow_json.pre_call` when a flow exists. On outbound calls the worker runs answering-machine detection — screening prompts classify as `machine-ivr`, then the agent speaks the configured identity reply and waits for a real person before the normal greeting.
