> For the complete documentation index, see [llms.txt](https://docs.graphcommons.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.graphcommons.com/create/creating-a-graph.md). Agents can also search and read this documentation through its [MCP server](https://docs.graphcommons.com/~gitbook/mcp).

# Creating a graph

Get started easily and build advanced graphs

With Graph Commons, you have an empty canvas to get started mapping your entire network, whether it's a social network, a supply chain, or a network of ideas. The intuitive interface makes it easy to input, organize, and understand the complex relationships in your data.

When you are signed in, you can create a graph from your profile menu. On a new graph canvas you will see a tool bar on the left to create nodes and connections manually, like the way you draw on a paper. If you have existing data, you can easily organize them and import into this graph. After you have data on your graph, you customize color, sizes, and the graph layout.

<figure><img src="https://918529313-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtBdFNYyZE7d8Q4z2K2ZT%2Fuploads%2FufLKmfqw1oKShXt1nBIp%2Fgc-create-graph-start.png?alt=media&amp;token=dcccb94d-f533-491d-834c-332a30eac2d1" alt=""><figcaption><p>A new graph with an empty canvas</p></figcaption></figure>

For more details, follow the step-by-step guide below.

1. [Add nodes](#add-nodes)
2. [Connect nodes](#connect-nodes)
3. [Delete data](#delete-data)
4. [Save your graph](#save-your-graph)
5. [Capture graph image](#capture-graph-image)

To build your first graph *manually*, we are going to use the first three buttons on the toolbar. If you close it you can open again via View/Edit switch on top right or the pencil icon on the top left.

## Add nodes

<figure><img src="https://918529313-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtBdFNYyZE7d8Q4z2K2ZT%2Fuploads%2FVOy2lzqceyTHdTsXNwVk%2Fgc-edit-add-node.png?alt=media&amp;token=fdb347e8-4209-40d2-9a22-7d8ec538c743" alt=""><figcaption><p>Add node dialogue with type, name, and color options.</p></figcaption></figure>

1. Click on the Add (+) button or anywhere on canvas to add a node.&#x20;
2. "Add node" dialogue will display three options: Type, name, and color. Enter your node's type (e.g., Person, Organization, or Location), then enter your node's name (e.g., Alice, Zattar Co, Berlin), and hit Add.
3. Add another node with the same type.
4. Add another node with a different type.

Other ways to add and edit data:

{% content-ref url="/pages/aABhxDsVuoaFU4rBWbk8" %}
[Editing data table](https://docs.graphcommons.com/create/editing-data-table.md)
{% endcontent-ref %}

{% content-ref url="/pages/ewTYHJXLaq3WXuRgGfUq" %}
[Importing data](https://docs.graphcommons.com/create/importing-data.md)
{% endcontent-ref %}

## Connect nodes

<figure><img src="https://918529313-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtBdFNYyZE7d8Q4z2K2ZT%2Fuploads%2FCQLhSmYxMMuByBzZ46DL%2Fgc-edit-connect-1.png?alt=media&amp;token=ac046d2c-1862-4753-8ee4-af6abac4ee0f" alt=""><figcaption><p>After cmd/ctrl + clicking on a node, a dashed line will anchor on the node you've clicked, click the  other node you want to connect.</p></figcaption></figure>

<figure><img src="https://918529313-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtBdFNYyZE7d8Q4z2K2ZT%2Fuploads%2FatGxzTUfEvcVCPhgqoAr%2Fgc-edit-connect-2.png?alt=media&amp;token=342e2821-fbde-46de-bfb8-35bf42d64995" alt=""><figcaption><p>Connect dialogue with type, color, and direction options.</p></figcaption></figure>

1. Click on the Connect button (Shortcut: Ctrl + click node), then click on the node you want to connect from, and click on the other node you want to connect to.
2. In the "Connect" dialogue, enter the type of relationship, choose a color (optional), and click on check if this is a directed relationship.
3. Connect other nodes with the same type of relationship (e.g., Person -MEMBER OF-> Org).
4. Connect nodes with a new type of relationship (e.g., Person -COLLABORATED- Person).

<figure><img src="https://918529313-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtBdFNYyZE7d8Q4z2K2ZT%2Fuploads%2FG69Z4XXrcFziEAZFMLGM%2Fgc-edit-connect-3.png?alt=media&amp;token=f78e9b13-7319-4b69-bfc6-5a6f693a89fd" alt=""><figcaption><p>The little graph after you connect the dots</p></figcaption></figure>

## Add image to a node

When you upload the image or add image URL it will be displayed on the graph and node cards.&#x20;

#### Add image using the application interface

1. Select a Node: Click on the node to open its detail panel.
2. Open Edit Node panel: Click on the Edit on the node card menu.
3. Upload image: Click "Upload Image," choose your file, and upload it, or add a public image URL.
4. Save Changes: Ensure you save the changes.

You can also add images to multiple nodes quickly by editing your graph's [Data Table](https://docs.graphcommons.com/create/editing-data-table.md).

#### Add image using Import

1. Host Images Publicly: Upload images to a publicly accessible server.
2. Add Image URL: Include the image URL in the "Image" column of your nodes table.
3. Import Your File or Sheet: Import the file or sheet.

#### Add image using the API

1. Host Images Publicly: Upload images to a publicly accessible server.
2. Add Image URL to Node: Include the image URL in your API request using `node.image`. Learn more about the [Graph Commons API](https://docs.graphcommons.com/build/api.md).

{% hint style="info" %}
Manual image uploads are only available through the Graph Commons interface, not via the API. Ensure images are properly sized and optimized for better performance.
{% endhint %}

{% hint style="info" %}
To display node images on the graph, make sure to check "Display node images on graph" in your graph's View Options.
{% endhint %}

## Delete data

<figure><img src="https://918529313-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtBdFNYyZE7d8Q4z2K2ZT%2Fuploads%2F6PljKL9o2Z8L7bXQyRE4%2Fgc-edit-delete.png?alt=media&amp;token=e38ad518-0212-4989-a00d-6388d4102275" alt=""><figcaption><p>Delete dialogue</p></figcaption></figure>

1. Select Delete in the toolbar (Shortcut: Select + Backspace)
2. Click on a node to delete it
3. Click on a relationship to delete it

{% hint style="warning" %}
When you delete a node, you also delete its relations - the edges connected to that node.
{% endhint %}

{% hint style="info" %}
You can undo or redo any changes, if it is not yet saved.
{% endhint %}

## Save your graph

<figure><img src="https://918529313-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtBdFNYyZE7d8Q4z2K2ZT%2Fuploads%2FEAbTMsh4RkTGwtXAQqd1%2Fgc-edit-save.png?alt=media&amp;token=5763e8a6-9d3d-4076-beb5-173c56f2b36a" alt=""><figcaption><p>Save dialogue</p></figcaption></figure>

1. Click on the Save button on top right corner&#x20;
2. Enter a title for your graph
3. Select Public or Private. You may want to [upgrade plan](https://graphcommons.com/pricing) for having private and/or larger graphs.

After your save, the save button is removed. When you see the Save button, just hit it.

{% hint style="info" %}
Your changes will not be auto-saved, for now. Save regularly to not lose any data.
{% endhint %}

Whenever you try to leave a window without saving, the browser will will warn you. We recommend saving often and early to stay on the safe side.

<figure><img src="https://918529313-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtBdFNYyZE7d8Q4z2K2ZT%2Fuploads%2FYcfFBupNqOJ0pBVJUyTi%2Fimage.png?alt=media&amp;token=5ae1076a-5390-472c-97ee-7c316386922a" alt=""><figcaption><p>Warning before you leave an unsaved graph</p></figcaption></figure>

## Capture graph image

To set a cover image for your graph, open the "Edit Graph Info" panel from either the title menu or the "Edit Info" button in the Info panel. Click on the "Capture Graph Image" button, review the image displayed, and then save it.

{% hint style="info" %}
Note that if you wish to download a PNG or JPG of your graph, you can simply capture a screenshot.
{% endhint %}

<figure><img src="https://918529313-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtBdFNYyZE7d8Q4z2K2ZT%2Fuploads%2FdPrTO3nl5CegNVqwcooL%2Fgc-edit-info-panel.png?alt=media&amp;token=0cd62472-908f-430a-a988-79244ce60736" alt=""><figcaption></figcaption></figure>
