# Getting Started with HEAL

**HEAL** is an interface that hardware teams implement to connect with our fully homomorphic encryption (FHE) software stack, giving access to run real AI models on encrypted data.&#x20;

We provide unit tests and runtime tools to help verify correctness and measure performance during development.&#x20;

### Workflow Overview

Follow these steps to integrate with HEAL and run AI workloads using your hardware implementation:

{% stepper %}
{% step %}

### Understand the Architecture

Learn how HEAL connects hardware to the FHE software stack and familiarize yourself with core concepts.

* HEAL uses JSON transcripts containing sequences of commands and encrypted dummy inputs. These transcripts specify the order of function execution and required inputs.
* A runtime script processes these transcripts sequentially, executing each specified action.
* We work with tensors and use the CKKS encryption algorithm. Currently, we use CUDA for parallel processing, but HEAL is built flexibly, allowing any hardware that meets our requirements to easily plug into our system.
  {% endstep %}

{% step %}

### Implement Functions

Check our specification guide for instructions on implementing HEAL functions.&#x20;

* You don't need to implement every function - you can choose which ones work best for your hardware.&#x20;
* We can also work with you to add new functions that match your hardware's capabilities.
  {% endstep %}

{% step %}

### Run Unit Tests

Validate each function with pre-built test packs from our GitHub repository.
{% endstep %}

{% step %}

### Execute Runtime

&#x20;Run your full implementation on encrypted AI inputs to measure actual performance and identify areas for optimization.
{% endstep %}
{% endstepper %}

<table data-card-size="large" data-view="cards"><thead><tr><th></th><th data-hidden data-card-cover data-type="files"></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td>➀ Understand how HEAL works and the terms we use.</td><td><a href="https://72044036-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMRAVIxKQ9hlGIcjpg3pD%2Fuploads%2F05WiSF2mZTE6UWSc9fEo%2FTerms.png?alt=media&#x26;token=136c3979-0a92-4d87-a5e5-218f66becda2">Terms.png</a></td><td><a href="core-concepts-explained">core-concepts-explained</a></td></tr><tr><td>➁ Learn how to implement functions that HEAL expects.</td><td><a href="https://72044036-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMRAVIxKQ9hlGIcjpg3pD%2Fuploads%2FAFxGykkNoaLy6mNGJu0I%2FSpec.png?alt=media&#x26;token=d48abbc0-7592-4c8a-811b-0411f3c2cf06">Spec.png</a></td><td><a href="interface-specifications">interface-specifications</a></td></tr><tr><td>➂ Run unit tests using our GitHub validation packs.</td><td><a href="https://72044036-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMRAVIxKQ9hlGIcjpg3pD%2Fuploads%2F9YXtbi1C9ODo9ecxA3bg%2FunitTest.png?alt=media&#x26;token=7a0ae09c-21e5-44b6-96bd-f2b1a47016fa">unitTest.png</a></td><td><a href="https://github.com/Lattica-ai/heal/tree/main/tests">https://github.com/Lattica-ai/heal/tree/main/tests</a></td></tr><tr><td>➃ Run your hardware-implemented functions on a real AI model through our FHE runtime.</td><td><a href="https://72044036-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMRAVIxKQ9hlGIcjpg3pD%2Fuploads%2FdEN06BrPJONrQ5uKRI2F%2Fruntime.png?alt=media&#x26;token=d8a92289-5749-434e-bf9f-09303768d1d6">runtime.png</a></td><td><a href="https://github.com/Lattica-ai/heal/blob/main/README.md">https://github.com/Lattica-ai/heal/blob/main/README.md</a></td></tr></tbody></table>


---

# Agent Instructions: 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:

```
GET https://healdocs.lattica.ai/getting-started-with-heal.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
