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

# How an AI App Works

> The multi-block pipeline behind every App, and the three things that decide whether an App you trust or one that quietly breaks

A VirtualBrain AI App is a multi-block pipeline. Each block is a separate call to [the Mainframe](/features/mainframe) that produces a text deliverable, such as a report, a scoring grid, a memo, or a comparison table. Blocks run in sequence or in parallel, and the output of one block can feed the next.

Each block runs on an agentic orchestrator. During a run, a block can internally trigger specialized tools and iterate until it has what it needs:

* **Document Retriever**, which searches across [Brains](/features/brains/overview) and uploaded documents.
* **Web Search**, for live external context.
* **Spreadsheet/Excel Analysis**, which runs real code over Excel files, CSVs, and tables inside PDFs.
* **Document Comparison**, which reports what changed between two versions of a document.

The output of a block remains text or tables; the tools are orchestrated invisibly during the run. Several Knowledge Sources, including Web Search, can now be combined within the same block.

## The three things that decide quality

Get these three right and the App holds up across every run.

<Steps>
  <Step title="Architecture">
    The right blocks, each with exactly one objective. A block that tries to do two jobs produces a weaker result on both.
  </Step>

  <Step title="Data flow">
    How inputs, documents, and intermediate results reach each block.
  </Step>

  <Step title="Prompts">
    Short, structured, and focused. See [App Blocks](/features/apps/app-blocks) for how a prompt and its Knowledge Sources combine inside one block.
  </Step>
</Steps>

<Warning>
  **Data flow is the #1 source of broken Apps.** How content reaches each block, injected directly into the prompt or retrieved from a Knowledge Source, decides whether the App is reliable. [Passing Data Safely Between Blocks](/apps-academy/passing-data) is the section that gets this right.
</Warning>

Think of [the Mainframe](/features/mainframe) as a senior partner delegating to specialists: you set the objective and hand over the right materials, and the tools do the retrieval, search, and analysis underneath. Your job as the App designer is to decide what each block works from and how the results travel between them. See [Building Apps](/features/apps/building-apps) for the builder where you configure all of this.

## Next

<CardGroup cols={1}>
  <Card title="Key Concepts and Vocabulary" icon="book" href="/apps-academy/key-concepts">
    The shared vocabulary every prompt and design discussion relies on.
  </Card>
</CardGroup>
