add_fact
Add a subject-predicate-object triple to the knowledge graph with optional source attribution and confidence levels.
Instructions
Add a new fact (subject-predicate-object triple).
Args: subject: Subject entity name (e.g., "John Smith") predicate: Relationship type (e.g., "works_at", "served_in") object: Object entity name (e.g., "Acme Corp") subject_type: Type of subject (e.g., "person", "organization") object_type: Type of object (e.g., "organization", "military_unit") context: Optional context description (e.g., "as squad leader") confidence: Confidence level 0.0-1.0 (1.0 = verified/manual) valid_from: Start date of validity (ISO format: YYYY-MM-DD) valid_to: End date of validity (ISO format: YYYY-MM-DD) source_type: Source type ("note", "document", "glossary", "manual") source_id: Source UUID (for notes/glossary) source_path: Source path (for documents) source_hash: Content hash (for documents) source_location: Location within source (e.g., "page 3")
Returns: Created fact as dict
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| object | Yes | ||
| context | No | ||
| subject | Yes | ||
| valid_to | No | ||
| predicate | Yes | ||
| source_id | No | ||
| confidence | No | ||
| valid_from | No | ||
| object_type | No | entity | |
| source_hash | No | ||
| source_path | No | ||
| source_type | No | ||
| subject_type | No | entity | |
| source_location | No |