Flows and agents
The flow holds what a conversation does; the agent decides how it sounds. How the two fit together, and how a flow is structured.
Every conversation on Kilevel runs on two objects. The flow is the logic — what the assistant knows, what it may do, what it must collect. The agent is the persona that carries the flow into a call or chat — its voice, language and knowledge.
Flows
A flow brings together everything the model works from during a conversation:
- Instructions — the master prompt the model follows throughout.
- First message — what the assistant says when the conversation opens.
- Variables — the data the conversation starts with, and the values it collects.
- Tools — the actions it may take: look something up, book, transfer, call your API.
- Structured outputs — the fields extracted once the conversation is over.
Flows are identified by an apiId such as f_sales_voice, which is what the API and
integrations use to refer to them. See Core concepts.
The conversation graph
A flow can be laid out as a graph of states on the canvas rather than one long prompt. Each state carries its own instructions, and dedicated nodes handle the steps that must happen reliably: collecting a value and validating it, transferring the call, starting or stopping a recording, or evaluating what was said and branching on the result. The State Graph section covers every node in detail.
Tip
Keep deterministic steps — asking for an email address, confirming consent — in their own nodes. A dedicated node validates the answer; a paragraph in a prompt only hopes to.
First message
The first message is either plain text, spoken exactly as written, or generated by the model from the instructions and the data the conversation starts with. Plain text is spoken through to the end by default — a caller cannot talk over it — which is what you want for anything that has to be said in full, such as an AI disclosure.
Variables
Data passed in when a conversation starts — rowData on a campaign row or an API call —
is available to the instructions as variables, for example {{contact.name}}. Values the
conversation collects become variables too, and can be used later in the same flow or
handed to tools.
Version history
Flows keep a version history, so an earlier version can be inspected and restored.
Agents
An agent is a personification of a flow: a name, a voice, a language and a knowledge base. One flow can back several agents — the same logic in English and German differs only in voice and language, which is why the two are separate objects.
Agents can be AI or human. For inbound calls an agent can answer AI first, or ring a person first and let the AI take over as a fallback.
Which one do I reference?
Campaigns, API calls and automations reference the flow. The agent determines how that flow sounds on a given line.