add_memory
Store an explicitly confirmed fact as an RDF triple in the knowledge graph, triggering inference rules. Only adds facts the user stated, preventing hallucination.
Instructions
Store a fact in semantic memory using RDF triple notation.
CRITICAL - ANTI-HALLUCINATION RULES: ❌ NEVER suggest example facts and then add them as if user confirmed ❌ NEVER assume user response validates your examples ❌ NEVER invent names, relationships, dates, or any entities ❌ NEVER add facts based on your assumptions or knowledge ✓ ONLY add facts that user EXPLICITLY and UNAMBIGUOUSLY stated ✓ If unsure what user meant, ASK for clarification before adding ✓ If user says 'I don't know', do NOT add anything
Example of INCORRECT behavior (HALLUCINATION): User: 'Who is Alice's father?' You: 'I don't know. Can you tell me? Example: :Alice :hasFather :Bob' User: 'ok' [or any vague response] You: add_memory(':Alice :hasFather :Bob') ← WRONG! User never said this!
Example of CORRECT behavior: User: 'Alice's father is Bob' You: add_memory(':Alice :hasFather :Bob') ← CORRECT!
What happens when you add a fact:
Fact is stored with confidence=1.0 (explicit user fact)
SPARQL inference rules automatically run in background
New facts may be inferred (e.g., symmetry, transitivity)
Check get_pending_verifications() for inferred facts needing approval
Supported predicates:
foaf:knows, foaf:friend - Social relationships
schema:worksFor, schema:colleague - Work relationships
rdf:type - Classifications
:customPredicate - Any custom predicate (user namespace)
Format: ':Subject predicate:name :Object'
Examples: add_memory(':User foaf:knows :Alice') add_memory(':User :isFriendOf :Bob') # Custom predicate add_memory(':Charlie schema:worksFor :AcmeCorp')
Note: Use ':User' for current user, ':' prefix for all user entities.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| input | Yes | RDF triple: ':Subject predicate :Object' |