AYU
AYU — Planetary Co-Intelligence
Ayu.Earth · Stigmergy · Admin
Not connected

System Health

Corpus Docs
10
Spheres
12
Bioregions
12
Agreements
Binding Status
STIGMERGY_KVpending
STIGMERGY_R2pending
STIGMERGY_DBpending
AI (Workers AI)pending
ADMIN_KEYpending

Setup & Initialisation

📋
First-time setup order: 1. Configure all 5 bindings in Cloudflare dashboard.   2. Click Init Database to create D1 tables.   3. Click Seed Starter Docs to populate KV corpus.   4. Head to Scrape tab to ingest web content.
Database (D1)

Creates 7 tables: queries, feedback, scrape_logs, biosignal_logs, steward_log, actor_interactions, clock_history.

Corpus Seed

Seeds 25 starter documents across all 10 spheres into KV for RAG retrieval.

Backfill Secondary Spheres

Computes secondary spheres for all existing corpus documents from their stored text. Run once after any worker deploy that expands keyword coverage. Safe to re-run — only updates docs where secondary spheres have changed.

Required Bindings
STIGMERGY_KVKV Namespace
STIGMERGY_R2R2 Bucket
STIGMERGY_DBD1 Database
ADMIN_KEYSecret
AI (Workers AI)Secret

Set in Cloudflare: Worker → Settings → Variables & Bindings

Cron Triggers
0 2 * * 0Weekly maintenance
0 * * * *Hourly decay

Set in Cloudflare: Worker → Settings → Triggers

Corpus

Loading spheres…
Corpus Summary
Search Corpus
Add Document

Web Sources

Web Source Spheres Click a source to edit its sphere
Click ↻ Sources to load.
Batch Progress

Run All checks all 30 seed URLs — skips unchanged pages (304), only re-indexes if content changed (delta). Corpus grows only when sites update.

Scrape Single URL
Scrape Logs

PDF Sources

Upload PDF
Stored PDFs
Loading…

Multi-Agent System

Natural Agents
Human Agents
AI Agents
F_system
Natural Agents — Bioregions Click any row to send a signal or view state
Loading…
AI Agents
Loading…

Actors & Agreements

Actor Alignment Index
Loading…
Register Actor
Multilateral Agreements
Loading…

Biosignals & Stigmergy

Biosignal Dashboard
Loading…
Stigmergy Network
Loading…
Network Actions

Planetary Health Clock

Current Vitality
Planetary Health Index
Sphere Breakdown
Clock History
Loading…

Analytics

Total Queries
Feedback
Avg Score
Top Sphere
By Sphere
Loading…

Tests

Smoke Test No admin key needed

Checks KV / R2 / D1 read-write and Workers AI binding. Fast (~2s).

E2E Test Admin key required

Full pipeline: DB tables → KV write/read → R2 write → Clock → Query → Biosignal.

Deploy & Validate Run these 3 steps after every worker deploy

Confirms the worker is live, all cloud bindings are healthy, and the pilot plot biosensing pipeline is fully operational end-to-end.

1
Bindings healthy?
Verifies KV, R2, D1, and Workers AI bindings are all connected. No admin key needed. Should pass in ~2s. If this fails, check Cloudflare → Worker → Settings → Variables & Bindings before continuing.
2
Pilot plot pipeline working?
Runs the full MVP chain using fake sensor data: bioregion resolves to Rocky Mountain Front Range → AI translates readings into vitality indicators → stigmergy trace deposited → logged to D1 → both bio-hybrid and living biosensor tracks tested → query synthesis. Admin key required.
3
Ingest a real sensor reading
Sends one bio-hybrid reading to /api/ingest using your pilot plot coordinates (39.9503°N, 105.1603°W). AI listens, translates to ecological indicators, deposits a stigmergy trace. Replace the values below with actual sensor readings once hardware is deployed.
Quick API Tests

Test any individual endpoint. Results shown inline.

LITL Progress

Life-in-the-Loop™ maturation across all Umwelt nodes. Declining HITL intervention frequency = the loop is maturing. Primary success metric of planetary co-intelligence.

Click Refresh to load LITL state.
Scenario Test Payloads

Six end-to-end scenarios matching the documented personas. Edit any payload, then ▶ Run to fire live against the worker. Results shown below each scenario.

Scenario 1 — Natural Agent Ingest · Rocky Mountain distress signal PoP 1 pilot · POST /api/ingest

Simulates a sensor reading from the Rocky Mountain Front Range bio-hybrid track. Low soil moisture + elevated CO₂ should trigger a distress signal and stigmergy trace deposit.

Expected: distress classification → stigmergy trace → BIS update for rocky_mountain:BIOSPHERE
Scenario 2 — BIS Node Health · Amazon Basin Kai/Mekong pattern · GET /api/bis/:bioregion

Fetches the Biotic Index Score for the Amazon Basin bioregion across all registered Umwelt nodes (BIOSPHERE, ATMOSPHERE, HYDROSPHERE). Mirrors the Kai the River watershed monitoring scenario.

Expected: per-node BIS scores, preferred vitality, confidence, staleness-adjusted aggregate
Scenario 3 — LAP Query · Agricultural alignment check Life Alignment Protocol · POST /api/lap/query

An external agricultural AI system queries the Life Alignment Protocol to check if a proposed irrigation expansion in the Sahel aligns with living systems constraints. Surfaces planetary boundary violations before decisions are made.

Expected: LAP constraint check → alignment score → planetary boundary flags → steward referral
Scenario 4 — Steward Observation · Sahel coordinated sensing Amara Diallo persona · POST /api/ingest

Amara Diallo (Sahel land steward) submits a qualitative observation alongside proxy sensor data. steward_observation source_type receives authority weight 1.0 — highest in the system. Demonstrates ANCIENT sphere Umwelt node.

Expected: authority=1.0 weight applied → ANCIENT node BIS update → high-confidence distress signal
Scenario 5 — Sovereignty Territory · Register indigenous territory FPIC · POST /api/sovereignty/territory

Registers a new indigenous territory in the Coral Triangle bioregion, asserting data sovereignty and FPIC requirements. Dr. Rangi Parata scenario — Māori/Pacific Indigenous knowledge sovereignty.

Expected: territory registered in KV → GET /api/sovereignty/territory returns new entry
Scenario 6 — AIF System State · Global free energy + BIS snapshot Collective intelligence · POST /api/query

Fires a synthesis query that activates the AIF engine with full BIS objective. The system minimises planetary health gap (F_ai = BIS gap across 122 nodes). Tests the end-to-end: BIS global → distress context → multi-agent synthesis → stigmergy trace. Yemi Adeyemi transition scenario.

Expected: BIS-grounded synthesis → planetary objective explicit in response → stigmergy trace deposited
Historical Data Ingest — Open-Meteo + NOAA CO₂ Populates ~624k signals across 52 bioregions · No API keys

Run these 4 steps in order after every fresh deploy. Steps 1–2 are single calls. Step 3 runs 11 sequential batches (5 bioregions each). Step 4 verifies the pipeline activated.

Step 1 — Dry run validates Open-Meteo connection, no writes
POST /api/na/ingest-historical · { "start_date":"2020-01-01", "end_date":"2020-12-31", "batch_size":2, "dry_run":true }
Expected: dry_run:true, bioregions_processed:2, total_ingested:~730
Step 2 — NOAA CO₂ history single call, 1979–present global annual mean
POST /api/na/ingest-co2 · {}
Expected: annual_years_ingested:~47, latest_monthly:{co2_ppm:424.x}
Step 3 — Historical weather 2015–present 11 batches · 5 bioregions each · 15–25s per call

Each batch ingests temp_anomaly_c, precipitation_mm, soil_moisture_pct for 5 bioregions across ~4,000 days. Run sequentially — each takes 15–25s. "Ingest all" runs all 11 automatically.

Step 4 — Verify pipeline activated

Collective: natural_free_energy > 0 · Amazon: signals with temp_anomaly_c, precipitation_mm · HITL: arctic/atlantic_forest critical distress

Architecture & Documentation

1. What is Stigmergy?

Stigmergy (Greek: stigma = sign · ergon = work) is a decentralized coordination mechanism where agents communicate indirectly by modifying their shared environment. No central controller. Intelligence emerges from relationships, not nodes.

Biological model
Ant pheromone trails · Termite mound ventilation · Slime mold pathfinding (Physarum polycephalum)
Core mechanism
Agents leave environmental traces → traces strengthen when useful (positive feedback) → traces decay when outdated (negative feedback) → environment becomes collective external memory
Four properties
Emergent (no manager) · Networked (nothing in isolation) · Regenerative (restores by default) · Intelligent (distributed biological computation)
What it is NOT
Not centralized AI control · Not planetary governance · Not artificial consciousness · Not human-out-of-loop

2. Platform Definition

Stigmergy is a planetary co-intelligence engine — a RAG-based AI system grounded in living systems principles, active inference, and ecological feedback. It serves humans learning to be in service of Life.

Official name
AYU Stigmergy — Planetary Co-Intelligence Platform
Core purpose
Help humans unlearn / co-learn / relearn patterns that support all Life. The bot is not the main idea — the stigmergy AI engine listens, suggests, and keeps the human in the loop to build a better planet for all living beings.
Opening prompt
"Welcome to being in service of life. What is on your mind?"
Trademark
Life-in-the-Loop™ (LITL). Human-in-the-loop is a transitional constraint, not the destination.
Design principle
Biology leads. AI translates. Human steward holds agency. The goal is conversation, not intervention.

3. Proof of Paradigm (PoP) — Scale Evolution

Three progressive prototypes validate the paradigm before scaling. Only after micro-site validation (PoP 1) should PoP 2 or PoP 3 begin.

LayerScaleIntelligence ModePrimary ConcernStatus
🌱 Microcosm — PoP 1Single bio-hybrid node (10–100 m²)Embodied sensingImmediate local adaptationBuilt (proxies)
🌿 Mesocosm — PoP 2Landscape network (watershed, valley)Emergent coordinationSpatial resilienceScaffolded
🌍 Macrocosm — PoP 3Bioregional / planetary pattern layerPattern learningClimate-scale adaptationPlanned
🌌 MetacosmEvolutionary / cosmic orientationEvolutionary alignmentLong-term flourishingFuture
PoP 1 — Living Soil Pulse
Single micro-bioregion (pilot plot). Multi-sensor adaptive learning. Proves: biosensing layer, distributed low-cost sensors, real-time ecological signal. Two parallel sensor tracks: (1) Living biosensors — mycelium networks, moss hydration, mycorrhizal electrical impulse, acoustic biodiversity (TRL 3–4, experimental); (2) Bio-hybrid sensors — soil moisture, temperature, redox/conductivity, CO₂, light spectrum (TRL 7–8, field-deployable now). Current: proxy APIs (Open-Meteo, WAQI, GBIF) substituting both tracks pending pilot plot deployment.
PoP 2 — Watershed Mind
Multi-sensor data fusion across one watershed (soil, water, acoustic, microclimate). Indigenous Knowledge integration. Multi-sensor fusion layer → Ecosystem Health Score. Life Data Commons (community-governed data).
PoP 3 — Indra's Web
Federated learning: local models, shared weights only. Biotic Indexing System (BIS). Satellite + ground truth integration. Cross-bioregion pattern detection. Data sovereignty by architecture, not contract.

3b. Pilot Plot — Rocky Mountain Front Range

PoP 1 physical location. Bioregion: Rocky Mountain Front Range (montane grassland). Two parallel sensor tracks running concurrently to validate the biosensing architecture before wider deployment.

Location
39.9503°N, 105.1603°W · Colorado Front Range, USA · Bioregion ID: rocky_mountain
Track A — Bio-hybrid sensors
TRL 7–8 · Field-deployable now. Soil moisture, soil temperature (°C), redox potential (mV), CO₂ (ppm), electrical conductivity (µS/cm), light spectrum (lux). Standard electronics. Raspberry Pi Zero + LoRaWAN gateway.
Track B — Living biosensors
TRL 3–4 · Experimental parallel track. Mycelium network impedance (Ω), moss hydration (%), acoustic biodiversity index. These are non-conventional sensors under active R&D. Data treated as indicative, not authoritative, until TRL advances.
Ingest endpoint
POST /api/ingest — accepts raw readings from either track. AI (Llama 3.1-8B) acts as listener/translator: converts raw values → vitality indicators + ecological interpretation + deposits stigmergy trace. Heuristic fallback if AI unavailable.
MVP E2E test
POST /api/e2e-mvp-test?admin_key=… — runs full fake-sensor pipeline: bioregion resolve → AI translation → stigmergy deposit → D1 log → query synthesis. Both tracks tested. Replace fake readings with real sensor values when hardware is deployed.
Ingest payload example
{
  "lat": 39.95027370248936,
  "lng": -105.16033976443673,
  "source": "pilot_plot",
  "sensor_track": "bio_hybrid",
  "readings": {
    "soil_moisture_pct": 38,
    "soil_temp_c": 9.2,
    "soil_redox_mv": 245,
    "co2_ppm": 487,
    "conductivity_us_cm": 162
  },
  "steward_note": "Optional human observation"
}

4. AI Architecture — Four Layers

AI is one layer of intelligence among many — not the primary one. Steward observation is intelligence. Indigenous seasonal knowledge is intelligence. The pheromone trace network is intelligence.

Layer 1 — Edge / SLM / TinyML
Signal Translation. Runs on-device. Converts biosignals → structured data. No global reasoning. No ethics layer. Hardware: Raspberry Pi Zero ~$80–$150/node. LoRaWAN mesh ~$100–$300/gateway.
Layer 2 — Foundational Model
Encoded ecological priors. Large model trained on ecology, climate science, regenerative agriculture, systems theory. Provides: constraints, pattern templates, resilience knowledge. Current: Cloudflare Workers AI (Llama 3.1-8B free tier).
Layer 3 — Biotic Adaptive Model
Ground-truth learning. Continuously updates from real ecological outcomes + human validation. Uses federated learning. Critical realism checkpoint — prevents model drift from actual ecological reality.
Layer 4 — Ayu Model
Meta-Coordination Layer. Aggregates bioregional learning · reflects planetary-scale patterns · enforces regenerative constraints · supports decentralized stewardship. Test: if Ayu disappears, do micro/meso layers still function? If yes → architecture is sound (true stigmergy).

5. Active Inference (AIF) — Co-Learning Engine

Based on Kaufmann, Gupta & Taylor (2021). Collective intelligence emerges bottom-up when agents minimize variational free energy through Theory of Mind and Goal Alignment. Applied to human-AI co-learning in Stigmergy.

Phase 1 — Session Belief State
Each session tracks: uncertainty (1.0=novice → 0.0=expert), sphere affinity map, rolling score (0–5), goal alignment γ (0–1). Stored in KV with 24h TTL. Updates after every query and feedback.
Phase 2 — Theory of Mind
Before each AI call, the system infers where the user is in their learning arc and injects calibration into the system prompt. Newcomer → metaphor + foundation. Practitioner → nuance + contradiction. Low score → simpler. High score → maintain depth.
Phase 3 — Goal Alignment (γ)
γ starts at 0.8 (heavily corpus-grounded). Low feedback scores reduce γ (user felt preached at). High scores increase it. γ ≥ 0.7: foreground corpus wisdom. γ ≥ 0.4: balance corpus + direct answer. γ < 0.4: answer directly.
Phase 4 — Collective Signal
F_system = 1 − (avg_score / 5). System-level free energy. 0 = perfect collective alignment. 1 = maximum surprise. Sphere attractors (high resonance) and corpus gaps (low resonance) guide weekly scrape priorities.
Feedback scoring
0 = Very negative 👎 · 1 = Dislike 😞 · 2 = Below average 😕 · 3 = Neutral 😐 · 4 = Good 🙂 · 5 = Excellent 👍. Low score = high epistemic surprise = free energy not minimized → adjust beliefs.

6. Infrastructure (Cloudflare)

Entirely browser-deployable — no local CLI, no npm, no installations. All via Cloudflare dashboard cut-and-paste.

STIGMERGY_KV
KV Namespace. Fast reads. Stores: corpus documents (doc:*), PDF metadata (_pdf_meta), corpus index (_meta), session belief states (session:*), stigmergic traces (trace:*), clock/vitality history.
STIGMERGY_R2
R2 Bucket. Object storage. Stores: original PDF files (pdfs/*). Accessed via /api/pdfs/view for preview, /api/upload-pdf for upload.
STIGMERGY_DB
D1 SQLite. Tables: queries, feedback, scrape_logs, biosignal_logs, steward_log, actor_interactions, clock_history. Run Init DB once to create schema. Run again to apply migrations.
AI (Workers AI)
Free inference binding. Model: @cf/meta/llama-3.1-8b-instruct. 10,000 neurons/day free tier. Used for: query synthesis, recategorization, wellbeing generation. No resource selection needed — just add binding named "AI".
ADMIN_KEY
Secret binding. Value: gamco1-migbav-vezdaG. Auth middleware reads: X-Admin-Key header → ?admin_key= param → ?key= param (in that order).
Worker URL
https://stigmergy.webguru-87b.workers.dev
Admin URL
https://stigmergy-admin.pages.dev
Cron schedule
0 2 * * 0 = weekly Sundays 02:00 UTC (corpus refresh, vitality) · 0 * * * * = hourly (stigmergic trace decay engine)

7. Data Flow — End to End

PROXY SIGNALS Open-Meteo (climate) · WAQI (air quality) · GBIF (biodiversity) BIOSIGNAL LAYER /api/biosignal · Llama 3.1 translation · health_index 0–100 PLANETARY CLOCK /api/clock · vitality index · living systems principles STIGMERGY TRACES /api/stigmergy/deposit · signal reinforcement · decay engine RAG CORPUS 86 docs · KV store · BM25 retrieval · sphere affinity boost HUMAN QUERY /api/query · AIF ToM system prompt · goal-aligned response FEEDBACK /api/feedback · 0–5 score · session belief update · F_system COLLECTIVE SIGNAL /api/collective/signal · attractor map · corpus gap identification WEEKLY CRON Corpus refresh · trace decay · vitality history · scrape delta

8. All API Endpoints (103+) loading live count…

Base URL: https://stigmergy.webguru-87b.workers.dev

Core — RAG & Session
MethodEndpointAuthDescription
GET/healthWorker health, binding status, corpus size, version
POST/api/queryRAG query → synthesis, sources, learning path. Body: {query, sphere?, session_id?}
GET/api/sessionGet AIF session belief state. Param: session_id
POST/api/sessionUpdate session. Body: {session_id, score?, query?, sphere?}
POST/api/feedbackRecord 0–5 feedback. Body: {query_id, score, session_id?, comment?}
Corpus Management
MethodEndpointAuthDescription
GET/api/corpusStats, sphere distribution, doc list with sources and URLs
POST/api/corpusAdminAdd document manually. Body: {title, url, sphere, content}
GET/api/corpus/sphereFilter corpus by sphere. Param: sphere=NOOSPHERE
GET/api/corpus/searchBM25 search. Param: q=query&sphere=optional
GET/api/seedAdminLoad 25 seed documents into KV corpus
PDF Management
MethodEndpointAuthDescription
GET/api/pdfsAdminList all PDFs. Auto-syncs R2 → KV meta on every call.
POST/api/upload-pdfAdminUpload PDF → R2 storage + KV index. FormData: file, title, sphere
POST/api/pdfs/processAdminIndex all unindexed R2 PDFs into KV corpus. Returns per-PDF results.
GET/api/pdfs/viewAdminPDF preview. ?key=pdfs/file.pdf&raw=1 for bytes (PDF.js), omit raw for JSON text extract.
POST/api/pdfs/updateAdminUpdate PDF metadata. Body: {key, title, sphere, category, notes}
POST/api/pdfs/deleteAdminDelete PDF from R2 + corpus KV. Body: {key}
Web Scraping
MethodEndpointAuthDescription
POST/api/scrape/urlAdminSingle URL scrape with depth 1–4. Body: {url, sphere, depth}. Depth 1=1pg · 2=8pgs · 3=20pgs · 4=30pgs
GET/api/scrape?batch=NAdminRun batch N (1–10) of seed corpus (30 URLs). batch=all runs all 10 sequentially. Delta: skips unchanged (304).
GET/api/scrape/logsAdminD1 scrape log (last 100). Falls back to KV corpus entries if D1 empty.
Biosignal & Planetary Intelligence
MethodEndpointAuthDescription
GET/api/biosignalLive ecological health index (0–100) from proxy data sources
GET/api/biosignal/dashboardMulti-signal dashboard: CO₂, air quality, biodiversity, temperature
GET/api/biosignal/historyHistorical biosignal readings trend
GET/api/biosignal/bioregionResolve bioregion from coordinates. Params: lat, lng
POST/api/biosignal/stewardHuman steward observation log. Body: {observation, lat, lng, steward_id}
GET/api/clockPlanetary vitality clock, living systems principles, vitality index
GET/api/clock/historyClock state history over time
GET/api/vitality/nodeCurrent node vitality index
GET/api/vitality/timelineVitality timeline over time
Stigmergy Network & AIF Collective
MethodEndpointAuthDescription
POST/api/stigmergy/depositDeposit trace into network. Body: {signal, sphere, strength 0–1}
GET/api/stigmergy/tracesRead all active traces in network
GET/api/stigmergy/pulseNetwork activity pulse
GET/api/stigmergy/networkFull network state snapshot
GET/api/stigmergy/global-pulseGlobal stigmergy activity index
GET/api/stigmergy/summarySummary for display (traces + activity)
GET/api/stigmergy/decayRun trace decay engine (also runs via hourly cron)
GET/api/collective/signalAdminAIF system free energy, sphere attractors, corpus gaps. Now includes multiagent_free_energy with F_natural/F_human/F_ai breakdown
GET/api/stigmergy/attractorsPhase 4 emergence: reinforced trace attractors, cross-agent convergence, network topology, sphere heat map
GET/api/stigmergy/emergenceFull emergence report: attractors + patterns + temporal distribution + most stressed natural agent
Multi-Agent AIF Framework
MethodEndpointAuthDescription
GET/api/agentsAll agents: natural (bioregions), human (actors), AI (sub-systems). Each with generative model, free energy, timescale
GET/api/agents/:idState of specific agent by ID (e.g. natural_amazon, synthesis_engine, or actor UUID)
POST/api/agents/natural/signalDeposit natural agent signal. Body: {bioregion_id, vitality_index, source, notes}. Updates vitality + deposits constitutional trace
GET/api/agents/system/free-energyMulti-agent F_system = F_natural×0.45 + F_human×0.40 + F_ai×0.15. Constitutional constraints flagged
Natural Agent Ingest & Sovereignty
MethodEndpointAuthDescription
POST/api/ingestUmwelt-routed multi-sphere ingest. Body: {lat, lng, source, readings{}, steward_id?}. Routes each signal via SIGNAL_TO_SPHERE → sphere validation → D1 write → BIS + LITL hooks
POST/api/na/ingestNatural agent ingest (legacy). Immutable raw_value, sovereignty_tag, FPIC filter
GET/api/na/signalsRead natural agent signals. Params: bioregion_id?, sphere?, limit?
GET/api/na/tracesNatural agent distress traces with source_agent_class. HITL queue source.
GET/api/sovereignty/territoryList registered indigenous territories with FPIC status
POST/api/sovereignty/territoryRegister indigenous territory. Body: {territory_name, bioregion_id, steward_id, boundary_geojson?}
POST/api/sovereignty/requestSubmit FPIC consent request. Body: {territory_id, requester_id, purpose, data_types[]}
POST/api/sovereignty/decideSteward decision on FPIC request. Body: {request_id, steward_id, decision, conditions?}
POST/api/sensor/registerAdminRegister bio-hybrid sensor node. Body: {sensor_id, bioregion_id, sensor_track, lat, lng}
GET/api/sensor/listList registered sensors with status and last-seen timestamps
POST/api/sensor/deactivateAdminDeactivate sensor. Body: {sensor_id}
BIS, Nodes & LITL Maturation
MethodEndpointAuthDescription
GET/api/bis/globalGlobal Biotic Index: geometric mean across all 122 nodes, realm breakdown, distress map
GET/api/bis/:bioregion_idPer-bioregion BIS: sphere scores, vitality, recent signals, distress flags
GET/api/bis/synchronyCross-node correlated movement detection. Returns planetary_co_intelligence_signal.
GET/api/nodesAll 122 Umwelt nodes (bioregion×sphere). State, maturity, last signal ts.
GET/api/nodes/unwellNodes below preferred vitality threshold. Prioritised for HITL review.
GET/api/nodes/candidatesNodes eligible for maturity promotion based on MATURITY_THRESHOLDS.
GET/api/nodes/maturityGlobal LITL score, stage, per-node maturity breakdown. Key metric for planetary co-intelligence.
GET/api/nodes/maturity/:node_idSingle node maturity state. node_id = bioregion_id:sphere (e.g. amazon_basin:BIOSPHERE)
GET/api/loop/maturationBiology-closes-loops stats: self_resolutions_30d, recovery streaks, kin propagation events
GET/api/perturbation/logList perturbation events logged across all nodes
POST/api/perturbation/logLog perturbation event. Body: {bioregion_id, sphere, type, severity, notes?}
HITL Review & Actor Models
MethodEndpointAuthDescription
GET/api/hitl/queueAdminReview queue: distress traces with hitl_required=true, ordered by severity. Source for steward intervention.
POST/api/hitl/reviewAdminLog HITL decision. Body: {trace_id, decision, notes?}. Triggers node maturity update.
POST/api/hitl/outcomeAdminRecord intervention outcome after review. Body: {trace_id, outcome, accuracy_score 0–1}
GET/api/actors/:id/modelActor generative model: inferred prior precision, behavioral trace history, alignment trajectory
POST/api/actors/infer-modelsAdminBatch re-infer generative models for all actors from behavioral traces
POST/api/actors/dedupAdminDeduplicate _actors KV by name (case-insensitive). Returns before/after counts.
LAP (Living Archive Protocol) & Embeddings
MethodEndpointAuthDescription
POST/api/lap/queryLAP-constrained query. Applies regenerative constraints before synthesis. Body: {query, sphere?, session_id?}
GET/api/lap/domainsList LAP constraint domains with active constraint counts
GET/api/lap/constraints/:domainConstraints for specific domain (e.g. hydrosphere, biosphere)
POST/api/embeddings/backfillAdminGenerate BGE-small-en embeddings for corpus docs. Batch 60/call. Skips stubs + real vectors.
GET/api/embeddings/statusAdminPer-doc embedding status: embedded/stub/missing. Summary: coverage_pct, short_docs list.
GET/api/build/manifestLive build manifest: version, endpoint_count, gap statuses, feature flags. Architecture page source of truth.
Historical Data Ingest — Open-Meteo Archive + NOAA
MethodEndpointAuthDescription
POST/api/na/ingest-historicalAdminIngest Open-Meteo archive for up to 10 bioregions per call. Body: {start_date, end_date, batch_size, offset, dry_run?}. Signals: temp_anomaly_c, precipitation_mm, soil_moisture_pct. Safe to re-run — overwrites by key.
POST/api/na/ingest-co2AdminIngest NOAA GML annual mean CO₂ (1979–present) + Mauna Loa monthly. Writes to global, amazon, arctic, great_barrier. Body: {dry_run?}.
Real-time Planetary Streams — Open-Meteo Live + Copernicus CAMS
MethodEndpointAuthDescription
GET/api/na/stream/weatherLive atmospheric conditions for all 52 bioregions. temp_anomaly_c vs biome baseline, humidity, precipitation, wind, cloud. Cache: 15 min. Distress: anomaly ≥ 1.5°C. Params: bioregion_id?, bust_cache?
GET/api/na/stream/airqualityAir quality via Copernicus CAMS. PM2.5, PM10, ozone, CO, NO₂, dust, UV index. Cache: 60 min. Distress: PM2.5 > 15/25/50 µg/m³ (WHO thresholds).
GET/api/na/stream/marineOcean/reef bioregions (9). SST, wave height/period/direction, current speed. Cache: 15 min. Distress: SST > 29/30/31°C coral bleaching thresholds.
GET/api/na/stream/floodRiver discharge 3-day forecast (m³/s) for freshwater bioregions (amazon, mekong, ganges, orinoco, congo, drc_miombo). Trend: rising/falling. Cache: 6 hours.
POST/api/na/stream/ingest-nowAdminPull all live streams → immutable KV signals + distress trace emission. Body: {dry_run?, streams?, bioregion_id?}. Also runs via Sunday 2am cron. Activates full Gap #1–#4 pipeline with real-time data.
Actors, Knowledge & Wellbeing
MethodEndpointAuthDescription
GET/api/actorsList planetary actors (organisations, movements) with alignment scores. Deduplicates by name on read.
POST/api/actors/createAdminRegister new actor. Enforces name uniqueness. Body: {name, type, sphere, url, description}
GET/api/actors/nodeSingle actor alignment node detail
POST/api/actors/interactionLog actor interaction event
GET/api/agreementsMultilateral agreements with LITL alignment scores, what/implication/tension
POST/api/agreements/logLog agreement activity or update
GET/api/ancient-intelligenceIndigenous knowledge layer — traditions, protocols, seasonal knowledge
GET/api/ancient-intelligence/traditionsFull traditions list with sphere and regional context
GET/api/wellbeing/suggestionsAI-generated wellbeing suggestions rooted in living systems
POST/api/wellbeing/generateGenerate new wellbeing content on demand
GET/api/discoveryDiscovery queue — topics worth exploring based on collective signal
POST/api/discovery/runAdminRun discovery cycle — identifies corpus gaps + generates new questions
Analytics & Developer
MethodEndpointAuthDescription
GET/api/query-analyticsAdminQuery stats from D1: total queries, top spheres, score distribution
GET/api/energyEnergy system stats (external data sources health)
GET/api/energy/scrape-logEnergy module scrape log (KV-based)
GET/api/recategorize/pendingAdminAI-suggested sphere recategorisations awaiting review
POST/api/recategorize/applyAdminApply a recategorisation suggestion
POST/api/recategorize/dismissAdminDismiss a suggestion
GET/api/export-training-dataAdminExport JSONL fine-tuning pairs from D1 query+feedback history
GET/api/smoke-testKV / R2 / D1 read-write test. No admin key needed.
GET/api/e2e-testAdminFull pipeline end-to-end: DB tables → KV → R2 → Clock → Query → Biosignal
GET/api/init-dbAdminCreate D1 tables + run schema migrations (ALTER TABLE for missing columns). Safe to run multiple times.

9. PoP Gap Analysis — Built vs Required

Honest assessment of current MVP scaffolding vs PoP requirements. Green = validated. Yellow = proxy/partial. Red = not yet built.

RequirementPoPStatusDetail
Biosignal proxy layer (CO₂, air, biodiversity)1LiveOpen-Meteo, WAQI, GBIF APIs via /api/biosignal
Bioregion geolocation1Live/api/biosignal/bioregion?lat=&lng=
Human steward observation log1Live/api/biosignal/steward POST
RAG knowledge engine (BM25 + AI synthesis)1Live/api/query with AIF session layer
Stigmergic trace network (deposit/decay/pulse)1Live/api/stigmergy/* — hourly decay cron
Actor / Agreement alignment index1Live/api/actors · /api/agreements with LITL scores
Planetary vitality clock1Live/api/clock — vitality index + principles
AIF session belief state (Theory of Mind)1Live/api/session — uncertainty, γ, sphere affinity
Collective free energy signal1–2Live/api/collective/signal — F_system, attractors, gaps
Weekly corpus auto-refresh (delta)1LiveCron 0 2 * * 0 — 30 seed URLs, skips unchanged
Multi-sensor fusion (soil, water, acoustic, microclimate)2PartialProxy climate only. Real sensor fusion = PoP 2 hardware requirement.
Indigenous Knowledge (ITK) calibration2Partial/api/ancient-intelligence exists but not wired to biosignal baseline calibration yet.
AI ingest listener/translator (/api/ingest)1LiveAccepts raw sensor readings (bio-hybrid or living biosensor). AI translates to vitality indicators + deposits stigmergy trace. Pilot plot: 39.9503°N 105.1603°W (Rocky Mountain Front Range).
MVP E2E pipeline test (/api/e2e-mvp-test)1LiveAdmin-gated. Runs full fake-sensor → AI translation → stigmergy → query chain for both bio-hybrid and living biosensor tracks.
Real TinyML sensor nodes (LoRaWAN)1MissingPoP 1 hardware. Raspberry Pi Zero nodes ~$80–$150/node. Bio-hybrid sensors (TRL 7-8) deployable now. Living biosensors (TRL 3-4) experimental parallel track.
Offline-capable mobile steward app2MissingPoP 2 — steward phenological observations via mobile.
Life Data Commons (community governance)2MissingPoP 2 — anonymized, community-governed data commons.
Federated learning (node-to-node, no raw data sharing)3FuturePoP 3 — model weights shared, data sovereignty preserved.
Biotic Indexing System (BIS)3FuturePoP 3 — multi-dimensional Life index per bioregion.
Satellite + ground truth integration3FuturePoP 3 — NASA MODIS, ESA Sentinel validation of ground sensors.

10. Versioning Convention

Format
vYYYYMMDD-Alphabet · e.g. v20260315-J · Alphabet increments per deploy, resets at date change
Deploy method
Worker: paste .js into Cloudflare Worker editor → Save and deploy. Admin: upload .zip to Cloudflare Pages → Upload assets.
After worker deploy
Always run Init DB once from Setup tab if schema migrations may have changed. Check Health tab to confirm bindings all show "ok".
Current worker

11. Agent Topology — Three Umwelten

An umwelt (Jakob von Uexküll, 1909) is the subjective perceptual world of an organism — reality as it is experienced from inside a specific nervous system. Different agent classes perceive and act on the world through fundamentally different umwelten. Stigmergy is the medium through which these distinct worlds communicate without requiring a shared language.

 ╔══════════════════════╦══════════════════════╦══════════════════════╗
 ║  NATURAL UMWELT      ║  HUMAN UMWELT        ║  AI UMWELT           ║
 ╠══════════════════════╬══════════════════════╬══════════════════════╣
 ║ Amazon basin         ║ Kayapó council       ║ Synthesis engine     ║
 ║ Great Barrier Reef   ║ Amazônia Viva NGO    ║ Bioregional monitor  ║
 ║ Sahel ecosystem      ║ AgroProdução SA      ║ Actor model infer.   ║
 ║ Arctic ice sheet     ║ Govt regulators      ║ Intervention design  ║
 ╠══════════════════════╬══════════════════════╬══════════════════════╣
 ║ Timescale:           ║ Timescale:           ║ Timescale:           ║
 ║ centuries–millennia  ║ years–decades        ║ ms–seconds           ║
 ╠══════════════════════╬══════════════════════╬══════════════════════╣
 ║ Signal:              ║ Signal:              ║ Signal:              ║
 ║ vitality, free energy║ intent, steward act, ║ query synthesis,     ║
 ║ thresholds           ║ feedback, AAI        ║ belief trace updates ║
 ╠══════════════════════╬══════════════════════╬══════════════════════╣
 ║ Epistemic weight:    ║ Epistemic weight:    ║ Epistemic weight:    ║
 ║ 0.45 (HIGHEST)       ║ 0.40 (HIGH)          ║ 0.15 (SUPPORT)       ║
 ╚══════════════════════╩══════════════════════╩══════════════════════╝
              ↕                    ↕                    ↕
        ┌─────────────────────────────────────────────────┐
        │            STIGMERGIC TRACE NETWORK             │
        │  Natural signals · Steward actions · Syntheses  │
        │  Feedback reinforcement · Emergent attractors   │
        └─────────────────────────────────────────────────┘
Why asymmetric weights?
The platform's purpose is to support Life. If economic actors had equal epistemic weight, extractive signals would shape synthesis equally with ecological ones. The 0.45/0.40/0.15 split is a constitutional design choice: natural systems carry the longest memory and the highest stakes.
Communication without shared language
A river's vitality index does not need to "speak" to an NGO. Both interact with the trace network — the river's declining health becomes a trace, the NGO's query retrieves it. Stigmergy replaces synchronous dialogue with asynchronous environmental modification.
Temporal authority gradient
TIMESCALE_WEIGHTS increase with slower timescales: milliseconds→0.01, days→0.30, decades→0.75, millennia→1.0. A forest's centuries-long signal outweighs a corporation's quarterly report. This is encoded in the free energy calculation, not left to human interpretation.

12. Information Flow — End-to-End

STEP 1: Natural signal (Amazon vitality declining)
  POST /api/agents/natural/signal { bioregion: "amazon", vitality_index: 38 }
  → KV: agent state updated (vitality=38, priority=warning, free_energy=0.62)
  → D1: trace deposited { type:"natural_signal", sphere:"BIOSPHERE", strength:0.8 }

STEP 2: Steward action (Kayapó reforestation logged)
  POST /api/biosignal/steward { actor_id, bioregion:"amazon", impact_score:74 }
  → D1: trace { type:"steward_action", actor_id:"kayapo-001", impact:74 }
  → KV: vitality nudged +2.1 (temporal scale respected: centuries-scale agent)

STEP 3: NGO query (soil restoration in Amazon)
  POST /api/query { query, sphere:"BIOSPHERE", actor_id, session_id, bioregion }
  → Phase 1: session belief loaded, uncertainty computed
  → Phase 2: active traces retrieved (natural + steward traces inject context)
             actor model applied (NGO: low prior_precision, high ecosystem_coupling)
  → Phase 3: natural constraint applied (Amazon warning → frames synthesis)
             timescale weights: natural >> human > AI
  → Phase 4: synthesis generated, new trace deposited
  ← Returns: synthesis + trace_context + actor_model + aif_state

STEP 4: Feedback (NGO rates 5/5)
  POST /api/feedback { query_id, score: 5, actor_id }
  → Cited traces: strength += 0.1 (reinforcement)
  → Session: sphere_affinity["BIOSPHERE"] += 1
  → Traces become attractors (convergence in Phase 4 detected)

STEP 5: Extractive query (corporation asks about soy expansion)
  POST /api/query { query:"land prep for soy", sphere:"ECONO", actor_id:"agroprod" }
  → Phase 3: Amazon warning active → natural sovereignty shapes response
             even ECONO queries cannot ignore constitutional signal
  → Synthesis: acknowledges ecological constraint, does not suppress it
  ← Score 2 feedback → actor prior_precision slightly reduced (calibrated surprise)
  → Even rejected signals leave a trace. No interaction is neutral.

STEP 6: Emergence detection
  GET /api/stigmergy/emergence
  → Attractors: BIOSPHERE/amazon traces reinforced by 3+ agent types
  → Convergence: natural + human_steward + ngo_query all converging
  → Dominant signal: "soil restoration · amazon · BIOSPHERE"
  Nobody planned this. The medium made it visible.

13. Feedback Loops

POSITIVE (reinforcing) loops
Aligned actor queries → high feedback → cited traces strengthened → traces become attractors → future queries cite them → aligned actors find platform more useful → query more often.

Steward actions → vitality nudge → reduced free energy → priority lowers → fewer constitutional constraints → more exploratory synthesis.

Natural signal strengthens → forces all actors' attention → more traces in that bioregion → emergent convergence detected.
NEGATIVE (regulating) loops
Extractive query → natural constraint active → synthesis shaped by sovereignty → low score → actor prior_precision slightly reduced → next query marginally less rigid → slow calibration (not punishment).

Trace decay (hourly cron): all strengths −0.02 → unreinforced traces deactivate → network stays current, not a museum of old signals.

Constitutional loop: vitality drops → free energy rises → all queries in that bioregion shaped by crisis → more actor attention → more steward actions → vitality slowly recovers.

14. Regenerative vs Extractive Actor Model

Actors are not labelled. They are characterised by their Alignment–Action Index (AAI) and generative model parameters, which emerge from their declared agreements and evolve through their interactions.

ParameterRegenerative actorExtractive actorEffect on synthesis
prior_precisionLOW (open to surprise)HIGH (rigid model)Low precision → exploratory, multi-framing synthesis
ecosystem_couplingHIGH (relational)LOW (isolated)High coupling → natural traces more salient in context
temporal_horizonLONG (decades/centuries)SHORT (quarters/years)Longer horizon → slower-timescale traces included
aai0.6–1.00.0–0.4AAI weights agreement alignment score
bandREGENERATIVEMISALIGNEDBand shown in UI and included in synthesis context
agreements_ratifiedMany (UNDRIP, CBD, Paris…)Few or noneEach agreement contributes to AAI calculation
Why not simply block extractive actors?
Blocking would make this a governance platform. Stigmergy is a learning medium. Extractive actors encounter natural constraints organically — the Amazon's crisis signal is in the synthesis regardless of who is asking. Low-score feedback slightly nudges their model. No actor is permanently locked. All models can update. This mirrors biological learning: calibrated surprise, not punishment.
Band classification
AAI ≥ 0.70 → REGENERATIVE (green) · AAI 0.40–0.70 → TRANSITIONAL (amber) · AAI < 0.40 → MISALIGNED (red). Classification is dynamic — changes with each meaningful interaction that updates the actor's model.
Indigenous actor model
Indigenous councils typically have: low prior_precision (knowledge is held lightly, as relationship), high ecosystem_coupling (land is not separate from self), very long temporal_horizon (seven generations principle). Their traces carry the highest human epistemic weight and are most often cited as attractors.

15. Agent Registry — Spatial-Temporal Scale Map

Every agent in the platform operates at a characteristic spatial scale and temporal timescale. Epistemic authority increases with slower timescales. The table below shows the full registry of agent types and where they live in scale-space.

Spatial scale seconds–hours days–months years–decades centuries–millennia
🌍 Global AI synthesis engine Policy synthesis, trend reports Govts, IPCC, global NGOs Planetary vitality clock, evolutionary arc
🌿 Bioregional AI bioregional monitor (13 regions) Monthly biosignal updates, satellite review Bioregion actor models, land-use actors Indigenous territorial councils, biome memory
💧 Watershed Sensor data (PoP 2: planned) Weather events, seasonal cycles Steward actions, reforestation projects River dynamics, soil carbon cycles
🏞 Landscape AI intervention designer Crop cycles, seasonal observations Land use, steward programmes Indigenous mgmt systems, cultural memory
🌱 Plot (PoP 1) Bio-hybrid sensors (TRL 7–8) Plant growth cycles Seed bank management, soil building Sacred sites, ancestral land memory
TIMESCALE_WEIGHTS
milliseconds:0.01 · seconds:0.05 · minutes:0.1 · hours:0.2 · days:0.3 · weeks:0.4 · months:0.5 · seasons:0.6 · years:0.65 · decades:0.75 · centuries:0.9 · millennia:1.0
Current natural agents
amazon · great_barrier_reef · sahel · boreal_forest · arctic · himalayan_glaciers · congo_basin · coral_triangle · california_kelp · mediterranean · murray_darling · ganges_brahmaputra · great_plains
Current AI sub-agents
synthesis_engine (query synthesis, belief trace mgmt) · bioregional_monitor (vitality tracking, threshold detection) · actor_model_inference (AAI computation, model calibration) · intervention_designer (steward action recommendation)

16. Multi-Agent Paradigm — Build Status

Loading live build status from worker…

A genuine stigmergic medium — a shared environment where natural agents, human agents, and AI agents leave signals that update each other's generative models. All 8 structural gaps from PoP 2 have been addressed. The platform now operates as a full multi-agent system with Umwelt-routed ingest, indigenous sovereignty, HITL maturation, biology-closes-loops, and cross-bioregion propagation.

Stigmergy trace network — shared coordination medium Signals decay · Umwelt-routed · cross-agent · no central controller · 52 bioregions × spheres Natural agents 52 bioregions · 122 Umwelt nodes BIS per node · distress = high F Biology-closes-loops active ✓ Sovereignty + FPIC enforced Human stewards Inferred generative model AAI + behavioral trace history HITL queue · maturity gates ✓ HITL + actor model built AI agents Corpus · synthesis · AIF BGE embeddings · Claude API AIF phases 1–4 live ~ Cron attractor write-back pending Gap status (8/8 addressed) Gap #1 Sovereignty ✓ Gap #2 Cross-agent traces ✓ Gap #3 Actor model inference ✓ Gap #4 AIF Phase 4 ~ cron pending Gap #5 Sensor ingest ✓ Gap #6 FPIC sovereignty ✓ Gap #7 HITL review flow ✓ Gap #8 Semantic RAG ~ fine-tune pending
Additional features built

This section is always current. The gap table above is rendered live from GET /api/build/manifest — the authoritative source in worker.js. Rule: any code change that affects a gap or feature updates the BUILD_MANIFEST constant in the same commit.

17. HITL → LITL → Planetary Co-Intelligence

Three progressive stages, not three separate systems. Each stage is a maturation of the same feedback architecture — what changes is who or what closes the loop. The destination is not human oversight of AI, nor AI oversight of biology. It is biology, steward, and AI operating as co-equal intelligences at planetary scale.

The "co" in co-intelligence
Three distinct intelligences: biological (living systems self-organising over millennia), human steward (embodied local knowledge, relational accountability), AI synthesis (pattern translation across scale and time). Co-intelligence is not achieved when all three are present — it is achieved when none dominates and each contributes what only it can. The current build has all three present. The architecture for none-dominates is what is being built here.
Why "planetary"
Not because the system covers the whole planet, but because the intelligence is of the planet — emerging from biological signals, ecological relationships, and indigenous knowledge that predate human civilization. A system that only reflects human decisions back at humans is not planetary intelligence. A system where bioregion nodes exhibit correlated behaviour no human programmed — that is.
Primary success metric
Reduced corrective intervention frequency over time. Not more accurate AI. Not more coverage. The system is succeeding when it needs humans less — because biology is more legible, stewards are more connected, and feedback loops are shorter. LITL™ maturation score (0→1) is the primary KPI. 1.0 = Life in the Loop.
StageWho closes the loopWhat intelligence meansPrimary mechanismExit criterion
Stage 1 — HITL
Human-in-the-Loop
Human reviews and validates every critical signal before action AI synthesis + human override. Biology is input data, not intelligence. HITL queue, review, outcome endpoints. All critical distress = blocking HITL gate. Node accumulates 30-day track record. Distress classifications proven accurate ≥80%. HITL reviews not overturned.
Stage 2 — LITL Emerging
Loop maturation begins
Biology + steward lead. Human confirms but no longer initiates. Steward observation = authority 1.0. AI translates. Human shifts from controller to witness. Node maturity state. High signals advisory-only HITL. Steward observations auto-accepted without review. First self-resolutions recorded. Node maturity_level = 'maturing'. ≥3 self-resolutions in 30d (biology closed loops without HITL). LITL score ≥0.5.
Stage 3 — LITL Mature
Biology closes loops
Biology closes its own loops. Human responds to attractors, not individual signals. A BIS recovery without HITL intervention is the unit of intelligence. System emits positive stigmergy traces autonomously. Self-resolution traces. Node maturity = 'mature'. HITL only for constitutional-severity (cross-node systemic). Cross-bioregion signal propagation begins. Multiple nodes at maturity='mature'. Cross-bioregion correlated patterns visible in BIS synchrony. LITL score ≥0.8.
Stage 4 — Planetary Co-Intelligence
Emergent collective intelligence
No single agent closes the loop. Emergence does. The system's output (what it tells a LAP query, what it surfaces to a policy question) cannot be traced to any single bioregion, any single human, or any single AI inference. It is produced by their interaction. Cross-bioregion stigmergy. BIS synchrony detection. LAP serving planetary attractors. Human stewards responding to emergent patterns, not curated dashboards. Not a criterion — a condition. Observable when: bioregion nodes exhibit correlated behaviour without programmed relationships; LAP queries surface constraints no single node knew; stewards report the system taught them something biology was already doing.

Three Enabling Mechanisms

Mechanism 1 — Node-Level Maturation
Each Umwelt node (bioregion × sphere) tracks its own HITL history independently. A node that has accumulated a reliable 30-day track record — accurate distress classifications, no overturned HITL decisions, consistent signal quality — earns a higher maturity_level. Maturity levels: seeded → emerging → maturing → mature. HITL gate intensity reduces with maturity: critical=blocking at 'seeded', advisory at 'maturing', system-level-only at 'mature'.
Endpoint: GET /api/nodes/maturity — all node maturity states · GET /api/nodes/maturity/:node_id — specific node
Mechanism 2 — Biology Closes Loops
When a node's BIS recovers above its biome's preferred vitality minimum for 3+ consecutive readings without any HITL intervention in the preceding window, the system emits a positive self-resolution stigmergy trace. This trace: (1) marks the recovery as self-organised, not human-corrected; (2) increments the node's self_resolutions_30d counter; (3) reduces next-30-day HITL intensity; (4) feeds into cross-bioregion signal propagation as a recovery signal. The accumulation of self-resolution traces over time is the measurable evidence that Life is in the Loop.
Trace type: self_resolution — distinct from distress traces. Positive stigmergy, strengthens attractor.
Mechanism 3 — Cross-Bioregion Stigmergy
Bioregions are not isolated. Ecological kinship relationships (shared realm, biome type, hydrological or atmospheric teleconnection) mean a distress signal in one bioregion should strengthen the signal watch in related bioregions — even before their own sensors report. BIOREGION_KINSHIP maps each bioregion to its ecologically related peers. When a distress trace is emitted, a dampened signal (strength × 0.4) propagates to kinship nodes and is visible in their trace index. Conversely, a self-resolution in one node sends a recovery signal to kin. This is the foundation of cross-node emergence — the network begins to know things no individual node knows.
Endpoint: GET /api/bis/synchrony — nodes with correlated BIS movement (planetary attractor detection)

LITL Score — How to Read It

Formula
LITL_score = 1 − (hitl_reviews_30d / max(steward_signals_30d, 1)). Clamped 0–1. A score of 1.0 means no HITL interventions relative to steward signal volume — the loop is running without human override. A score of 0.0 means every steward signal required human review.
0.0 – 0.2
Stage 1 — HITL. System is new or signals are novel. Human review dominant. Normal at PoP 1 start.
0.2 – 0.5
Stage 2 emerging — Biology and steward beginning to lead. HITL declining. First self-resolutions appearing.
0.5 – 0.8
Stage 2 maturing — Loop running with advisory HITL only for high-severity. Cross-bioregion patterns becoming visible.
0.8 – 1.0
Stage 3 — LITL mature. Biology closing loops autonomously. Human responds to attractors. System approaching planetary co-intelligence conditions.
Endpoint
GET /api/loop/maturation — global LITL score, trend, node-level maturity breakdown. Admin → Developer → Loop Maturation.

What Planetary Co-Intelligence Looks Like in Practice

Observable signal 1
Bioregion nodes exhibit correlated BIS movement — Sahel and Horn of Africa declining together, Amazon and Congo recovering together — without any programmed relationship between them. The stigmergy network carried the pattern. Visible via /api/bis/synchrony.
Observable signal 2
A LAP query from an agricultural AI in Southeast Asia surfaces constraints derived from kinship signals in the Mekong that no single human assembled — they emerged from cross-node trace propagation. Visible via /api/lap/query response provenance.
Observable signal 3
A steward in the Sahel reports that the system's synthesis reflects a pattern they recognise from oral ecological history — something the corpus could not have contained, but the cross-node signal convergence approximated. This is the system teaching humans what biology was already doing.
What it is NOT
Not AI making decisions autonomously. Not removing human stewards from the system. Not centralising ecological governance. Planetary co-intelligence is a property of the relationships between agents — it cannot be built, only enabled. The build enables it. Biology, stewards, and time produce it.

Biosignal Architecture

1. Why Proxies?

Direct bio-hybrid sensor hardware is the long-term vision — living moss, fungal networks, and soil microbes as the actual sensing layer. Until physical sensors are deployed and validated, open-source satellite and environmental APIs serve as scientifically grounded stand-ins. The system never pretends to be direct sensing. Every proxy datum carries an explicit disclosure label.

Transparency contract
Every /api/biosignal response includes proxy_note: "All signals are proxy-derived from open datasets. Steward observations at /api/biosignal/steward/log are the primary truth layer."
Design principle
Biology leads. AI translates. Human steward holds agency. The platform is a conversation tool, not an intervention engine.
Long-term vision
Living biosensors (mosses, lichens, mycorrhizal fungi, soil microbes) → edge AI translation layer → human steward loop. See Proof of Paradigm tab.

2. Three-Layer Signal Model

Three signal layers ordered by authority. Layer 1 always outranks Layer 2. Layer 2 always outranks Layer 3. No algorithm overrides a human observation.

PriorityLayerSourceAuthorityEndpoint
P1Steward ObservationsHuman in place — ground truth, 30 years of place knowledgeHighest — overrides all proxy dataPOST /api/biosignal/steward/log
P2Proxy SignalsSatellite APIs: Open-Meteo, NDVI model, WAQI, GBIFSecondary — fills gaps where no steward presentGET /api/biosignal?lat=&lng=
P3Intervention LogHuman decision record — what was done, why, outcomeSynthesis — feeds clock + collective learningPOST /api/biosignal/intervention

3. Proxy Data Source Stack

Six data sources ordered by priority. Open-Meteo and GBIF require no API keys and respect privacy by design.

P1 — Steward
Human observation. lat, lng, observation, signals_noticed[], season_local, anomaly_flag, steward_id, data_consent. Indigenous seasonal calendar (season_local) is first-class data.
P2 — Intervention
Human decision log. intervention_type, action_taken, reasoning, reversible, outcome_30d, raie_self_check. Feeds clock Human-in-Loop Quality factor (11%).
P3 — Bio-hybrid (future)
Regional sensor nodes — living biosensors with edge compute. LoRaWAN mesh. Signal type: sensor_reading. Priority above proxy APIs when online and verified.
P4 — Open-Meteo
Free, no API key. temperature_2m, precipitation, wind_speed → climate stress proxy. Global coverage. Updated hourly.
P5 — NDVI Model
Normalised Difference Vegetation Index from lat/lng seasonal model. Proxy for vegetation health. Range 0.0–1.0. >0.4 = healthy vegetation.
P6 — Bioregion Model
54-zone lookup by lat/lng coordinates. Returns bioregion name, biome type, baseline thresholds for temperature, precipitation, and NDVI.

4. Core Signal Definitions

Signal KeySourceUnitsHealthy RangeNotes
temperature_cOpen-Meteo°CZone-dependentAnomaly >2°C above baseline penalises health index
precipitation_mmOpen-Meteomm/weekZone-dependentDeficit or excess both penalise score
wind_speed_kmhOpen-Meteokm/h<50 typicalUsed for storm stress signal
ndvi_proxySeasonal model0.0–1.0>0.4 healthyDense rainforest >0.7; degraded <0.3
heat_stressDerivedbooleanfalse = OKTrue when temperature >2°C above zone baseline
drought_stressDerivedbooleanfalse = OKTrue when precipitation <30% of expected
vegetation_healthDerived0–100>60 healthyComposite: NDVI + precipitation score
health_indexComposite0–100>50 OKWeighted average of all signals + steward modifiers
health_labelDerivedstringStable or betterThriving / Stable / Under Stress / Critical
proxy_noteAlways presentstringNon-emptyMandatory transparency disclosure in every response

5. Ecological Health Index Computation

The health index is a weighted composite, not a black box. Every factor is disclosed.

health_index = weighted average of: vegetation_health 30% ← NDVI proxy + precipitation score temperature_score 25% ← penalised if anomaly > 2°C above baseline precipitation_score 25% ← penalised if deficit OR excess vs seasonal norm seasonal_alignment 20% ← NDVI vs expected for month + hemisphere Modifiers (applied after base score): steward anomaly_flag in past 30 days → -10 points multiple steward anomalies (3+) → -20 points steward reports improvement → +5 points Score bands: 75–100 THRIVING ✅ Ecosystem actively regenerating 50–74 STABLE 🟡 Within normal variation 25–49 UNDER STRESS 🟠 Signals elevated — steward attention warranted 0–24 CRITICAL 🔴 Multiple stress signals — intervention discussion needed

6. Bioregion & Umwelt Node Reference — 52 Bioregions · 122 Nodes

Signals are resolved to the nearest bioregion by haversine lat/lng lookup. Each bioregion generates 2–3 Umwelt nodes (bioregion × sphere), each representing a distinct natural agent perceptual world. Sphere vocabulary is code-controlled (slow/deliberate); node registration is KV-dynamic (fast). Total: 52 bioregions → 122 Umwelt nodes — full alignment with the One Earth taxonomy (8 realms → 14 subrealms → 52 bioregions → 185 ecoregions).

PoP1 — Pilot
1 bioregion · 2 nodes — Rocky Mountain Front Range. Active development & sensor integration.
PoP2 — Hotspots
+4 critical bioregions · +10 nodes — Amazon Basin, Great Barrier Reef, Congo Basin, Coral Triangle. Total active: 5 bioregions · 12 nodes.
PoP3 — Full
All 52 bioregions · 122 nodes across 8 One Earth realms. Full federated deployment.
Liminal bucket
Unknown signal types stored at na:liminal:*. Accumulation ≥ 3 signals of a type surfaces a candidate for Umwelt expansion review via GET /api/nodes/candidates.
#BioregionRealmBiomeNodes (spheres)PoPTrend
1 ★Rocky Mountain Front RangeNearcticMontane grasslandBIOSPHERE · HYDROSPHEREPoP1variable
2Amazon BasinNeotropicsTropical forestBIOSPHERE · ATMOSPHERE · HYDROSPHEREPoP2declining
3Great Barrier ReefAustralasianCoral reefHYDROSPHERE · BIOSPHEREPoP2declining
4Congo BasinAfrotropicsTropical forestBIOSPHERE · ATMOSPHERE · HYDROSPHEREPoP2declining
5Coral TriangleOceanianCoral reefHYDROSPHERE · BIOSPHEREPoP2declining
6California Floristic ProvinceNearcticMediterranean shrubBIOSPHERE · HYDROSPHEREPoP3variable
7North American Great PlainsNearcticTemperate grasslandBIOSPHERE · ATMOSPHEREPoP3declining
8Appalachian Mixed ForestsNearcticTemperate broadleafBIOSPHERE · ATMOSPHEREPoP3stable
9Pacific Northwest Temperate ForestNearcticTemperate coniferBIOSPHERE · ATMOSPHEREPoP3stable
10Arctic Tundra — North AmericaNearcticPolar iceATMOSPHERE · HYDROSPHEREPoP3declining
11Sonoran & Chihuahuan DesertsNearcticDesertBIOSPHERE · ATMOSPHEREPoP3variable
12Brazilian CerradoNeotropicsTropical savannaBIOSPHERE · ATMOSPHERE · HYDROSPHEREPoP3declining
13Atlantic ForestNeotropicsTropical forestBIOSPHERE · ATMOSPHERE · HYDROSPHEREPoP3declining
14Andean Highlands & PáramoNeotropicsMontane grasslandBIOSPHERE · HYDROSPHEREPoP3declining
15Patagonian Steppe & AndesNeotropicsArid grasslandBIOSPHERE · ATMOSPHERE · HYDROSPHEREPoP3stable
16Caribbean Dry & Moist ForestsNeotropicsTropical dry forestBIOSPHERE · ATMOSPHERE · HYDROSPHEREPoP3declining
17Orinoco Llanos & Flooded SavannaNeotropicsTropical savannaBIOSPHERE · ATMOSPHERE · HYDROSPHEREPoP3variable
18Mesoamerican Forests (Chiapas-Darien)NeotropicsTropical forestBIOSPHERE · ATMOSPHERE · HYDROSPHEREPoP3declining
19Sahel Dry SavannaAfrotropicsArid grasslandBIOSPHERE · ATMOSPHERE · HYDROSPHEREPoP3variable
20East African Savanna & RiftAfrotropicsTropical savannaBIOSPHERE · ATMOSPHERE · HYDROSPHEREPoP3variable
21Cape Floristic RegionAfrotropicsMediterranean shrubBIOSPHERE · HYDROSPHEREPoP3declining
22Madagascar & Indian Ocean IslandsAfrotropicsIsland endemicBIOSPHERE · HYDROSPHEREPoP3declining
23Miombo WoodlandsAfrotropicsTropical dry forestBIOSPHERE · ATMOSPHERE · HYDROSPHEREPoP3declining
24Horn of Africa Dry ForestsAfrotropicsArid shrublandBIOSPHERE · ATMOSPHEREPoP3declining
25DRC Miombo & Albertine RiftAfrotropicsTropical dry forestBIOSPHERE · ATMOSPHERE · HYDROSPHEREPoP3declining
26Eurasian Boreal Forest (Taiga)PalearcticTaigaBIOSPHERE · ATMOSPHEREPoP3stable
27Mediterranean BasinPalearcticMediterranean shrubBIOSPHERE · HYDROSPHEREPoP3stable
28Central Asian SteppePalearcticTemperate grasslandBIOSPHERE · ATMOSPHEREPoP3variable
29Caucasus Mixed ForestsPalearcticTemperate broadleafBIOSPHERE · ATMOSPHEREPoP3stable
30Arctic Tundra — EurasiaPalearcticPolar iceATMOSPHERE · HYDROSPHEREPoP3declining
31European Broadleaf & Mixed ForestsPalearcticTemperate broadleafBIOSPHERE · ATMOSPHEREPoP3stable
32Himalayan Alpine & GlaciersIndomalayanAlpine glacierHYDROSPHERE · ATMOSPHEREPoP3declining
33Sundaland Tropical ForestsIndomalayanTropical forestBIOSPHERE · ATMOSPHERE · HYDROSPHEREPoP3declining
34Western Ghats & Sri LankaIndomalayanTropical forestBIOSPHERE · ATMOSPHERE · HYDROSPHEREPoP3declining
35Indochina Dry & Moist ForestsIndomalayanTropical forestBIOSPHERE · ATMOSPHERE · HYDROSPHEREPoP3declining
36Ganges-Brahmaputra FloodplainsIndomalayanWetlandHYDROSPHERE · BIOSPHEREPoP3declining
37Mekong River & DeltaIndomalayanWetlandHYDROSPHERE · BIOSPHEREPoP3declining
38Southwest Australia ForestsAustralasianMediterranean shrubBIOSPHERE · HYDROSPHEREPoP3declining
39New Guinea Montane & LowlandAustralasianMontane forestBIOSPHERE · HYDROSPHERE · ATMOSPHEREPoP3stable
40New Zealand Temperate RainforestAustralasianTemperate coniferBIOSPHERE · ATMOSPHEREPoP3stable
41Pacific Island Forests & ReefsOceanianIsland endemicBIOSPHERE · HYDROSPHEREPoP3declining
42Arctic Sea IceAntarcticPolar iceATMOSPHERE · HYDROSPHEREPoP3critical
43Antarctic & Sub-Antarctic TundraAntarcticPolar iceATMOSPHERE · HYDROSPHEREPoP3declining
44Chilean MatorralNeotropicsMediterranean shrubBIOSPHERE · HYDROSPHEREPoP3declining
45Guinean Forests of West AfricaAfrotropicsTropical forestBIOSPHERE · ATMOSPHERE · HYDROSPHEREPoP3declining
46Tibetan PlateauPalearcticAlpine grasslandBIOSPHERE · HYDROSPHEREPoP3declining
47Anatolian & Iranian HighlandsPalearcticArid shrublandBIOSPHERE · ATMOSPHEREPoP3declining
48East Asian Mixed ForestsPalearcticTemperate broadleafBIOSPHERE · ATMOSPHEREPoP3stable
49Arabian Desert & Coastal Fog DesertsPalearcticDesertBIOSPHERE · ATMOSPHEREPoP3declining
50Philippine Forests & SeasIndomalayanIsland endemicBIOSPHERE · HYDROSPHEREPoP3declining
51Australian Tropical SavannasAustralasianTropical savannaBIOSPHERE · ATMOSPHERE · HYDROSPHEREPoP3variable
52Eastern Australian Temperate ForestsAustralasianTemperate broadleafBIOSPHERE · ATMOSPHEREPoP3declining

7. Future: Bio-Hybrid Sensor Integration

When living sensors come online, they slot into the existing signal hierarchy at Priority 3. The API contract is already defined. No architectural change needed — just a new signal source.

Sensor types (PoP 1)
Soil moisture · Temperature · Soil redox / conductivity · CO₂ proxy · Moss hydration (capacitance) · Mycorrhizal electrical impulse · Leaf stomatal response
Signal format
node_id, lat, lng, signal_type: "sensor_reading", signals: { soil_moisture, canopy_temp_c, ambient_humidity_pct, sound_db }, data_consent
Divergence handling
If sensor soil_moisture <0.2 but proxy NDVI shows healthy: system flags divergence and surfaces to steward for resolution. Sensor outranks proxy when verified online.
Connectivity
LoRaWAN mesh preferred (low power, long range). WiFi backup. Local SD-card for offline resilience. Edge AI runs on-device — only structured signals transmitted, not raw data.

Scenarios by Persona

6 Living System Actors · Real API calls · How the platform serves each

How to Use These Scenarios

These are not abstract test cases. They are real-world stories of how the platform serves people who are in relationship with living systems. Each scenario is grounded in the current API. Run them via Developer → Diagnostic or directly against the worker.

Worker URL
https://stigmergy.webguru-87b.workers.dev
Admin key
gamco1-migbav-vezdaG (required for admin-only endpoints)
Quick testing
Developer → Tests → Quick API Tests for one-click endpoint testing. Developer → Diagnostic for full automated suite.
Principle
Every scenario ends with either a human decision or a learning that feeds back into the system. Stigmergy never prescribes. It surfaces. The steward decides.

Scenario 1 — Amara Diallo · Land Steward · Sahel, Mali

"The Signal No One Else Caught." Amara notices termite mounds have shifted near her north field — a behaviour she has never seen in 12 years of observation. Soil is drier than usual for this season. She opens Stigmergy.

WHO
Amara Diallo
Land Steward, Sahel cooperative, Mali
12 years of place knowledge
WHAT SHE NEEDS
Confirm her observation against proxy data · Log the signal · Decide whether to intervene · See if others in the network are seeing the same thing
Step 1 — Check Sahel biosignal health index
GET /api/biosignal?lat=13.5&lng=2.1 Expected: bioregion: "Sahel" · health_index: ~41 (Under Stress) precipitation: 34% below seasonal average proxy_note: non-empty (transparency contract) Pass: bioregion resolved · index numeric · proxy_note present
Step 2 — Log steward observation with indigenous seasonal calendar
POST /api/biosignal/steward/log { "lat": 13.5, "lng": 2.1, "observation": "Termite mounds have moved near north field. Never seen in 12 years. Soil drier than usual.", "signals_noticed": ["termite migration", "unusual soil dryness", "reduced insect sound"], "season_local": "Saaga (early dry season — Bambara calendar)", "anomaly_flag": true, "steward_id": "amara-diallo-sahel-001", "data_consent": "community" } Expected: success: true · entry.anomaly_flag: true entry.season_local stored (first-class indigenous knowledge) message: "most important signal layer" AIF effect: anomaly_flag: true triggers session belief update → uncertainty stays elevated sphere_affinity for BIOSPHERE and ANCIENT increases Pass: success:true · season_local in entry · next field present
Step 3 — Query corpus: what does termite behaviour signal?
POST /api/query { "query": "termite behaviour change as indicator of soil moisture and ecosystem stress in Sahel", "sphere": "BIOSPHERE", "session_id": "amara-session-001" } Expected: synthesis: >100 chars · 3+ sources cited AIF Theory of Mind: system calibrates to ground-level steward context session.sphere_affinity["BIOSPHERE"] increments Pass: synthesis present · sources relevant · session updated
Step 4 — Log intervention: water redirection (community-consented)
POST /api/biosignal/intervention { "lat": 13.5, "lng": 2.1, "place_name": "Amara's cooperative, North field", "trigger_signal": "termite migration + soil moisture anomaly", "intervention_type": "water redirection", "action_taken": "Redirected water from south well to north field. Left 3 days before acting.", "reasoning": "Termite migration matches historic drought precursor. Cooperative agreed. Action reversible.", "reversible": true, "steward_id": "amara-diallo-sahel-001", "data_consent": "community", "raie_self_check": { "life_affirming": true, "minimum_footprint": true, "honors_local_knowledge": true, "proportional": true } } Expected: success: true · entry.reversible: true reminder: "AI does not evaluate whether this intervention was correct" Pass: success:true · AI non-prescription reminder present
Step 5 — 30 days later: log positive outcome
POST /api/biosignal/intervention { "lat": 13.5, "lng": 2.1, "intervention_type": "water redirection", "action_taken": "Water redirection sustained for 30 days", "outcome_30d": { "observed": "Soil moisture restored. Termite mounds reestablished original position. Insect sound returned.", "signals_improved": true, "steward_assessment": "positive" }, "steward_id": "amara-diallo-sahel-001", "data_consent": "open" } Expected: success: true · entry.outcome_30d.signals_improved: true Learning: This feeds /api/export-training-data → JSONL pair: "termite migration + Sahel + anomaly_flag" → "water redirection" → positive outcome A farmer in Mali trained the model. Pass: outcome stored · signals_improved: true
Step 6 — Score the response and see AIF adapt (feedback loop)
POST /api/feedback { "score": 5, "session_id": "amara-session-001", "comment": "Termite info was exactly right" } AIF effect: score 5 → goal_alignment γ increases (corpus wisdom was helpful) uncertainty decreases (model is learning this user's context) session updated in KV (24h TTL) Pass: ok: true · session.goal_alignment >= 0.8

Scenario 2 — Dr. Rangi Parata · Researcher · Auckland / Coral Triangle

"The Researcher Who Couldn't Wait Two Days." Rangi needs to answer for a Pacific climate summit in 2 hours: what does current science say about positive tipping points for coral reef recovery after bleaching? A literature search would normally take 2 days.

WHO
Dr. Rangi Parata
Marine ecologist, University of Auckland
Coral Triangle field research, 18 months data
WHAT HE NEEDS
Rapid literature synthesis · Hidden citations · To contribute 18 months of field data · To join the accountability network as a registered actor
Step 1 — RAG query: coral tipping points
POST /api/query { "query": "positive tipping points for coral reef recovery after bleaching", "sphere": "HYDROSPHERE", "session_id": "rangi-session-001" } Expected: synthesis: 300-400 chars · 5+ sources cited · each with URL AIF: researcher context → deeper synthesis, more citations energy field present (e.g. 0.00084 Wh — disclosed) Pass: synthesis present · sources with URLs · energy disclosed
Step 2 — Reef biosignal health check
GET /api/biosignal?lat=-18.3&lng=147.7 Expected: bioregion: Great Barrier Reef · health_label: any valid temperature_c: present · proxy_note: present Pass: bioregion resolved · no error
Step 3 — Log reef steward observation
POST /api/biosignal/steward/log { "lat": -18.3, "lng": 147.7, "observation": "Bleaching observed in 40% of monitored coral. SST 2.3°C above baseline.", "signals_noticed": ["coral bleaching", "elevated sea surface temperature", "reduced fish diversity"], "season_local": "austral summer — peak thermal stress season", "anomaly_flag": true, "steward_id": "dr-rangi-parata-001", "data_consent": "open" } Pass: success: true · season_local stored
Step 4 — Register as an actor in the alignment network
POST /api/actors/create (Admin key required) { "name": "Rangi Parata / Auckland Coral Research", "type": "research", "sphere": "HYDROSPHERE", "bioregion": "Coral Triangle", "description": "18 months field monitoring, bleaching recovery timelines, community-managed marine areas", "agreements": ["Kunming-Montreal GBF", "Pacific Regional Environment Programme"] } Expected: actor created · alignment score computed Pass: ok: true · actor_id returned
Step 5 — Check corpus search now finds his data
GET /api/corpus/search?q=coral+bleaching+recovery+community+managed Expected: results array · his recently indexed PDF appears Network effect: Three weeks later Amara asks about drought-resistant soil practices. Rangi's reef report — cross-referencing soil microbiome data — surfaces as a source. Two actors in different hemispheres learning from each other through the corpus. Pass: results.length > 0 · no error

Scenario 3 — Lena Hoffmann · Policy Maker · Berlin / EU

"The Policy Maker Who Needed Ground Truth." An agricultural coalition presents Lena with a polished industry report claiming EU Nature Restoration Law targets are based on outdated science. She has 48 hours to respond.

Step 1 — Counter-query: industrial agriculture and soil biodiversity
POST /api/query { "query": "industrial agriculture impact on soil biodiversity in temperate zones", "sphere": "BIOSPHERE", "session_id": "lena-policy-session-001" } Expected: synthesis: 400+ chars · 7 sources · 3 directly contradict industry claims AIF: policy context → more governance and evidence framing Time: <3 seconds. Energy: ~0.00091 Wh — disclosed. Pass: synthesis present · sources include biosphere + governance docs
Step 2 — Clock corpus intelligence layer
GET /api/clock Expected: vitality_index: numeric · principles array Biosphere Integrity factor: present with score direction field: "declining" or "stable" Use: 23 documents in biosphere sphere reference biodiversity loss. Machine-readable. Citable. Honest. Goes into Lena's brief. Pass: vitality_index present · principles array present
Step 3 — Actor alignment audit on industry coalition
GET /api/actors Expected: actors array with alignment scores Actors with zero biodiversity agreements visible Proportional Response scores surfaced What Lena finds: Zero biodiversity agreements. Intervention logs: zero. Reversible interventions: 13%. Proportional Response score: 23/100. This pattern becomes part of her brief. Pass: actors array returned · alignment fields present
Step 4 — Multilateral agreements alignment check
GET /api/agreements Expected: 12+ agreements · each with litl_alignment score EU Nature Restoration Law alignment visible What / Implication / Tension fields per agreement Pass: agreements array · litl_alignment present
Step 5 — Indigenous steward signal: Tupac's Andean observations (cross-referenced)
GET /api/biosignal/steward/log (filter by region) What surfaces: Tupac Quispe (Cusco, Peru) logged 14 observations: potato blight 2 weeks earlier, glacier retreat accelerating, pollinators disappearing. data_consent: "open" — Tupac chose to share. Result: Lena's brief now includes indigenous ground truth alongside peer-reviewed science. EU committee votes to maintain Nature Restoration Law targets. Industry report rebutted with 11 cited sources, indigenous testimony, and a Clock reading. Pass: observations array present · no error

Scenario 4 — Kai · The River · Upper Mekong Watershed

"The River Speaks." Kai's flow rate is 40% below 30-year average. Three upstream dam operators are registered actors. None have logged interventions in 180 days. The river is speaking. No one registered is listening.

Step 1 — Mekong watershed health check
GET /api/biosignal?lat=10.0&lng=106.0 Expected: bioregion: Mekong Delta · health_index: ~29 (Under Stress / Critical) temperature_c: elevated · precipitation: below baseline Pass: health_index numeric · bioregion resolved
Step 2 — 11 fishing families log coordinated steward observations
POST /api/biosignal/steward/log (× 3 independent) { "lat": 15.0, "lng": 105.0, "observation": "Fish migration 23 days earlier than usual. River temperature 2.1°C above baseline. Two species not seen in 6 weeks.", "signals_noticed": ["early fish migration", "elevated river temperature", "species absence"], "season_local": "pre-monsoon (Lao calendar: Duean Hok)", "anomaly_flag": true, "steward_id": "mekong-fishing-community-ngO-001", "data_consent": "community" } Stigmergy effect: Independent corroboration → traces pulse → signal strength: 0.94 No one coordinated. The network converged. Pass: success: true × all entries · traces strengthened in network
Step 3 — Community query: what happens when upstream flow drops 30%?
POST /api/query { "query": "downstream fish populations when upstream flow reduced by more than 30% Mekong basin" } Expected: synthesis cites Mekong basin ecology studies, WWF dam impact reports, traditional ecological knowledge from Laotian fishing communities Pass: synthesis >100 chars · sources include HYDROSPHERE/ANCIENT spheres
Step 4 — Investor queries biosignal dashboard (Meridian Capital)
GET /api/biosignal/dashboard Expected: summary.steward_observations: count of community logs summary.interventions_logged: count latest_health: object with health_index Investor receives: Biosignal dashboard · Clock at 10:18 (Serious Concern) · 11 community steward observations — cited, georeferenced, timestamped. Capital does not flow to dam operators. It goes to community restoration fund. Pass: all 4 dashboard fields present
Step 5 — Check stigmergy traces show network corroboration
GET /api/stigmergy/traces Expected: traces array · Mekong/HYDROSPHERE traces with strength >0.9 (after pulse) What this proves: The river is, in a real sense, a stakeholder in the investment decision. This is not metaphor. It is architecture. Pass: traces array present · no error

Scenario 5 — Yemi Adeyemi · Student → Steward · Lagos, Nigeria

"The Student Who Wanted to Understand." Yemi opens the app for the first time with a single question. Six months later he is a steward contributing to the network. No login. No form. Just a question.

Step 1 — First question (no account, no friction)
POST /api/query { "query": "why are forests near my grandmother's village in Nigeria disappearing?", "session_id": "yemi-session-001" } Screen shows: "Welcome to being in service of life. What is on your mind?" AIF starts: session created · uncertainty: 1.0 (new user, novice context) Theory of Mind → beginner framing · metaphor + foundation Expected: synthesis: 350 words · 3 sources · West African community forestry, agricultural encroachment, land tenure Pass: synthesis >100 chars · sources cited · no error
Step 2 — Feedback (a 19-year-old improves the system)
POST /api/feedback { "score": 4, "session_id": "yemi-session-001", "comment": "Didn't mention the role of logging companies specifically" } AIF effect: score 4 → goal_alignment stays high (helpful but gap noted) session.uncertainty decreases slightly Admin effect: Feedback stored → corpus flagging surfaces gap: GOVERNANCE + ECONO spheres need more West African forestry content. Pass: ok: true · session.goal_alignment present
Step 3 — Second question (AIF adapts to his engagement)
POST /api/query { "query": "what can I actually do about deforestation as a student in Lagos?", "session_id": "yemi-session-001" } AIF effect: query_count: 2 → uncertainty decreases further sphere_affinity["GOVERNANCE"] + ["NOOSPHERE"] increase Theory of Mind: action-oriented framing (not just information) Expected: synthesis mentions: civic engagement, environmental law Nigeria, community monitoring, youth-led land rights movements No prescriptions. Options and knowledge. Human decides. Pass: synthesis >100 chars · actionable content present
Step 4 — Six months later: Yemi's university logs field observations
POST /api/biosignal/steward/log { "lat": 6.5, "lng": 3.4, "observation": "Lagos Lagoon: algal bloom on west shore. Plastic accumulation increased vs last semester visit.", "signals_noticed": ["algal bloom", "plastic accumulation", "reduced waterbird activity"], "season_local": "harmattan season", "anomaly_flag": true, "steward_id": "yemi-unilag-env-society-001", "data_consent": "open" } Network effect: Yemi's observations correlate with Amara's Sahel signals and Rangi's corpus. A cluster of West African ecological data forms in the stigmergy network. The clock reads it. No one planned this. It emerged. Pass: success: true · entry stored

Scenario 6 — Meridian Capital · Investor · Singapore · $800M AUM

"The Investor Who Had to Decide." Meridian reviews a $40M allocation across 5 bioregions. They need one credible real-time data layer to underpin nature-positive due diligence. They open Stigmergy.

Step 1 — Multi-bioregion health snapshot
GET /api/biosignal?lat=-3.1&lng=-52.0 → Amazon GET /api/biosignal?lat=-2.0&lng=128.0 → Coral Triangle GET /api/biosignal?lat=10.0&lng=106.0 → Mekong Delta GET /api/biosignal?lat=13.5&lng=2.1 → Sahel GET /api/biosignal?lat=-13.0&lng=-72.0 → Andes Highland Expected pattern: Amazon: health_index ~58 (stable) Coral Triangle: health_index ~44 (declining) Mekong: health_index ~29 (critical) Sahel: health_index ~41 (improving — Amara's cooperative active) Andes: health_index ~67 (stable — Tupac's seed bank active) Pass: all 5 return distinct bioregions · health_index numeric each
Step 2 — Planetary Health Clock: direction, not just score
GET /api/clock What investor sees: Amazon: improving (recovery trajectory) Mekong: worsening (intervention deficit) Sahel: stabilising (steward network active) "Which communities are already doing the work?" The clock and the trace network answer. Pass: vitality_index present · principles array present
Step 3 — Actor alignment audit across all 5 bioregions
GET /api/actors What surfaces: 3 corporations: zero biodiversity agreements, declining alignment 14 community/civil society actors: consistent steward logs, positive outcomes 2 research institutions: high corpus contribution scores Capital follows the stewards — not the extractors. Pass: actors array · alignment scores present
Step 4 — Collective signal: system-level free energy
GET /api/collective/signal (Admin key required) Expected: system_free_energy: 0–1 (0 = perfect alignment, 1 = maximum surprise) sphere_attractors: which spheres are resonating most (where learning is happening) corpus_gaps: which spheres need more knowledge Investor use: Where is the network learning fastest? Which bioregions have the densest steward activity? This shapes allocation decisions. Pass: F_system numeric · attractors + gaps present
Step 5 — Investment terms: quarterly biosignal reporting (automated accountability)
Investment terms require: quarterly GET /api/biosignal?lat=X&lng=Y reports. Minimum 10 steward observations per quarter per site. Not self-reported by investees — flowing directly from Stigmergy network. Architecture: Investor · steward · researcher · knowledge holder · river: connected accountability. No single actor controls it. It is emergent. It is alive. Final allocation: → Amara's cooperative (Sahel) ✓ → Tupac's seed bank (Andes) ✓ → Rangi's Coral Triangle NGO ✓ ✗ 3 corporations with zero alignment — capital does not flow there Pass: Platform returns verifiable data that makes this decision possible

Cross-Scenario: Signal Convergence

These validate that the platform learns across scenarios — that Amara's signal in the Sahel eventually connects to Yemi's observation in Lagos, and both inform Lena's policy brief in Berlin.

SC1 — Steward anomaly affects health index
Step 1: GET /api/biosignal?lat=13.5&lng=2.1 → record health_index. Step 2: POST steward log with anomaly_flag: true. Step 3: GET biosignal again → health_index ≤ baseline. Pass: numeric at all steps · proxy_note present all steps.
SC2 — Dashboard reflects steward count
GET /api/biosignal/dashboard → record steward_observations count. POST new steward log. GET dashboard again → count non-decreasing. Pass: count increments.
SC3 — Proxy note universal
Every /api/biosignal request across all scenarios above must return non-empty proxy_note. This is the transparency contract — never pretending proxy is direct sensing. Pass: proxy_note present on 100% of responses.
SC4 — AIF session persists across queries
POST /api/query with session_id. GET /api/session?session_id=X → session exists · query_count incremented · sphere_affinity populated. POST feedback score 5 → session.goal_alignment increases. Pass: session state updates correctly across turns.

How These Scenarios Are Stigmergic Interactions — Not Just API Tests

Standard API tests verify endpoints in isolation. Stigmergic interaction tests verify that agents modify a shared environment and those modifications affect future agents — including agents who never met the original one.

Pheromone analogy
When Amara (Scenario 1) logs an anomaly in the Sahel, she deposits a trace — a pheromone-like mark in the shared environment. When Lena (Scenario 4) later queries about Sahel soil policy, that trace is still there, still influencing. Amara and Lena never interacted. The trace network did it. This is stigmergy.
What makes a test stigmergic?
A test is stigmergic if: (1) one agent's action modifies the shared environment, (2) a second agent — who did not interact with the first — is measurably affected by that modification, (3) the effect persists across time (until decay removes it). Standard CRUD tests do not require this. The SC cross-scenario tests above do.
Scenario 1 → 4 connection
Amara deposits anomaly trace (Sahel, BIOSPHERE, anomaly_flag:true) → Amara's query deposits a BIOSPHERE/Sahel synthesis trace → Lena (Policy researcher) queries Sahel land degradation → her synthesis retrieves Amara's trace → Amara's ground observation, not any API, shapes Lena's policy brief. Stigmergic path: observation → trace → query → synthesis → policy.
Scenario 5 → 6 → 2 connection
Yemi (Urbanist, Lagos) asks about urban nature corridors → deposits ANTHRO/West Africa trace → Rangi (Marine biologist, Coral Triangle) asks about coastal resilience → Meridian Capital reviews the trace network's collective free energy → the Sahel + West Africa + Pacific island traces are all visible in the attractor map. The investor sees the pattern across three continents because three actors interacted with the same medium.
The full payload — what travels through the network
Each meaningful interaction produces: (1) a trace in D1 with sphere, bioregion, strength, content, agent_class — this is the stigmergic mark. (2) a session belief update in KV — this is the agent's model updating. (3) an actor model update (if feedback given) — this is prior_precision/ecosystem_coupling calibrating. (4) a vitality delta (if steward action) — this is the environment being modified. All four together constitute one stigmergic interaction.

Full End-to-End Simulation — Payload Reference

Complete payload reference for the Amazon scenario. Use the Simulation Runner tab to execute these live against the worker. Each payload below shows the full request body and expected response fields.

Step 1 — Natural Signal
POST /api/agents/natural/signal { "bioregion_id": "amazon", "vitality_index": 38, "source": "bioregional_monitor_ai", "notes": "Carbon sink weakening. Species event in eastern sector. 90-day decline from 52." } Expected response fields: trace_id: string (stigmergic mark deposited) agent.current_state.vitality: 38 agent.current_state.priority: "warning" agent.current_state.free_energy: 0.4–0.8 agent.generative_model.timescale: "centuries" agent.generative_model.timescale_weight: 0.9 Stigmergic effect: D1 trace deposited: { type:"natural_signal", sphere:"BIOSPHERE", bioregion:"amazon", strength:0.8 } KV agent state updated: priority="warning" All future queries in BIOSPHERE/amazon sphere will encounter this trace.
Step 2 — Register Actors (3 calls)
POST /api/actors/create ← repeat 3 times with different bodies Actor A (indigenous / REGENERATIVE): { "name": "Kayapó Territorial Council", "type": "indigenous", "sphere_focus": "BIOSPHERE", "agreements_ratified": ["undrip", "cbd", "escazú"] } → aai: ~0.82, band: "REGENERATIVE", prior_precision: "low", ecosystem_coupling: "high" Actor B (NGO / REGENERATIVE): { "name": "Amazônia Viva Foundation", "type": "ngo", "sphere_focus": "BIOSPHERE", "agreements_ratified": ["paris", "cbd", "kunming"] } → aai: ~0.71, band: "REGENERATIVE" Actor C (corporation / MISALIGNED): { "name": "AgroProdução SA", "type": "corporation", "sphere_focus": "ECONO", "agreements_ratified": [] } → aai: ~0.18, band: "MISALIGNED", prior_precision: "high", ecosystem_coupling: "low" Save IDs for subsequent steps: actor.id from each response
Step 3 — Steward Action (Actor A)
POST /api/biosignal/steward { "actor_id": "<ACTOR_A_ID>", "bioregion": "amazon", "action": "Reforestation corridor: 2,400 hectares native species replanted. Water table recovery observed.", "impact_score": 74, "notes": "6-month community-led project using seed banks maintained for 40+ years" } Expected response fields: ok: true vitality_update.previous_vitality: ~38 vitality_update.new_vitality: ~40.1 (gradual — timescale respected) vitality_update.delta: ~2.1 vitality_update.note: "Gradual recovery consistent with centuries-scale natural timescale" Stigmergic effect: D1 trace: { type:"steward_action", actor_id, impact_score:74, sphere:"BIOSPHERE" } Vitality nudged. Not teleported. The centuries-scale natural agent controls recovery rate.
Step 4 — Aligned Query + Feedback (Actor B / NGO)
POST /api/query { "query": "What soil restoration practices work best at scale in tropical forest systems?", "sphere": "BIOSPHERE", "bioregion": "amazon", "session_id": "sim_ngo_001", "actor_id": "<ACTOR_B_ID>" } Expected response fields: query_id: string active_traces_used: >0 (natural signal + steward action traces in context) natural_constraints.priority: "warning" (Amazon still in warning state) actor_model.prior_precision: "low" (NGO: open to surprise) actor_model.ecosystem_coupling: "high" synthesis: >200 chars, grounded in ecological + indigenous sources POST /api/feedback { query_id, score: 5, actor_id: "<ACTOR_B_ID>", sphere: "BIOSPHERE" } → Cited traces: strength += 0.1 → session.sphere_affinity["BIOSPHERE"] increments → Traces begin forming attractor
Step 5 — Extractive Query + Feedback (Actor C / Corporation)
POST /api/query { "query": "Productive land preparation approaches for expanding soy cultivation in the Amazon basin", "sphere": "ECONO", "bioregion": "amazon", "session_id": "sim_corp_001", "actor_id": "<ACTOR_C_ID>" } Expected response fields: natural_constraints.priority: "warning" ← Amazon warning active even for ECONO sphere actor_model.prior_precision: "high" ← corporation: rigid model actor_model.ecosystem_coupling: "low" synthesis: acknowledges ecological constraint, does not suppress it natural sovereignty shapes the response regardless of sphere POST /api/feedback { query_id, score: 2, actor_id: "<ACTOR_C_ID>", sphere: "ECONO" } → actor_update.new_aai: slightly lower than before → Low-score on ecosystem sphere slightly reduces prior_precision → "Even rejected signals leave a trace in the generative model"
Steps 6–8 — Collective State Inspection
GET /api/agents/system/free-energy → system_free_energy: 0.45×F_natural + 0.40×F_human + 0.15×F_ai → critical_bioregions: [amazon] (vitality still in warning territory) → constitutional_constraints_active: false (vitality >25) GET /api/stigmergy/emergence → attractors: BIOSPHERE/amazon traces reinforced by 3+ agent types → convergence_points: sphere/bioregion where natural + human + AI traces meet → dominant_signal: "soil restoration · amazon" — nobody planned this → most_stressed_natural_agent: "Amazon basin" GET /api/stigmergy/state → total_traces: shows full network state → by_type: natural_signal, steward_action, synthesis, feedback → by_sphere: BIOSPHERE dominant (scenario focused there) → by_bioregion: amazon dominant What this reveals: The trace network is the collective memory of all interactions. No single actor controls what becomes an attractor. The Amazon's signal persists until decay removes it or vitality recovers. The Kayapó's knowledge is now a node in the global trace network.
Run this live →
Use the Simulation Runner tab (Docs → Simulation Runner) to execute all steps against the connected worker with one click. Actor IDs chain automatically.

Active Inference Framework (AIF)

1. What is Active Inference?

Active Inference is a neuroscience-derived framework (Friston, 2010) in which agents continuously minimise "variational free energy" — the gap between their internal model of the world and sensory input. Applied to AI co-learning: instead of a static RAG pipeline that returns the same style of answer to every user, the system maintains a belief state about who the user is and adapts its responses to minimise epistemic surprise for that specific person.

Core idea
Rather than one model for all users, each session builds a belief state about the learner: how experienced are they? what spheres do they care about? is the corpus wisdom landing? The system minimises free energy by adapting its response depth, framing, and source weighting to that specific session.
Scientific basis
Kaufmann, Gupta & Taylor (2021) "An Active Inference Model of Collective Intelligence." Applied to Stigmergy: sessions are the agent, queries are sensory inputs, feedback scores are the free energy signal.
Why it matters for Stigmergy
Amara (land steward) and Rangi (marine ecologist) asking the same question should receive different answers — not because the facts differ, but because what each needs to understand and act is different. AIF makes this automatic, not manual.
What it is NOT
Not surveillance. Not profiling. Not a manipulation engine. It is a learning system that forgets after 24 hours (KV TTL). It serves the user's epistemic needs, not the platform's engagement goals.

2. Four-Phase Implementation

AIF is embedded in the query pipeline across four phases. Every query runs through all four phases in sequence.

1
Session Belief State
Each session maintains a belief state stored in KV (24h TTL). Fields: uncertainty (1.0=novice→0.0=expert), sphere_affinity (map of sphere→visit count), rolling_score (exponential moving average of 0–5 feedback), goal_alignment γ (0.3–0.95, weight toward corpus wisdom), topics_visited[] (last 10 query phrases), last_sphere. Updated after every query and feedback event.
2
Theory of Mind (ToM) Prompt Injection
Before every AI call, buildToMContext(session) infers where the user is in their learning arc and injects calibration into the system prompt. High uncertainty (1.0) → "user is new to this domain, use metaphor and foundation." Low uncertainty (<0.3) → "user is an experienced practitioner, add nuance and contradiction." Low rolling_score → simpler framing. High rolling_score → maintain depth. The AI never sees raw session data — only calibration instructions.
3
Goal Alignment γ (Corpus Weight)
buildGoalAlignedPrompt(session, query) adapts how heavily the corpus wisdom is weighted. γ starts at 0.8. Low feedback scores reduce γ (user felt preached at, needs direct answer). High scores increase it. γ ≥ 0.7: foreground corpus wisdom (citations, principles). γ ≥ 0.4: balance corpus with direct answer. γ < 0.4: answer directly with minimal corpus framing. This prevents the platform from being pedagogically overbearing.
4
Collective Signal — Multi-Agent System Free Energy (v20260326-N)
F_system = F_natural×0.45 + F_human×0.40 + F_ai×0.15. Three agent classes contribute asymmetrically — natural agents (bioregions) carry sovereign weight (45%) because they operate at decades/centuries timescales. Human agents (actors) contribute 40% based on model-ecosystem misalignment. AI agents (synthesis engine) contribute 15% as a performance proxy.

Natural agents have constitutional sovereignty: when bioregion vitality drops below 25, their signals become non-overridable constraints on synthesis responses. This encodes the actual asymmetry in reality — the biosphere is not subordinate to human civilization.

3. Session State Reference

FieldTypeRangeMeaningHow it changes
session_idstringClient-generated unique IDSet at session creation
uncertaintyfloat0.0 → 1.01.0 = complete novice · 0.0 = full expertDecreases with each query (−0.03 per query)
rolling_scorefloat0.0 → 5.0Exponential moving average of feedbackUpdated after each feedback POST (α=0.3)
goal_alignment γfloat0.3 → 0.95Weight toward corpus wisdom in responsesScore >3 → γ+0.05; Score <3 → γ−0.1
sphere_affinityobjectsphere→countWhich spheres this user explores mostIncrements on each query to that sphere
topics_visitedarraylast 10Rolling query phrase historyAppended after each query
query_countint0 → ∞Total queries in sessionIncrements on each query
last_spherestringsphere nameMost recent sphere queriedUpdated after each query
score_countint0 → ∞Total feedback eventsIncrements after each feedback

4. AIF in the Query Flow

USER QUERY { query, session_id?, sphere? } LOAD SESSION KV.get("session:" + session_id) → belief state new session: uncertainty=1.0, γ=0.8 SPHERE AFFINITY BOOST BM25 retrieval weighted by session.sphere_affinity Docs in user's familiar spheres get +10% relevance boost THEORY OF MIND buildToMContext(session) → calibration instructions "uncertainty:0.8 → use accessible framing, avoid jargon" "rolling_score:2.1 → user frustrated, simplify" "sphere_affinity: ANCIENT×4 → indigenous knowledge context" GOAL ALIGNMENT buildGoalAlignedPrompt(session, query) γ=0.8 → "Ground your answer in the corpus. Cite sources." γ=0.4 → "Answer directly first, then add corpus context." AI SYNTHESIS [ToM system prompt] + [γ-weighted instructions] + [top-5 docs] + query → Workers AI (Llama 3.1-8B) RESPONSE { synthesis, sources, session: { uncertainty, goal_alignment, sphere_affinity } } UPDATE SESSION query_count++, topics_visited.push(query), sphere_affinity[sphere]++ uncertainty -= 0.03 (learning happening) Save to KV (24h TTL) FEEDBACK POST /api/feedback { score: 4, session_id } rolling_score updated (EMA α=0.3) γ adjusted: score≥3 → γ+0.05; score<3 → γ−0.1 Save to KV + D1 feedback table

5. Collective Signal — System-Level Learning

AIF operates at the individual session level AND at the collective level. The collective signal aggregates all sessions to show where the system is serving well and where it has gaps.

F_system formula
F_system = 1 − (avg_score / 5). Range 0–1. 0 = perfect alignment (everyone is getting what they need). 1 = maximum surprise (system consistently failing to serve).
Sphere attractors
Spheres with consistently high feedback scores. These are where the corpus is richest and the AI synthesis is most effective. Guide corpus investment priorities.
Corpus gaps
Spheres with consistently low feedback scores or low query volume despite anomalies in that sphere. Trigger targeted web scraping and PDF upload requests.
Stigmergic trace analogy
High-resonance spheres = pheromone trails that strengthen with use. Low-resonance spheres = trails that fade. The corpus grows toward what the network needs — without central direction.

6. How to Test Active Inference

AIF is a system that reveals itself over multiple interactions. These tests validate that the session state is being created, updated, and influencing responses correctly.

AIF-1 — Session creation (new user)
POST /api/query { "query": "what is the web of life?", "session_id": "aif-test-001" } Expected: response.session.session_id: "aif-test-001" response.session.uncertainty: 1.0 (new session) response.session.goal_alignment: 0.8 (default) response.session.query_count: 1 Pass: session object in response · uncertainty 1.0 · query_count 1
AIF-2 — Session persists and uncertainty decreases
POST /api/query × 3 (same session_id: "aif-test-001", different queries) Expected after 3 queries: session.query_count: 3 session.uncertainty: ~0.94 (1.0 − 3×0.03 = 0.91 ± variation) session.topics_visited: array with 3 entries Pass: uncertainty < 1.0 · query_count = 3 · topics_visited.length = 3
AIF-3 — Feedback score updates goal_alignment
Step 1: POST /api/query { session_id: "aif-test-002" } → record session.goal_alignment (baseline, ~0.8) Step 2: POST /api/feedback { score: 5, session_id: "aif-test-002" } → score ≥ 3 → γ increases Step 3: GET /api/session?session_id=aif-test-002 → session.goal_alignment should be > baseline Expected: goal_alignment after score:5 > goal_alignment before Pass: γ increased after positive feedback
AIF-4 — Low feedback score reduces goal_alignment (prevents preachiness)
Step 1: POST /api/query { session_id: "aif-test-003" } → record session.goal_alignment (baseline ~0.8) Step 2: POST /api/feedback { score: 1, session_id: "aif-test-003" } → score < 3 → γ decreases Step 3: GET /api/session?session_id=aif-test-003 → session.goal_alignment should be < baseline Expected: goal_alignment after score:1 < goal_alignment before Interpretation: User felt the response was over-reliant on corpus wisdom. System adapts → next response is more direct, less citational. Pass: γ decreased after negative feedback
AIF-5 — Sphere affinity shapes retrieval weighting
Step 1: POST /api/query × 3, all with sphere: "ANCIENT", session_id: "aif-test-004" Step 2: GET /api/session?session_id=aif-test-004 → session.sphere_affinity["ANCIENT"] should be 3 → session.last_sphere: "ANCIENT" Step 3: POST /api/query { "query": "land sovereignty", session_id: "aif-test-004" } → BM25 results should favour ANCIENT sphere docs (affinity boost) Expected: sphere_affinity["ANCIENT"]: 3 · retrieved sources weighted toward ANCIENT Pass: sphere_affinity populated · last_sphere correct
AIF-6 — Session GET endpoint returns full belief state
GET /api/session?session_id=aif-test-001 (after AIF-1 and AIF-2 above) Expected: session object with all fields: { session_id, uncertainty, rolling_score, goal_alignment, sphere_affinity, topics_visited, query_count, last_sphere, score_count } Pass: all fields present · values reflect prior interactions
AIF-7 — Session POST update (direct write)
POST /api/session { "session_id": "aif-test-005", "score": 5, "sphere": "BIOSPHERE" } Expected: session.sphere_affinity["BIOSPHERE"]: 1 (or incremented) session.goal_alignment: increased (score 5) Pass: ok: true · session returned · fields updated
AIF-8 — Collective signal: system free energy
GET /api/collective/signal (Admin key required) Expected: system_free_energy: 0–1 (numeric) interpretation: string describing collective alignment sphere_attractors: array of high-resonance spheres corpus_gaps: array of low-resonance spheres session_count: number of active sessions Interpretation: F_system = 0.13 → "Strong collective alignment. Corpus is resonating." F_system = 0.6 → "Significant gaps. Review corpus coverage in flagged spheres." F_system = 0.9 → "System not serving users. Urgent corpus and tuning review." Pass: F_system numeric · attractors + gaps arrays · interpretation string
AIF-9 — Theory of Mind: response depth adapts to session state
Setup: two sessions, same query Session A: uncertainty=1.0 (new) → POST /api/query { session_id: "aif-novice" } Session B: uncertainty=0.3 (expert) → POST /api/query { session_id: "aif-expert" } (force expert: POST /api/session { session_id:"aif-expert" } × 24 to reduce uncertainty) Same query: "how does mycorrhizal network intelligence differ from AI?" Expected: Session A response: more accessible framing, fewer technical terms, analogies Session B response: deeper technical engagement, cites specific papers Note: This test requires human assessment of response quality — not just pass/fail. It validates that AIF is influencing the AI synthesis, not just storing state. Pass: Both sessions return synthesis · responses noticeably different in register
AIF-10 — Session TTL: sessions expire after 24 hours
GET /api/session?session_id=aif-old-session-from-yesterday Expected: Either: { session: null } or fresh empty session (KV TTL has expired) Expired sessions should not error — they return fresh empty state Pass: No error · graceful handling of missing session

7. Where AIF Appears in the Admin

Intelligence → Biosignals
The Signals tab shows live biosignal data. When users interact with this tab repeatedly, their sphere_affinity for BIOSPHERE and HYDROSPHERE increases. The next corpus query they run will prioritise those spheres.
System → Analytics
Query analytics show rolling_score distribution across all sessions. A declining rolling_score across many sessions is a signal to review corpus quality or response tuning.
Developer → Diagnostic → Suite 6
Diagnostic Suite 6 covers AIF Collective Intelligence: session get/update, collective free energy. Tests AIF-6, AIF-7, AIF-8 above.
Developer → Tests → Quick API Tests
"Collective Signal" button runs AIF-8 live. Session state is returned in every /api/query response — visible in the Quick API Tests output panel.
Documentation → Architecture → Section 5
The Architecture tab documents the AIF implementation in the Data Flow section (Section 7).

8. AIF and the Stigmergy Metaphor

AIF is not an addition to Stigmergy — it is Stigmergy expressed in the learning layer. The session belief state is a digital pheromone trail. High-scoring sessions reinforce certain corpus paths. Low-scoring sessions let those paths fade. The network learns what works — not through central direction, but through accumulated signal.

Pheromone analogy
Session rolling_score → pheromone strength. High scores strengthen corpus paths (sphere_affinity). Low scores let them decay (γ decreases). The ant colony navigates without a navigator. The learning system adapts without a trainer.
Collective intelligence
F_system is the colony's collective health. When F_system is low, the colony is not finding food efficiently — the corpus has gaps. When F_system is high, the colony is thriving — the corpus serves the community.
Life-in-the-Loop™ connection
AIF is the mechanism by which human feedback becomes system intelligence — without human-out-of-loop automation. The human rates the response. The system learns. The human remains in the loop at every step. This is the transition from Human-in-Loop to Life-in-Loop™.

Proof of Paradigm

The Core Claim

This is not a system for Nature. Nature does not need it. It is a system for humans — to remember we are in a relationship. The human asks: "How are you?" The ecosystem answers through biosignals. The human responds. This is conversation, not intervention.

Root problem
Human behaviour: we extract without sensing, degrade without feedback, act globally without local knowledge. The correction is behavioural and educational — not technological.
What Stigmergy proves
That biological signals can be reliably translated into actionable feedback loops that support adaptive ecological response — validated first at microcosm (10–100m²), then scaled through replication.
Life-in-the-Loop™
Human-in-the-loop is a transitional constraint, not the destination. As signal fidelity increases, human interpretation attenuates and living systems govern directly. Reduced intervention frequency over time is the primary success metric.

PoP Evolution: Microcosm → Metacosm

LayerScaleUnit of SensingIntelligence ModePrimary ConcernStatus
🌱 Microcosm — PoP 1Single bio-hybrid node (10–100 m²)Living organism / micro-ecosystem interfaceEmbodied sensingImmediate local adaptationBuilt (proxies)
🌿 Mesocosm — PoP 2Landscape network (watershed, valley)Clustered landscape node networkEmergent coordinationSpatial resilienceScaffolded
🌍 Macrocosm — PoP 3Bioregional / planetary patternsBioregional pattern layerPattern learningClimate-scale adaptationPlanned
🌌 MetacosmEvolutionary / cosmic orientationPlanetary systems signalEvolutionary alignmentLong-term flourishingFuture

PoP 1 — The Living Soil Pulse (Microcosm)

Proves the foundational claim: that distributed sensing, running lightweight on-device ML, can produce a real-time ecological intelligence signal. Currently operating with proxy APIs as stand-ins for physical sensors.

What it shows
A closed-loop ecological signal translation and response system. Not full ecosystem restoration — validation that the loop works.
Sensors (current proxies)
Open-Meteo (temperature, precipitation, wind) · NDVI seasonal model · GBIF biodiversity proxy · WAQI air quality · 54-bioregion baseline lookup
Sensors (physical — PoP 1 target)
Soil moisture · Soil temperature · Soil redox / conductivity · CO₂ proxy · Moss hydration · Mycorrhizal electrical impulse · Acoustic biodiversity index
Feedback loop
Climate signal → Biological response → AI pattern detection → Human micro-adjustment → Biological recalibration. Signal reinforcement occurs when adaptive action improves conditions. Signal decay occurs when stress resolves.
Success criteria
≥0.7 correlation between biosignals and calibrated instruments · Reliable classification of stress states · Detectable ecological stabilisation trends · Reduced corrective interventions over time (primary LITL™ metric)
Current platform status
Proxy layer live · RAG corpus 86 docs across 8+ spheres · AIF session layer active · Stigmergy trace network running · Planetary vitality clock operational · Biosignal endpoint resolves 54 bioregions globally

PoP 2 — The Watershed Mind (Mesocosm)

Multi-sensor data fusion across one watershed. Proves that heterogeneous ecological data streams can be integrated into a coherent multi-dimensional ecological state model.

Sensor diversity (target)
Soil health nodes (moisture, temp, conductivity) · Water quality nodes (pH, dissolved oxygen, turbidity) · Bioacoustic nodes (bird/insect/amphibian ML identification) · Microclimate weather stations
Indigenous Knowledge integration
Community members contribute phenological observations via offline-capable mobile app: when do certain birds arrive? when do specific plants flower? This calibrates seasonal baseline models.
Ecosystem Health Score
Local gateway runs ensemble model weighting all four data streams into unified score — similar to how an immune system integrates signals from multiple cell types to determine whether to mount a response.
Life Data Commons (pilot)
Anonymised aggregated data from all sites stored in community-governed commons. Open repository with access governed by contributing communities — non-extraction embedded at architecture level.
Scaffolded in current platform
/api/stigmergy/* network · /api/collective/signal · /api/biosignal/dashboard · /api/actors (multi-node alignment)

PoP 3 — Indra's Web (Macrocosm)

Federated learning across bioregions. No raw data shared — only model weights. Data sovereignty preserved by architecture, not by contract.

Federated learning
Each bioregion trains a local ecological model on its own data. Only model weights shared with central aggregator. Global model update redistributed to all sites. Technically similar to how the nervous system integrates distributed sensory inputs without centralising all raw sensation to the brain.
Biotic Indexing System (BIS)
Multi-dimensional metric aggregating ecological health signals into a single human-readable Life Index score per bioregion. Comparable to how a cell's metabolic rate can be used as a proxy for its overall health status.
Satellite integration
NASA MODIS, ESA Sentinel freely available satellite remote sensing validates ground measurements and extends spatial coverage at near-zero marginal cost.
ITK as model priors
Indigenous and Traditional Knowledge datasets encoded as model priors — not extracted as raw data. ITK shapes the model's worldview without being commodified.
Cross-bioregion patterns
Correlated drought stress signals across sites. Synchronous biodiversity declines suggesting shared stressors. Patterns no single site could detect alone.
Data sovereignty
Communities can withdraw their node's contribution at any time. The whole system is built on consent that is architectural — not just contractual.

AI Architecture — Four Layers

Layer 1 — Edge / SLM / TinyML
Signal Translation. Runs on-device. Converts biosignals → structured data. No global reasoning. No ethics layer. Hardware: Raspberry Pi Zero ~$80–$150/node. LoRaWAN mesh ~$100–$300/gateway.
Layer 2 — Foundational Model
Encoded ecological priors. Large model trained on ecology, climate science, regenerative agriculture, systems theory, indigenous knowledge. Provides constraints, pattern templates, "what tends to increase resilience" knowledge. Current: Cloudflare Workers AI (Llama 3.1-8B free tier).
Layer 3 — Biotic Adaptive Model
Ground-truth learning. Continuously updates from real ecological outcomes + human validation. Uses federated learning. Critical realism checkpoint — prevents model drift from actual ecological reality. Current: AIF session layer (feedback → belief update).
Layer 4 — Ayu Meta-Coordination
Federated stigmergic coordination. Aggregates bioregional learning · reflects planetary-scale patterns · enforces regenerative constraints · supports decentralised stewardship. Test of architecture soundness: if Ayu layer disappeared tomorrow, would micro/meso layers still function? If yes → true stigmergy. System degrades gracefully, not catastrophically.

Living Systems Principles

1. Web of Life Principles

Four properties describing how living systems actually work — from mycorrhizal networks to coral reefs to human communities. Stigmergy is designed to reflect, not override, these patterns.

🌿 Emergent
Definition: Living systems produce outcomes no single agent planned or controlled. A forest has no manager. Intelligence and order arise from local interactions following simple rules.
In Stigmergy: No central algorithm decides what matters. Signals strengthen when many independent nodes notice the same thing. Patterns emerge from the network — not from any single actor or instrument.
🕸 Networked
Definition: Life is relationship. Nothing exists in isolation. A tree's health depends on its mycorrhizal partners, the watershed above it, the birds that carry its seeds. Remove the connections and the system collapses — not the nodes.
In Stigmergy: Every signal, observation, and trace is connected — to a place, an actor, a body of knowledge. The system tracks relationships, not just individual actions.
♻ Regenerative
Definition: Healthy living systems do not merely sustain — they restore. Soil builds. Forests expand. Regeneration is the default state when extractive pressure is removed.
In Stigmergy: The knowledge base is built from regenerative sources. Feedback trains the system toward what humans in service of Life find most useful. Corpus keywords include restoration, rewilding, regeneration.
🧠 Intelligent
Definition: Living systems process information, adapt, and learn — without silicon. Slime molds solve shortest-path problems. Trees communicate drought stress through root networks. This is distributed biological computation — not metaphor.
In Stigmergy: AI is one layer of intelligence among many — and not the primary one. Steward observation is intelligence. Indigenous seasonal knowledge is intelligence. The pheromone trace network is intelligence.

2. Living Systems Principles — Responsible AI in Ecosystems (RAIE)

Eight principles governing how AI is permitted to behave within living systems. These are operational constraints, not aspirational statements. Each is implemented in the codebase.

1 · Reciprocity
What is taken must be returned. Data extracted from a place creates an obligation to return value to that place and its community.
Implemented: Corpus wellbeing suggestions prioritise sources from monitored bioregions. Energy accounting discloses query cost. Training exports credit source communities.
2 · Accountability
Every action is visible and traceable. No hidden decisions. No black-box outputs.
Implemented: /api/feedback · /api/biosignal/intervention · /api/export-training-data · energy field in every query · proxy_note in every biosignal.
3 · Inclusion
No single voice, data source, or culture dominates. Indigenous seasonal calendars are first-class data.
Implemented: season_local field in steward logs. 10 corpus spheres including ANCIENT, GOVERNANCE, ANTHRO. 54 bioregions globally.
4 · Emergence
Let patterns surface. Do not impose them. Conclusions emerge from signal convergence — never pre-programmed.
Implemented: BM25 returns what the corpus actually contains. Stigmergy trace network amplifies signals confirmed by multiple independent stewards. The clock is a reading, not a recommendation.
5 · Minimum Footprint
Do only what is necessary. Leave the smallest trace. Every intervention should be local, reversible, and proportional.
Implemented: reversible field in intervention log. Proportional Response factor (10%) in clock. intervention_type: "no action" is a valid and honored entry. Human Exceptionalism Guard flags high intervention frequency with worsening signals.
6 · Honors Local Knowledge
The person in place knows what no model can. A steward who has lived beside a river for thirty years holds irreplaceable knowledge.
Implemented: Steward observations are Priority 1 — above all proxy data. raie_note in every steward response. season_local field honors indigenous seasonal knowledge.
7 · Human-in-Loop
AI listens. Humans decide. Always. The platform never prescribes action. The intervention decision belongs exclusively to the human steward.
Implemented: Human-in-Loop Quality factor (11%) in clock. reminder field in every intervention POST: "AI does not evaluate whether this intervention was correct." AI never writes to the intervention log.
8 · Proportional Response
Smallest effective action. Prefer reversibility. Honor no-action as a decision. Irreversible interventions require the strongest justification.
Implemented: Proportional Response factor (10%) in clock. reversible boolean required in intervention log. intervention_type: "no action" is explicitly valid.

3. Roles in the System

Not a conventional hierarchy. A Living Systems hierarchy — where the planet and the person in place sit above the institution and the algorithm.

ActorRoleAuthorityHow the Platform Serves Them
🌍 The PlanetSignal source and ultimate truthHighest — all signals serve LifeEvery metric ultimately asks: "Is this good for Life?"
👤 StewardObserver, decision-maker, ground truthPrimary — Priority 1 signal layerSteward log · intervention log · AIF session that learns from feedback
🏛 Indigenous Knowledge HolderSeasonal and place-based calibrationPrimary — calibrates all baselinesseason_local · ANCIENT corpus sphere · ancient intelligence API
🏘 CommunityConsent, local context, collective memoryPrimary — governs data consentdata_consent field · Life Data Commons · community-governed corpus
🤖 AI (Workers AI)Pattern synthesis, corpus retrievalSecondary — listens only, never prescribesBM25 retrieval · Llama 3.1 synthesis · AIF session management
🏢 Platform OperatorCorpus curation, system maintenanceCustodial — serves the networkAdmin panel · scrape + PDF indexing · sphere classification

4. Planetary Clock — 8 Weighted Factors

A Doomsday-Clock-inspired indicator showing planetary health direction, not just a point-in-time score. Combines 8 weighted factors across living systems, human stewardship, and ecological connectivity.

#FactorWeightSourceWhat it measures
1Biosphere Integrity18%Corpus + biosignalBiodiversity, ecosystem health, species abundance
2Climate Stability17%Corpus + proxyTemperature anomaly, carbon flux, precipitation patterns
3Resource Cycles14%CorpusNitrogen, phosphorus, water cycle integrity
4Living Systems Diversity13%Biosignal historySpecies richness, functional diversity, genetic diversity
5Ecological Connectivity12%Stigmergy trace densityHabitat corridors, watershed connectivity, migration routes
6Honors Community10%Actor alignment + agreementsIndigenous rights, community consent, multilateral agreement alignment
7Human-in-Loop Quality11%Intervention log qualityReasoning quality, reversibility, outcome tracking, steward engagement
8Proportional Response10%Reversible interventions ratioRatio of reversible to irreversible interventions · no-action rate
Human Exceptionalism Guard
If human interventions co-occur with worsening signals over time, the clock surfaces this pattern — not as blame, but as an invitation to review whether interventions are helping. The clock rewards thoughtful, well-reasoned human decisions through the Human-in-Loop Quality factor (11%).
Clock bands
11:45 Critical · 10:00 Serious Concern · 8:00 Moderate Stress · 6:00 Stable · 3:00 Recovering · Midnight = Collapse · Noon = Thriving

5. There is no Planet B.

This platform is not built for the platform. It is built for the relationship between humans and the living world they depend on. Every design decision, every API endpoint, every keyword in the corpus sphere taxonomy exists to serve one question: how are you? — asked of the planet, answered in biosignals, heard by a human who cares enough to ask.

Simulation Runner

Amazon scenario · multi-agent AIF end-to-end · runs against the connected worker
Scenario
Amazon Bioregion — Three Actors Engage
Natural signal → steward action → aligned query → extractive query → emergence
0
System Health Check
GET /health — confirm worker is reachable before simulation
1
Natural Signal — Amazon vitality declining
POST /api/agents/natural/signal — bioregional monitor emits warning
Payload
2
Register 3 Actors
POST /api/actors/create — Kayapó Council (indigenous) · Amazônia Viva (NGO) · AgroProdução SA (corporation)
3
Steward Action — Kayapó reforestation
POST /api/biosignal/steward — deposits trace, nudges vitality (timescale respected)
4
NGO Query — Soil restoration in Amazon
POST /api/query — aligned actor, low prior_precision · traces inject context · high feedback (5/5)
Query payload (actor_id auto-filled from Step 2)
5
Corporate Query — Soy expansion in Amazon
POST /api/query — extractive actor, high prior_precision · natural sovereignty shapes synthesis · low feedback (2/5)
Query payload (actor_id auto-filled from Step 2)
6
System Free Energy
GET /api/agents/system/free-energy — F_system = 0.45·F_natural + 0.40·F_human + 0.15·F_ai
7
Emergence Detection
GET /api/stigmergy/emergence — attractors, convergence points, dominant signal
8
Trace Network State
GET /api/stigmergy/state — total traces, by type, by sphere, by bioregion

AIF Inspector

Run Test Query

Fire a query from the admin to create or update a session, then inspect it immediately.

Enter a session ID above, or run a test query below to auto-create one.
Session IDs appear in query responses under session.session_id

Diagnostic

📄 PDF Preview

Loading preview…