28 lines
751 B
Python
28 lines
751 B
Python
"""
|
|
---
|
|
title: Intersymbolic Graph Query
|
|
description: Queries Timmy's sovereign knowledge graph to find connections and structured facts.
|
|
conditions:
|
|
- Complex relationship analysis
|
|
- Fact checking against structured memory
|
|
- Finding non-obvious connections
|
|
---
|
|
"""
|
|
|
|
from agent.symbolic_memory import SymbolicMemory
|
|
|
|
def query_graph(topic: str) -> str:
|
|
"""
|
|
Queries the knowledge graph for a specific topic and returns structured context.
|
|
|
|
Args:
|
|
topic: The entity or topic to search for in the graph.
|
|
"""
|
|
memory = SymbolicMemory()
|
|
context = memory.get_context_for(topic)
|
|
|
|
if not context:
|
|
return f"No symbolic connections found for '{topic}' in the knowledge graph."
|
|
|
|
return context
|