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

# Getting Started with Lattice

> Turn rows of people and companies into one connected graph that resolves identities and maps the relationships between them.

Lattice turns rows of people and companies into one connected graph. Every person, email, phone, company, place, profile and IP address in your data becomes an entity, linked by relationships such as "works at" or "has email".

> [!NOTE]
>
> Lattice is in beta. It is available to Enterprise customers and is enabled on request. [Talk to sales](https://cal.com/team/sixtyfour/discovery) to turn it on for your organization.

It does two things a spreadsheet can't:

* Resolves the same person across records. An email, phone, profile URL or domain that appears in several rows becomes one entity, so those rows connect through it. Lattice merges two people when the evidence shows they are the same person, such as a shared email. When it isn't sure, it asks you under **Same entity?** instead of guessing. It never merges people on name alone.
* Maps relationships. Select any entity to see everything connected to it: who shares a phone, an employer, a city or an IP address.

## What it's built for

* Mapping connections. See everything tied to a person, company, email or phone across all your records, and who else shares it.
* Finding clusters and rings. Find groups of "different" accounts that reuse the same phone, email, address or IP address. Use it for fraud checks, duplicate cleanup and vetting.

## Build your first graph

You build graphs in [workflows](https://docs.sixtyfour.ai/guides/building-workflows.md), by adding a Knowledge Graph block to the end of a workflow.

1. Open [Workflows](https://app.sixtyfour.ai/workflows) and open a workflow that produces rows of people or companies. To start a new one, add a source such as Import Data or Search.
2. Add **Knowledge Graph**, under **Send Results**, as the last block and connect it.
3. In the block, select **Create a new graph…** and type a name, such as `software-engineers-in-sf`. To add this run to a graph you already have, select that graph instead.
4. Select **Run workflow**, check the cost estimate, and start the run.
5. When the run finishes, open [Lattice](https://app.sixtyfour.ai/lattice) in the sidebar and select your graph's card.

![Knowledge Graph block at the end of a workflow](https://mintcdn.com/sixtyfour/Q-DmdzWXaUc2TwK8/images/lattice-knowledge-graph-block.png?fit=max\&auto=format\&n=Q-DmdzWXaUc2TwK8\&q=85\&s=8103b44d44240384f448444b71003c66)

See [Credits & Pricing Guide](https://docs.sixtyfour.ai/guides/credits-and-pricing.md#lattice) for what the block costs.

## Explore the graph

A graph opens in table view. Browse entities by type, search, filter and sort.

To open graph view, select any entity to see the nodes connected to it, or select **Show all** in the top right to see the whole graph.

![Graph view with the list of entities beside it](https://mintcdn.com/sixtyfour/Q-DmdzWXaUc2TwK8/images/lattice-graph-view.png?fit=max\&auto=format\&n=Q-DmdzWXaUc2TwK8\&q=85\&s=14586b2e5f9697543a7252d1bd602cfd)

Selecting a node opens its panel:

| Tab | What it shows |
| - | - |
| Node Details | The entity's properties and its timeline, such as employers and accounts. |
| Connections | Everything connected to the entity. |
| Reasoning | Why Lattice connected it. |

## Example: a shared IP address cluster

Use a graph to find accounts that look unrelated but reuse the same details. In this sample data, each row is one account. Four accounts signed up from the same IP address, `203.0.113.24`, and several of them also share a phone number. Neither pattern shows up when you read the rows one at a time.

![Accounts connected through a shared IP address and phone number](https://mintcdn.com/sixtyfour/Q-DmdzWXaUc2TwK8/images/lattice-shared-ip-cluster.png?fit=max\&auto=format\&n=Q-DmdzWXaUc2TwK8\&q=85\&s=eebf2ef69f676a790027b1ffacab7777)

## Run it by API

There is no API yet to query nodes or edges in a graph. You can build the workflow once in the web app, starting from an Import Data block, then run it by API with a new file each time. See [Workflows](https://docs.sixtyfour.ai/api-reference/workflows/workflows-overview.md) for more on running workflows by API.

```bash cURL theme={null}
# Upload the file. Returns a handle_id.
curl -X POST "https://api.sixtyfour.ai/storage/csv/upload" \
  -H "x-api-key: YOUR_API_KEY" \
  -F "file=@people.csv"

# Run the workflow with that file. Returns a job_id.
curl -X POST "https://api.sixtyfour.ai/workflows/run?workflow_id=YOUR_WORKFLOW_ID" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "specs_override": { "resource_handle_id": "HANDLE_ID" } }'

# Poll until overall_status is completed, failed, cancelled or timeout.
curl "https://api.sixtyfour.ai/workflows/runs/JOB_ID/live_status" \
  -H "x-api-key: YOUR_API_KEY"
```

```python Python theme={null}
import time
import requests

API = "https://api.sixtyfour.ai"
HEADERS = {"x-api-key": "YOUR_API_KEY"}

with open("people.csv", "rb") as file:
    upload = requests.post(f"{API}/storage/csv/upload", headers=HEADERS, files={"file": file})
upload.raise_for_status()

run = requests.post(
    f"{API}/workflows/run",
    params={"workflow_id": "YOUR_WORKFLOW_ID"},
    headers=HEADERS,
    json={"specs_override": {"resource_handle_id": upload.json()["handle_id"]}},
)
run.raise_for_status()
job_id = run.json()["job_id"]

while True:
    status = requests.get(f"{API}/workflows/runs/{job_id}/live_status", headers=HEADERS)
    status.raise_for_status()
    overall_status = status.json()["overall_status"]
    if overall_status in ("completed", "failed", "cancelled", "timeout"):
        print(overall_status)
        break
    time.sleep(10)
```

```javascript JavaScript theme={null}
import { readFile } from "node:fs/promises";

const API = "https://api.sixtyfour.ai";
const headers = { "x-api-key": "YOUR_API_KEY" };

const form = new FormData();
form.append("file", new Blob([await readFile("people.csv")]), "people.csv");
const upload = await fetch(`${API}/storage/csv/upload`, { method: "POST", headers, body: form });
if (!upload.ok) throw new Error(await upload.text());
const { handle_id } = await upload.json();

const run = await fetch(`${API}/workflows/run?workflow_id=YOUR_WORKFLOW_ID`, {
  method: "POST",
  headers: { ...headers, "Content-Type": "application/json" },
  body: JSON.stringify({ specs_override: { resource_handle_id: handle_id } })
});
if (!run.ok) throw new Error(await run.text());
const { job_id } = await run.json();

while (true) {
  const response = await fetch(`${API}/workflows/runs/${job_id}/live_status`, { headers });
  if (!response.ok) throw new Error(await response.text());
  const { overall_status } = await response.json();
  if (["completed", "failed", "cancelled", "timeout"].includes(overall_status)) {
    console.log(overall_status);
    break;
  }
  await new Promise((resolve) => setTimeout(resolve, 10000));
}
```

Starting the run returns the `job_id` you poll with:

```json theme={null}
{
  "status": "queued",
  "workflow_id": "YOUR_WORKFLOW_ID",
  "job_id": "JOB_ID"
}
```

## Questions and feedback

Lattice is in beta, and we want to hear how it works for you. Email [support@sixtyfour.ai](mailto:support@sixtyfour.ai) with questions or issues.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.