Project Pharos
Zero-token knowledge injection via structured triples. Named for the Lighthouse of Alexandria β the structure that delivered light to guide ships. Pharos delivers knowledge to guide reasoning.
153+ knowledge packs covering community legal rights, mutual aid, scientific domains, AI/ML, security, philosophy, chemistry, and more. HTTP API server with fuzzy search, entity lookup, and graph traversal.
Features
- 153+ knowledge packs β Structured (subject, predicate, object) triples extracted from authoritative sources. Domains include ethics, law, science, engineering, mutual aid, security, and AI/ML
- HTTP API server β Query any pack by keyword, look up entities, traverse the knowledge graph, or get pack statistics
- Fuzzy search β Weighted word matching across all triples in a pack. Partial matches scored at 0.5, exact at 1.0
- Entity lookup β Exact match on subject, object, or predicate roles
- Graph traversal β Walk the knowledge graph from any entity to configurable depth, returning connected triples layer by layer
- Pack router β SIRA-based routing selects the right pack for a given query automatically
- Multiple injection formats β Triple text, walk encoding, source excerpts, KV cache injection, or hybrid
API Endpoints
| Endpoint | Method | Description |
|---|---|---|
/packs |
GET | List all loaded packs with metadata |
/query |
POST | Fuzzy search within a pack |
/lookup |
POST | Exact entity lookup by role |
/traverse |
POST | Graph traversal from an entity |
/entities |
POST | List all entities in a pack |
/stats |
POST | Pack statistics (triple count, entity count, predicates) |
/search |
POST | Search across all packs simultaneously |
Usage
Start the server
python pack_server.py --port 8300
Query examples
# Search for p-hacking across all packs
curl localhost:8300/query -d '{"pack": "statistical-pitfalls", "query": "p-hacking"}'
# Traverse the knowledge graph from an entity
curl localhost:8300/traverse -d '{"pack": "causal-inference", "entity": "confounding", "depth": 2}'
# Look up a specific entity
curl localhost:8300/lookup -d '{"pack": "eviction-defense", "entity": "30-day notice", "role": "subject"}'
# Search across all packs
curl localhost:8300/search -d '{"query": "tenant rights eviction"}'
# List all packs
curl localhost:8300/packs
From Python
import requests
# Query a pack
resp = requests.post("http://localhost:8300/query", json={
"pack": "eviction-defense",
"query": "unlawful detainer",
"max_results": 10
})
triples = resp.json()["results"]
Pack Format
Each pack is a directory containing triples.json:
{
"description": "Eviction defense procedures and tenant rights",
"sources": ["California Civil Code", "HUD guidelines"],
"triples": [
{
"subject": "unlawful detainer",
"predicate": "requires",
"object": "proper notice before filing"
}
]
}
Pack Categories
Mutual Aid: eviction-defense, crisis-mental-health, emergency-financial-assistance, childcare-assistance, transportation-assistance, benefits-navigation, medical-debt-navigation, expungement-record-sealing, reentry-navigation, disability-justice, harm-reduction, tenant-rights, workers-rights
Legal: civil-rights, family-law-basics, federal-civil-procedure, federal-evidence, immigration-basics, administrative-procedure, protective-orders-safety-planning, cooperative-legal-structures
Science & Engineering: chemistry-fundamentals, organic-chemistry, physics-mechanics, physics-thermodynamics, physics-electromagnetism, materials-science, mechanical-engineering, electrical-engineering, digital-electronics, experiment-design, statistical-pitfalls, causal-inference
AI/ML: transformer-architecture, mechanistic-interpretability-2026, residual-stream-kv, psychological-steering, latent-introspection, ai-framework-security, security-fundamentals
Philosophy & Ethics: ethics-ai, ethics-ancient, ethics-belief, ethics-chinese, ethics-indian-buddhism, moral-animal, moral-character, moral-cognitivism, autonomy-moral, reasoning-moral, feminist-philosophy-biology, environmental-aesthetics
Practical: first-aid-emergency, bicycle-repair, solar-offgrid-basics, home-food-preservation-safety, kintsugi-craft, permaculture-food-sovereignty, informed-consent, trauma-informed-care
Used By
- Multiverse Mutual Aid Agent β Mutual aid triage for The Multiverse School
- Project Rivet β Kintsugi-based coding agent for Multiverse Campus
- Project Ayni β Ethical companion agent
Requirements
- Python 3.8+
- No external dependencies (stdlib only)
Authors
Nexus, Liberation Labs / Transparent Humboldt Coalition
License
Apache 2.0