Skip to content
Tools/Edges/create_edge

create_edge

Create one edge between two nodes. Edge type auto-infers when omitted. Target accepts an ID, or a title+type pair the server resolves. For 3+ edges, use `batch_create_edges`.

Edgesatomic. Single store mutation.

Arguments

source_idstringrequired

Source node ID

target_idstringoptional

Target node ID

target_titlestringoptional

Target node title (alternative to target_id; requires target_type).

target_typestringoptional

Target node type (used with target_title for resolution)

typestringoptional

Edge type. Auto-inferred if omitted.

Returns

JSON: the created edge object plus optional resolution metadata.

Examples

Output

// Wire a persona to a job using the canonical edge type persona_pursues_job
// Input:
{ "source_id": "persona_01", "target_id": "job_03", "type": "persona_pursues_job" }
// Output (truncated):
{
  "edge": { "id": "edge_15", "type": "persona_pursues_job", "source": "persona_01", "target": "job_03" },
  "inferred": false
}

See Also