Skip to main content

EnergyChain

EnergyChain is the developer infrastructure through which AI applications can understand, interact with, and safely optimize energy systems—from solar installations and batteries to mini-grids, utilities, and electricity networks.

Status: v0.1.0 alpha. Offline-first, Python-first, and read-only by default. Simulated energy data are not live device measurements.

EnergyChain brings composable, vendor-neutral energy data types, connectors, safe callable tools, storage, deterministic energy calculations, a pluggable agent interface, and in-process workflows to Python developers. EnergyChain is a separate project from Energy Data Network (EDN).

Installation

python -m pip install energychain

To pin this release:

python -m pip install energychain==0.1.0

Requires Python 3.10 or newer. The core package uses only Python standard-library runtime dependencies.

Quickstart

from energychain import EnergyChain

chain = EnergyChain.demo()
user = chain.principal("developer", allowed_sites={"demo-site"})

assets = chain.tools.invoke("discover_assets", user, "demo-site")
print([a.name for a in assets])

result = chain.tools.invoke(
    "estimate_battery_runtime", user, "demo-site",
    arguments={"battery_id": "demo-battery", "load_w": 900, "reserve_pct": 20},
)
print(result)

Security: principal() is a local-demo convenience, not a production authentication mechanism. Production applications must authenticate principals, assign site-level permissions from a trusted service, and enforce authorization at API boundaries. The included connector simulator never sends live control commands.

Components available in 0.1

Component Implementation
Energy models Site, asset, metric, reading, event, tariff, energy plan
Connectors Abstract connector, registry, deterministic hybrid site simulator, CSV import
Memory In-process bounded memory, SQLite durable persistence
Energy tools Asset discovery, state, history, battery state, runtime and cost estimates, preferences
Safety Permission scope, site boundaries and optional action-specific execution approval
Intelligence Battery-runtime estimate, tariff cost, baseline mean forecast, outlier baseline
Agent Explicit tool selection plus optional injected text-model callback
Workflow In-process fail-closed sequential tool execution
Observability In-memory bounded trace events
Developer experience PyPI-ready packaging, examples, tests, CI and trusted-publisher release workflow

Intentionally not included in 0.1

  • Authenticated integrations with third-party solar/battery vendors (no verified API credentials or access yet)
  • A production-ready control or dispatch runtime, remote device command implementation, or energy safety certification
  • Autonomous LLM tool selection, multi-agent coordination, event subscriptions, distributed scheduling or durable workflow retries
  • Production-grade multi-tenant identity, authorization server, encryption/key management, or high-volume telemetry infrastructure
  • Trained forecasting models, validated anomaly detection accuracy, hardware testing or independently measured energy savings
  • Managed EnergyChain Cloud, hosted APIs, TypeScript SDK, vector-search services or MCP adapter

These are subsequent product-development efforts, not features to advertise as shipped.

Connect existing CSV exports

Provide asset_id,metric,value,timestamp,source columns and register an explicit EnergySite and its EnergyAsset definitions. See CSVConnector.from_csv(path, site=..., assets=...). The latest row is treated as the last recorded value (not necessarily live); caller must check freshness before operational decisions.

Design principles

  1. Developer-first: EnergyChain is software infrastructure for developers, not a national-grid control product.
  2. Standard energy semantics: W, Wh, %, UTC-offset-aware timestamps, data-source and quality fields.
  3. Composable: Connectors, tools, memory and language models can be independently replaced.
  4. Data is not authority: An LLM response cannot issue a physical command. Tools always check policies.
  5. Provenance matters: Simulated, estimated and measured values are explicitly labelled.
  6. Tests and evidence: Do not confuse synthetic demonstrations with field validation.

Local development

python -m pip install -e '.[dev]'
python -m pytest -q
python -m build
python -m twine check dist/*
python examples/quickstart.py

See architecture for contract boundaries and limitations and release guide for verified distribution steps.

Licensing and safety

EnergyChain is distributed under the MIT License. Published wheels and source archives are publicly downloadable even though the development repository is private. Alpha-quality software: not warranted for physically controlling energy equipment.

Metadata

Release files for energychain 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for energychain 0.1.0
File Size Uploaded Provenance Actions
energychain-0.1.0.tar.gz 32.1 kB With provenance Details for energychain-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for energychain 0.1.0
File Interpreter ABI Platform Actions
energychain-0.1.0-py3-none-any.whl Python 3 none any Details for energychain-0.1.0-py3-none-any.whl

Total release size: 57.3 kB

Release files / energychain-0.1.0.tar.gz

Download URL energychain-0.1.0.tar.gz
Size 32.1 kB
Tags Source
SHA-256 checksum
How to use checksums
96727f852e83b60264ff475abac1016782260e5a4995c5a27a47f6a7613bd7dd
BLAKE2b-256 checksum
How to use checksums
7720a99a4a42b0030c56e4ac60af20abf06e388e6bec9dd161d861fd37873190
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 26, 2026.

Transparency log

Release files / energychain-0.1.0-py3-none-any.whl

Download URL energychain-0.1.0-py3-none-any.whl
Size 25.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
634aa7c1d76149fdc3c1e0324d62d114fc733ce40de6bebc56f8a2f51eda1989
BLAKE2b-256 checksum
How to use checksums
1c2c2784b48e6e41f29079edcd188d25157c478aea1a09121262f0524370b339
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 26, 2026.

Transparency log

Security for energychain 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for energychain-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 26, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page