> For the complete documentation index, see [llms.txt](https://docs.healthuniverse.com/overview/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.healthuniverse.com/overview/building-apps-in-health-universe/developing-your-health-universe-app/streamlit-vs-fastapi-vs-a2a.md).

# Streamlit vs FastAPI vs A2A vs React

Health Universe supports four app runtimes. Each is the right tool for a different job:

* **A2A Agents** — reusable clinical agents and workflows that run inside Navigator.
* **FastAPI** — deterministic Python tools (e.g. calculators) that appear as Navigator tools.
* **React** — bring-your-own-frontend standalone apps with a full custom UI via the typed SDK. **Preferred for real products.**
* **Streamlit** — the fastest path for a simple Python tool or prototype.

***

#### **What is Streamlit?**

Streamlit is an open-source Python framework for building interactive data apps and dashboards with minimal code. It's optimized for rapid prototyping and visualization, making it ideal for healthcare professionals and data scientists who want to quickly turn scripts into shareable web apps.

***

#### **What is FastAPI?**

FastAPI is a modern, high-performance web framework for building APIs with Python. It's built on top of Starlette and Pydantic, offering robust support for data validation, async programming, and integration with backend systems. On Health Universe, FastAPI is the way to ship a deterministic Python tool — a calculator or transform — that Navigator can surface and call as a tool.

***

#### **What are A2A Agents?**

A2A (Agent-to-Agent) agents are specialized applications built using the Health Universe A2A SDK. These agents enable AI-driven workflows with features like document processing, progress tracking, inter-agent communication, and long-running background tasks. They're reusable clinical agents and workflows designed specifically for Health Universe's Navigator platform, and support advanced workflow orchestration.

***

#### **What is the React runtime?**

The React runtime lets you **bring your own frontend**. Instead of a generated UI, you build a fully custom single-page app (React/Vite) or server app (Next.js/Node) and talk to the platform through the typed **`@health-universe/react`** SDK — typed React Query hooks for routines, documents, patients, sources/bundles, chat threads, and clinical tools. It's the preferred runtime for building **real, production clinical products** where you need full control of the user experience. See [Working in React](/overview/building-apps-in-health-universe/developing-your-health-universe-app/working-in-react.md).

***

#### **Side-by-Side Comparison**

| Feature                   | **Streamlit**                              | **FastAPI**                                                          | **A2A Agents**                                                | **React**                                                                      |
| ------------------------- | ------------------------------------------ | -------------------------------------------------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------------------------ |
| **Primary Use Case**      | Simple Python tool / prototype; dashboards | Deterministic Python tools (calculators) surfaced as Navigator tools | Reusable AI-driven clinical agents & workflows                | Bring-your-own-frontend standalone apps (full custom UI)                       |
| **Language / Stack**      | Python                                     | Python                                                               | Python (A2A SDK)                                              | TypeScript / React / Next.js / Node                                            |
| **UI/UX Focus**           | Built-in widgets and layout for rapid UI   | No native UI; surfaces as a Navigator tool                           | Navigator integration with automatic progress tracking        | Fully custom UI — your own design system and routing                           |
| **Data Access**           | Manual file upload and processing          | Inputs passed in by Navigator/caller                                 | Built-in document client with NestJS/S3 integration           | Typed `@health-universe/react` SDK (patients, documents, routines, bundles, …) |
| **Navigator Integration** | Standalone apps                            | Appears as a tool Navigator can call                                 | Native AI workflows + inter-agent communication               | Standalone; can read Navigator threads via the SDK                             |
| **Background Tasks**      | Limited; relies on session state           | Request-response; should return quickly                              | Automatic background job management with progress persistence | Client-side React Query; long work runs server-side via routines/agents        |
| **Deployment Style**      | Static-ish standalone app                  | API-first; runs as a Python service                                  | Workflow-native; designed for Navigator orchestration         | Static SPA (React) **or** Node server (Next.js/Node), auto-detected            |
| **Best For**              | Prototypes, quick data tools, solo apps    | Calculators and deterministic tools for Navigator                    | AI workflows, document analysis, complex healthcare processes | Production clinical products with bespoke UX                                   |

***

#### **When to use each runtime**

**✅ Use A2A Agents when:**

* You are building a **reusable clinical agent or workflow** that runs inside Navigator.
* You need **long-running background tasks** (analyzing large datasets, generating reports, etc.).
* Your workflow involves **multiple agents communicating** to complete a complex process.
* You want **automatic progress tracking**, document persistence, and artifact management in Health Universe threads.

**✅ Use FastAPI when:**

* You are building a **deterministic Python tool** — a calculator, transform, or scorer — that should appear as a **Navigator tool**.
* You want fine-grained control over request/response handling with robust validation (Pydantic).
* Your tool can return a result quickly (Navigator tools should respond within \~15 seconds).

**✅ Use React when:**

* You are building a **standalone product with a full custom UI**, not a single tool.
* You want the **complete clinical data surface** (patients, documents, routines, sources/bundles, threads) through typed hooks.
* You want client-side routing, your own design system, and purpose-built clinical workflows.
* This is the **preferred path for real products**. See [Working in React](/overview/building-apps-in-health-universe/developing-your-health-universe-app/working-in-react.md).

**✅ Use Streamlit when:**

* You want the **fastest path** to a simple Python tool or prototype.
* You need to **rapidly iterate** on a data-driven UI with minimal code.
* You are focused on **visualizing health data or models** rather than building a polished product.

***

#### **Choosing between them**

A quick rule of thumb:

* Need a **product** with a custom UI? → **React**.
* Need a **deterministic tool inside Navigator**? → **FastAPI**.
* Need a **reusable AI agent/workflow**? → **A2A**.
* Need something **quick and Python-only**? → **Streamlit**.

FastAPI and Streamlit are the quickest ways to get a single capability live. A2A is the home for AI-driven, reusable workflows. React is where you build the full clinical product experience on top of the platform's data through the typed SDK.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.healthuniverse.com/overview/building-apps-in-health-universe/developing-your-health-universe-app/streamlit-vs-fastapi-vs-a2a.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
