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

# Workflow Executions

> Understand how executions work in Brain Studio and their impact on billing

A **workflow execution** is the main metric unit in Brain Studio. It represents the complete cycle from when a workflow is triggered until it finishes its work, regardless of how many messages are exchanged or how many internal steps are executed.

## Key concepts

### Workflows vs Tools

<CardGroup cols={2}>
  <Card title="Workflow" icon="comments" href="/en/guides/getting-started/tu-primer-workflow">
    Designed to converse with users. Contains message nodes (text, images, buttons) and logic nodes (code, API, conditionals).
  </Card>

  <Card title="Tool" icon="wrench" href="/guides/tools/que-es">
    Designed to execute technical operations. Only contains logic nodes. It does not converse, it only processes.
  </Card>
</CardGroup>

## What counts as an execution?

The rule is simple: **one workflow start = one execution**, regardless of how many internal processes are executed.

<Steps>
  <Step title="Scenario 1: Main Workflow">
    You start a Workflow called "Customer Support". During the conversation:

    * The Workflow exchanges 20 messages with the user
    * Calls a "Check Balance" Tool
    * Transfers to another Workflow "Satisfaction Survey"

    **Result**: one execution
  </Step>

  <Step title="Scenario 2: Independent Tool">
    You directly execute a Tool via API (without going through a Workflow):

    * The Tool performs its calculation and finishes

    **Result**: one execution

    <Note>
      Tools cannot call other Workflows or Tools. They are atomic units.
    </Note>
  </Step>
</Steps>

## What is included in the cost?

### ✅ Included in one execution

* The start of the workflow (Workflow or Tool)
* All internal transfers (Workflow → Workflow)
* The use of internal tools (Workflow → Tool)
* **Unlimited messages** within the same session

### 💰 Billed separately

* **[AI model tokens](/guides/agentes-ia/tokens)**: Natural language processing is billed according to model usage (GPT-4, Claude, etc.)
* **[KYC](/en/guides/integraciones/identidad/index-kyc)**: Identity verifications have an independent cost per validation performed.
* **[Electronic signature](/guides/integraciones/firma)**: Each signature process is billed individually.
* **[Transactional Tools](/guides/integraciones/pagos)**: Tools that perform transactional operations (payments, charges, etc.) have their own rate per transaction executed.

## Practical examples

<AccordionGroup>
  <Accordion title="Customer support flow">
    A user starts a conversation → your "Support" Workflow attends them → calls 3 different Tools (validate user, query history, create ticket) → transfers to "Escalation" Workflow → closes the conversation.

    **Total**: 1 execution
  </Accordion>

  <Accordion title="Multiple conversations from the same user">
    A user contacts you 3 times in the same day:

    * 9:00 AM - Asks about their balance
    * 2:00 PM - Requests a report
    * 6:00 PM - Asks to update their data

    **Total**: 3 executions (each conversation starts a new workflow)
  </Accordion>

  <Accordion title="Direct Tool call via API">
    Your external system calls the "Calculate Discount" Tool 50 times during the day.

    **Total**: 50 executions
  </Accordion>
</AccordionGroup>

## Getting an execution ID

When you start an execution, you receive a unique identifier (`executionId`) that Brain Studio generates automatically. This ID remains constant throughout the entire execution, even if you transfer the workflow between Workflows or call Tools.

You can access it from any node using:

```
  {{$context.executionId}}
```

## Summary

<Tip>
  In Brain Studio, you pay for solving complete problems, not for each step of the process. This lets you create complex workflows and long conversations without worrying about increasing costs.
</Tip>

The execution architecture encourages modularity: you can orchestrate complex workflows (Workflow → Tool → Workflow) without inflating costs, allowing you to focus on creating the best possible experience.

## Related articles

<CardGroup cols={2}>
  <Card title="How billing works" icon="file-invoice" href="/guides/billing/introduccion">
    Key concepts about organization-level billing in Jelou.
  </Card>

  <Card title="Pricing" icon="tag" href="/guides/billing/precios">
    Pricing details for conversations, campaigns, and Connect seats.
  </Card>

  <Card title="Your First Tool" icon="wrench" href="/guides/tools/tu-primer-tool">
    Create your first Tool from scratch and publish it to reuse it in your flows.
  </Card>

  <Card title="Workflows with AI" icon="robot" href="/en/guides/getting-started/workflows-con-ai">
    Configure an AI Agent that collects data from your users.
  </Card>

  <Card title="Context Variables" icon="code" href="/guides/variables/context">
    Access the executionId and other variables available during execution.
  </Card>
</CardGroup>
