aesop_tree — Knowledge Graph
The 5th AESOP service (port 8003, dir app_tree/). It captures the
structural knowledge of a "system considered" — technology, energy, political
and ideology trees — as one unified Apache AGE property graph, fed by aesop_intell, and
closes the OODA loop back to collection with intelligence orientations.
Internal Architecture & Flow
satisfied_by
bridge joins the two. Where an abstract requirement has no satisfying supplier, that gap is itself
an intelligence requirement.
app_intell diffs the science layer (what should exist)
against the logistic layer (what we know exists) and turns each gap into an orientation / RFI
dispatched to POST /api/intell/orientation/. aesop_intell boosts the relevant keyword, collects,
and the answer returns through the normal entity webhook — the resolver attaches a satisfied_by
edge and the RFI auto-closes. Structure drives collection; collection fills structure.
Django Apps
Graph & ingestion
app_graph— System / Node / Edge schema + Apache AGE shadow + traversalapp_ingest— intell entity webhook + match-or-create resolverapp_science— abstract recipe DAG authoring + LLM seederapp_logistic—satisfied_byresolution + coverage UI
Search, API & loop
app_search— pgvector semantic + pg_search BM25 hybrid lookupapp_api— dependency / impact / subgraph / coverage RESTapp_chart— Leaflet instance map + coverage-annotated DAGapp_propagation— graded degradation + Wh push to siblingsapp_intell— gap → RFI orientation engine
Stack
PostgreSQL 18 Apache AGE pgvector pg_search (BM25) H3 res 9 Django 5 + DRF HTMX Celery + Redis 9,10
Plan + design:
app_tree/AESOP_TREE_PLAN.md. Runs on SQLite (capability-guarded fallbacks)
for dev/tests; 104 tests green.
API Contracts
| Direction | Endpoint | Purpose |
|---|---|---|
| intell → tree | POST /api/webhooks/intell-entity/ | Entity → instance Node (+ relations → logistic edges). Idempotent. |
| tree → intell | POST /api/intell/orientation/ | Gap → RFI; boosts collection relevance. Auth X-API-Key. |
| tree (read) | GET /api/tree/{dependencies,impact,system/<s>/graph,…} | Dependency / reverse-impact / subgraph / coverage / gaps. |
| tree → siblings | POST /api/tree/system/<s>/propagate/ | Capability degradation (+ Wh) to modelisation / simulation / energy. |