Graph Relate
graph_relateCreate or strengthen relationships between entities, auto-creating missing ones. Use single mode for one fact or atomic batch mode to extract many from a transcript.
Instructions
Create or strengthen a relationship between entities. Creates the endpoint entities if they don't exist, matching existing ones by name, case-insensitive name, or alias first. Use single mode (from_name/to_name/relation) for one fact at a time. Use batch mode when extracting from a transcript or document: it runs in one transaction, so a database failure keeps nothing, while an invalid item is skipped and reported without blocking the rest. Types and relations must use the documented vocabulary (see GRAPH_SCHEMA.md); an unknown relation is stored as RELATED_TO with the original kept in proposed_relations, and an unknown type as Object with proposed_type. Idempotent: re-asserting an existing edge strengthens it (capped at 1.0) and reports action "strengthened".
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| batch | No | Batch mode: create multiple entities and relationships atomically | |
| weight | No | Edge weight 0.0-1.0 | |
| to_name | No | Target entity name (single mode) | |
| to_type | No | Target entity type (single mode) | |
| evidence | No | Why this relationship exists | |
| relation | No | Relationship type (single mode) | |
| valid_at | No | ISO-8601 date this fact became true. Also REPLACES the previous value: other edges of this type from the same source are marked invalid as of this date. Omit it for facts that can hold several values at once. FAMILY_OF, KNOWS, COLLABORATES_WITH, MENTOR_OF, ALIAS_OF, CONTRADICTS and RELATED_TO never supersede. | |
| from_name | No | Source entity name (single mode) | |
| from_type | No | Source entity type (single mode) | |
| properties | No | Additional properties | |
| source_type | No | Source type: conversation, ingest, manual, bootstrap | |
| source_session | No | Session ID for provenance | |
| source_transcript | No | Transcript path for provenance |