> ## Documentation Index
> Fetch the complete documentation index at: https://a775658-archee-studio.manicule.dev/llms.txt
> Use this file to discover all available pages before exploring further.
> For every page in one file, fetch https://a775658-archee-studio.manicule.dev/llms-full.txt (large).
> To search and read these docs as tools, connect the MCP server at https://a775658-archee-studio.manicule.dev/api/mcp.
> Every agent surface: https://a775658-archee-studio.manicule.dev/.well-known/llms-manifest.json

# Facts and relations (/arql/overview)

<!-- agent-signals: reading_time_min: 2 · est_tokens: 801 · updated: 2026-12-05 -->
Related: [Query reference](/arql/queries.md), [Sets, views and rules](/arql/rules.md), [Diagnostics](/arc/diagnostics.md)

> What ARQL asks, the graph a drawing becomes, and the relations it holds.

ARQL asks a drawing which parts relate to which. You write a pattern, and ARQL returns the matching parts with the facts that justify each row. It only reads.

## Run a query

```bash
agentcad search SHEET.dxf 'MATCH (b:bearing)-[:coaxial]-(s:shaft) RETURN b.id, s.id'
```

Inside an `execute` program, call `agentcad.relate(path).query("QUERY")`, where `path` is a `.dxf` or a facts `.json`. Over [Archee MCP](/mcp/tools), `search` takes the same query.

## The graph

A sheet becomes a graph.

* A **node** is a part, a dimension or a view, named by an id such as `shaft.II`, `bearing.I.left`, `dim.fit.bearing.I.left.outer` or `view.front`. On an upload nobody tagged, ids look like `block.1A3F`.
* The **kind** of a node is the first id segment: `bearing`, `dim`, `block`.
* Node attributes are `id`, `kind`, `source`, `diameter` and `name`. A `dim` node also has `measured_value` and `text_value`.

An **edge** is a relation. Every edge carries three attributes:

| Attribute    | Meaning                                        |
| ------------ | ---------------------------------------------- |
| `measured`   | A length, or null                              |
| `evidence`   | The text of the fact                           |
| `confidence` | `stated` 1.0, `measured` 0.9 or `inferred` 0.6 |

## Relations

| Relation                        | Reads as                                                                | Direction       |
| ------------------------------- | ----------------------------------------------------------------------- | --------------- |
| `contains` / `inside`           | The holder contains the held part                                       | Holder first    |
| `touches`                       | Outlines share a stretch; `measured` is the shared length               | Symmetric       |
| `gap`                           | Faces side by side without touching; `measured` is the gap              | Symmetric       |
| `coaxial`                       | On one axis                                                             | Symmetric       |
| `parallel`, `perpendicular`     | Axes parallel or square                                                 | Symmetric       |
| `spaced`                        | Like parts in a row or ring; `measured` is the pitch or centre distance | Symmetric       |
| `annotates` / `annotated_by`    | A note or balloon lands on the part                                     | Note first      |
| `dimensions` / `dimensioned_by` | A dimension starts on the part; `measured` is its length                | Dimension first |
| `pattern` / `in_pattern`        | A named pattern such as `4 x M8 on D110` and its member                 | Pattern first   |

No edge means the relation was not read. It does not mean the relation is absent.

## Confidence

Read `confidence` before you rely on a relation. `stated` comes from the drawing itself, such as a dimension or a note. `measured` comes from geometry. `inferred` comes from boxes and axes, so confirm it when it matters.

## Next

* [Query reference](/arql/queries)
* [Sets, views and rules](/arql/rules)
