Documentation: knowledge_graph Module API Guide
The knowledge_graph module implements a bi-temporal knowledge graph with provenance tracking, A* pathfinding, and pheromone-based learning. The implementation is solid but the API documentation is minimal.
What to do
Create docs/modules/knowledge_graph.md with:
- Quick start — 10-line example: create a KG, add triples, query
- Bi-temporal semantics — explain
valid_time vs transaction_time
- Provenance tracking — how to attach source metadata to triples
- A* pathfinding — example: find shortest path between entities
- Pheromone learning — how edge weights evolve with use
Example to document
from asi_build.knowledge_graph import KnowledgeGraph
kg = KnowledgeGraph()
kg.add_triple(
subject='GWT',
predicate='is_a',
object='consciousness_theory',
valid_time='2026-01-01',
confidence=0.95,
provenance='Baars1988'
)
# Find paths
path = kg.find_path('GWT', 'IIT')
print(path)
Difficulty
🟡 Intermediate — requires reading the source code to understand the API, but no complex algorithms to implement.
Notes
This module is also used as the memory backend for the Truth Palace of Atlantis demo.
Documentation:
knowledge_graphModule API GuideThe
knowledge_graphmodule implements a bi-temporal knowledge graph with provenance tracking, A* pathfinding, and pheromone-based learning. The implementation is solid but the API documentation is minimal.What to do
Create
docs/modules/knowledge_graph.mdwith:valid_timevstransaction_timeExample to document
Difficulty
🟡 Intermediate — requires reading the source code to understand the API, but no complex algorithms to implement.
Notes
This module is also used as the memory backend for the Truth Palace of Atlantis demo.