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

# Memory Relation Graph

> Create, list, and delete multi-relational memory edges for a session, and run bounded graph retrieval (Jev-Mem).

Multi-relational memory connects memory fragments within a session using typed edges (`semantic` / `temporal` / `causal` / `entity`) and supports bounded graph retrieval. These edges live in the cloud; the SDK `local` backend uses aria memo's separate relation plane (SQLite) and does not merge it into the cloud graph. All endpoints require `Authorization: Bearer <api_key>` (optional if `AGENT_CLOUD_API_KEY` is unset).

## Create a relation edge

### Endpoint

```http theme={null}
POST /v1/agents/sessions/{session_id}/memory/relations
```

### Path parameters

**session\_id** `string` *required*

Session identifier.

### Request body

**from\_id** `string` *required*

Source fragment id.

**to\_id** `string` *required*

Target fragment id.

**kind** `string` *required*

Relation kind, e.g. `causal`, `semantic`, `temporal`.

**score** `number`

Edge weight, default `0.8`.

**provenance** `string`

Provenance tag, default `rest`.

### Response

**session** `string`

Session identifier.

**from\_id** `string`

Source fragment id.

**to\_id** `string`

Target fragment id.

**kind** `string`

Relation kind.

**score** `number`

Edge weight.

**provenance** `string`

Provenance tag.

**created\_at** `integer`

Epoch milliseconds.

## List relation edges

### Endpoint

```http theme={null}
GET /v1/agents/sessions/{session_id}/memory/relations
```

### Query parameters

**kind** `string`

Filter by relation kind.

**from** `string`

Filter by source fragment id.

**to** `string`

Filter by target fragment id.

**top\_k** `integer`

Max results, default `50`, clamped to 1–200.

### Response

Standard list envelope (`object`, `data`, `has_more`), where `data` is an array of `RelationItem`.

## Delete relation edges

### Endpoint

```http theme={null}
DELETE /v1/agents/sessions/{session_id}/memory/relations
```

### Query parameters

**kind** `string`

Filter by relation kind.

**from** `string`

Filter by source fragment id.

**to** `string`

Filter by target fragment id.

Provide at least one of `from`, `to`, `kind`, otherwise a `400` is returned.

### Response

**object** `string`

Always `relation.deleted`.

**session** `string`

Session identifier.

**deleted** `integer`

Number of edges deleted.

## Graph retrieval

### Endpoint

```http theme={null}
GET /v1/agents/sessions/{session_id}/memory/relations/graph
```

### Query parameters

**seeds** `string` *required*

Comma-separated seed fragment ids, at least one.

**views** `string`

Comma-separated relation kinds that limit the traversal view.

**budget** `integer`

Traversal budget, default `60`.

**max\_hops** `integer`

Maximum hops, default `3`.

**top\_k** `integer`

Max edges returned, default `20`.

### Response

Returns a `GraphRetrieveResponse` with `nodes` and `edges` arrays describing the bounded subgraph rooted at the seeds.


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