# ValueError: Found edge starting at unknown node

TL;DR: one of your edges names a node that does not exist, usually a typo. Compare every `add_edge` / `add_conditional_edges` source name against your `add_node` names character by character. The error fires at build/validate time, before anything runs.

```text
ValueError: Found edge starting at unknown node 'my_nod'
```

## When this applies

- Raised by `graph.compile()` or `builder.validate()`, not during a run.
- The quoted name is close to, but not exactly, one of your node names.

## When it does not

- Errors DURING a run about unknown nodes come from a router returning a bad name. Different fix.
- `InvalidUpdateError` is about state writes, not edges.

## Fix it

### 1. Diff the names

```python
builder.add_node("my_node", my_node_fn)
builder.add_edge("my_nod", "other_node")  # typo: 'my_nod' was never added
```

Fix the typo:

```python
builder.add_edge("my_node", "other_node")
```

Expected: `compile()` succeeds.

### 2. Check conditional edges too

```python
builder.add_conditional_edges(
    "router",
    lambda state: "summarize" if state["done"] else "research",
    {"summarize": "summarize", "research": "reserach"},  # typo in the mapping
)
```

Both the source (`"router"`) and every destination in the mapping must be added nodes (or `END`).

### 3. Remember the special names

`START` is valid as an edge source without being added. `END` is valid as a destination. Everything else must come from `add_node`.

```python
from langgraph.graph import START, END

builder.add_edge(START, "first")   # fine
builder.add_edge("last", END)      # fine
```

Expected: no validation error for the special nodes.

## Why it happens

LangGraph validates the whole edge list before compiling. Every edge source must resolve to a known node so the Pregel engine can schedule it. An unknown source means a node that could never be scheduled, so it fails fast with this error instead of hanging at runtime.

## Edge cases

- Renaming a node? Search for every string reference to the old name. Edges are plain strings, so no IDE refactor catches them.
- Node names are case-sensitive: `"Agent"` and `"agent"` are different nodes.
- In older langgraph versions the validation message itself had a bug (it printed the wrong variable); if the quoted name looks unrelated, upgrade and re-read the message.

## Compatibility

All langgraph Python versions. The validation exists in every 0.x and 1.x release.