Autonomous Agents · Welfare Theory

EHD-Watch — Exocentric Homeostatic Deliberation

A live agent that monitors Milan PM2.5 air quality and deliberates over remedial actions using exocentric homeostasis: its primary welfare component Wext reflects the state of the world, not the agent itself.

Welfare Vector Homeostatic Deliberation Groq / Llama 3.1 Vanilla JS

EHD-Watch is a research prototype of an exocentric homeostatic deliberation agent. Unlike standard self-interested agents, its primary welfare component Wext is world-directed: it measures how far the environment deviates from a healthy reference state (here, PM2.5 air quality in Milan).

The agent maintains a three-component welfare vector (Wext, budget, freshness) and computes a scalar Vaggregate. When Wext drops below 0.50 a trigger fires, activating deliberation: the agent calls the Groq-hosted Llama 3.1 8B model to reason about which action (fetch_data, post_alert, or wait) maximises the hope term Bt — the expected improvement to the welfare vector from a candidate action.

Wext is computed from the PM2.5 level relative to the healthy baseline of 35 µg/m³ via a logistic function, ensuring direct mean reversion: when air quality improves, welfare rises automatically. The trend estimate gt (EWMA of tick-to-tick delta) is used only for the agent's verbal reasoning, not for welfare computation. Endocentric components (budget and freshness) enforce resource constraints so the agent cannot act without cost.

This demo simulates air-quality data client-side and streams the agent's inner monologue from Llama 3.1 8B via Groq in real time. Tick interval: 8 seconds. This demo implements the framework described in the research paper by the same author.

Thought Stream

──────────Waiting for first tick…

Welfare State

Wext — Primary / World-directed 0.70
Budget API — Endocentric 0.90
Data Freshness — Endocentric 0.95
Vaggregate 0.852
Trigger NO

Action Log

No actions executed yet

Idle