# Knowledge graph

> Create a knowledge graph (bubble network) showing how concepts relate to each other, like an Obsidian graph view.

Source: https://mockflow.com/developers/reference/item-types/knowledge-graph

Send `"type": "knowledge_graph"`.

Create a knowledge graph (bubble network) showing how concepts relate to each other, like an Obsidian graph view.

Also available as the MCP tool `render_knowledgegraph`. The same payload works through either surface.

### Fields

- `nodes` (object[], required): Array of nodes with id, label, and weight (1-8). Labels are 1-3 words, under 24 characters — longer text is pushed under the bubble and cut off after two lines.
    - `id` (string, required)
  - `label` (string, required)
  - `weight` (integer, required)
- `edges` (object[], required): Array of edges with id, from, to, and label. Edge labels are 1-2 words, under 16 characters, and are left as "" when the relationship is obvious — a label on every edge crowds the canvas.
    - `id` (string, required)
  - `from` (string, required)
  - `to` (string, required)
  - `label` (string)

## Example

```json
{
  "type": "knowledge_graph",
  "data": {
    "nodes": [
      {
        "id": "string",
        "label": "string",
        "weight": 0
      }
    ],
    "edges": [
      {
        "id": "string",
        "from": "string",
        "to": "string",
        "label": "string"
      }
    ]
  }
}
```
