Skip to content

Relation Types

Relations are typed, directional links between minions. All relations are many-to-many.

TypeSemanticsExample
parent_ofHierarchical parent → childAgent → Skill
depends_onSource depends on targetTask B → Task A
implementsSource implements target specAgent → API Contract
relates_toGeneric associationNote → Note
inspired_bySource inspired by targetAgent v2 → Agent v1
triggersActivating source triggers targetTrigger → Action
referencesSource references targetThought → Document
blocksSource blocks targetBug → Feature
alternative_toSource is alternative to targetAgent A → Agent B
part_ofSource is component of targetSkill → Agent
followsSource follows target in sequenceStep 2 → Step 1
integration_linkLinked to external systemMinion → External

Relations are preserved. The deleted minion is excluded from standard queries but its relations remain for restoration.

All relations where the deleted minion is source or target are removed. Target minions are not deleted.

import { RelationGraph } from 'minions-sdk';
const graph = new RelationGraph();
// Add a relation
const rel = graph.add({
sourceId: 'agent-001',
targetId: 'skill-001',
type: 'parent_of',
});
// Query
graph.getChildren('agent-001'); // ['skill-001']
graph.getParents('skill-001'); // ['agent-001']
graph.getTree('agent-001'); // all descendants
graph.getNetwork('agent-001'); // all connected nodes
// Clean up on hard delete
graph.removeByMinionId('agent-001');