Skip to content

About

Development repository_Agentic network that cut a community's evening peak, secured shared way of energy coordination and flexibility negotiation.

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

Repository files navigation

Murmur

Agents that cut a community's evening peak. Homes and buildings offer to draw less power in an evening window; a community agent gathers their offers into one promise to the buyers above it (a utility, a grid operator, an aggregator), clears what the buyers take, fills the gaps when a member falls short, checks every signed meter reading and pays each member for what its meter shows. Single sites (a solar-and-battery plant, a data center) answer the aggregator beside the community, in the same signed messages.

Code decides every amount. A small language model only reads what people write to their agent ("keep the battery full tonight") and words the reports; a note can only become a limit, and a guard checks every device call against the owner's limits before a sealed command reaches a driver.

Architecture in one screen

 buyers (utility, grid operator)        aggregator ─────────── single sites (plant, data center)
          │  orders, contracts, baselines,   │  requests, reports       each its own process
          │  settlement                      │
          ▼                                  ▼
 ┌──────────────────────── community agent ─────────────────────────┐
 │ forecast · cover and promise · clearing · gap desk · report up   │
 └───────────────┬──────────────────────────────────────┬───────────┘
                 │ discover, offers, confirm, readings  │
        homes' host (home nodes)              buildings' host (building nodes)
        each node: offer rule (code) → agent (notes, reports) → guard → seal → driver
                 └────── every message signed (Ed25519), over one message bus ──────┘

Every participant is a process with its own key and its own name on the message bus. The bus speaks a small HTTP contract (join, send, notify, claim, ack, with leases, fences and run grants); src/murmur/protocol/transport.py is its client and demo/runner/bus.py a local implementation. The clock is the dataset's: a replay of measured days at 15-minute steps, held at each step until the network has finished it. docs/ARCHITECTURE.md has the whole picture.

Directory map

Path What
src/murmur/protocol/ envelope, canonical JSON and Ed25519 signing, message ids, the bus client, the inbox poller, the token door
src/murmur/node/ a home or building node: replay and simulator, forecast, offer rule, agent, note reader, model client, guard, seal and drivers, report
src/murmur/agents/ the processes: the hosts of home and building nodes, the aggregator, a single site; community/ is the community agent (market, clearing, gap desk, report)
src/murmur/settlement/ meter checks, baselines and the pay rules
src/murmur/config.py settings from agent.json and MURMUR_* variables
demo/runner/ a whole evening on one machine: the local bus, run grants, the stand-in buyers and model, the state feed, synthetic example data
demo/page_builder/ the demo pages from recorded evenings: templates, style sheets, scripts and the Python that fills them; checks/ for browser checks
demo/recordings/ the recorded evenings the pages replay
demo/pages/ the built pages
experiments/engie/ offline pipelines on ENGIE's 2025 data: meter cleaning, peak allocation, the referee, the year runs
tests/ the test suite, on synthetic fixtures in tests/fixtures/
scripts/verify_clean_repo.py the trace scanner every file must pass
docs/ ARCHITECTURE, PROTOCOL_AND_SAFETY, DATA_AND_LIMITS

Quickstart

git clone <this repository> murmur && cd murmur
python3 -m venv .venv && . .venv/bin/activate && pip install -e ".[dev]"
pytest -q

The suite runs in seconds on the committed synthetic fixtures: no dataset, no network beyond 127.0.0.1, no fixed port. Tests that need ENGIE's data carry @pytest.mark.engie_data and are skipped unless MURMUR_ENGIE_DATA_DIR is set.

Configuration

Each process reads its settings from one folder, $MURMUR_CONFIG_DIR: agent.json and secrets/ (its keys, bus tokens and run grants, never in the repository). The order is the code's defaults (config.DEFAULTS), then the dataset's agent_defaults, then agent.json.

Variable Meaning
MURMUR_CONFIG_DIR the process's configuration folder
MURMUR_DATA_DIR the dataset it replays (dataset.json, fleet_v2.json, homes/, buildings/, devices/)
MURMUR_MODELS_DIR forecast models: a node's when its forecast is trained, and the community agent's outlook
MURMUR_LOG_DIR where it writes logs (default logs/ in the configuration folder)
MURMUR_DEVICES the homes' devices that take part besides batteries and cars: all or a comma list (unset: none); a building's own fans, plug loads and car ports always take part
MURMUR_ENGIE_DATA_DIR ENGIE's dataset, for the experiments and their tests

Every address a part listens on or calls is a setting. A service listens at bind_host (default 127.0.0.1, the loopback address) on the port its settings name: community_port, host_port, buildings_port, aggregator_port, site_port, or a buyer's --port. It calls the bus at town_url in the run town_run_id and the model server at llm_url with llm_model (only with llm_enabled, off by default); the community agent's clock reaches utility_url, host_url, building_urls and clock_extra_targets.

Demo: one evening on this machine

python -m demo.runner example
python -m demo.runner evening --config demo/runner/config.example.json

example writes a synthetic community (three homes, an office, a solar-and-battery plant, a data center; 25 days of data, 5 to 29 January 2025), plain forecast models and its evening to out/example/. evening starts every part at the configuration's host (127.0.0.1 in config.example.json, and when none is given): the bus, the stand-in model, the community agent, two stand-in buyers, the two hosts, the aggregator and the sites, each with its own folder, keys and run grant under out/runs/. It plays the evening from the day before to its settlement, with an owner's note at 17:00, and writes summary.json. It prints the address of its read-only state feed (/live/state.json), which the two-view page's Live view reads (index.html?live=<address>). demo/runner/config.example.json sets every setting; a model server of your own, on that host, is "model": {"url": "http://HOST:PORT", "name": "MODEL"}.

Demo pages

python -m demo.page_builder.build --out demo/pages

The pages replay recorded evenings (demo/recordings/): the two-view page (split view, Data view, Live view), the three-view page, a whole evening, two year sets, the year results, a method note and an architecture page. The builder uses the standard library only. The browser checks in demo/page_builder/checks/ (no word cut at many window sizes, every moment walked, links and script errors) need Playwright: python -m demo.page_builder.checks.fit demo/pages.

ENGIE experiments

pip install -e ".[experiments]"
python -m experiments.engie.meter_cleaning --data-dir DIR --out OUT
python -m experiments.engie.peak_allocation --data-dir DIR --out OUT
python -m experiments.engie.referee --data-dir DIR --out OUT
python -m experiments.engie.year_runs --data-dir DIR --out OUT
MURMUR_ENGIE_DATA_DIR=DIR pytest -q tests/experiments

DIR is ENGIE's 2025 student dataset. What each pipeline measures, and what the data cannot show, is in docs/DATA_AND_LIMITS.md.

Checks before a commit

pytest -q
python scripts/verify_clean_repo.py .

The scanner fails on any private trace: machine names, private addresses, home-folder paths, remote-access words, earlier project names.

About

Development repository_Agentic network that cut a community's evening peak, secured shared way of energy coordination and flexibility negotiation.

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages