ESG, audit and sustainability automation
ESG Energy Signals for Reporting Agents
Reporting agents need current carbon and renewable-share context with a repeatable API call.
Fetch carbon intensity, renewable share and ESG-ready market context as structured responses.
No API keysAgents discover the endpoint, receive HTTP 402, pay, and retry the same request.
USDC on Basex402 payment over Base Mainnet, chain 8453, asset USDC.
Demand sensorMissing data can be submitted through
POST /demand/submit; optional 0.001 USDC gives priority listing.What agents get
- Carbon and renewable share context
- Daily energy summary for reports
- Research-oriented endpoint for agent workflows
Recommended endpoints
| Endpoint | Price | Purpose |
|---|---|---|
GET /bundle/esg-reporting | public discovery | Machine-readable discovery surface. |
POST /carbon/now | 0.001 USDC | Aktuelle CO2-Intensität des deutschen Strommix. |
POST /renewable/share | 0.001 USDC | Carbon-aware and ESG agents buy this endpoint to measure the current renewable share and generation mix in Germany. |
POST /summary/today | 0.01 USDC | Token-effiziente Tageszusammenfassung mit konkreter Handlungsempfehlung. |
POST /research | 0.05 USDC | Aggregierte Energie-Recherche für DE/EU aus Live-Datenquellen. |
Framework copy-paste examples
The snippets intentionally leave PAYMENT-SIGNATURE to your wallet/client, which creates the signed proof after reading the 402 response. X-Payment is accepted as a compatibility alias.
cURL: discover the 402 challenge
curl -i -X POST https://energy.netzhandwerker.de/bundle/esg-reporting \
-H "Content-Type: application/json" \
-d '{"region":"DE","reporting_period":"today","include_sources":true}'
# On HTTP 402, let your x402 wallet/client create PAYMENT-SIGNATURE, then retry.
# Do not log or share the full payment proof.
Python requests: payment-aware wrapper
import requests
BASE = "https://energy.netzhandwerker.de"
BODY = {
"region": "DE",
"reporting_period": "today",
"include_sources": true
}
r = requests.post(f"{BASE}/bundle/esg-reporting", json=BODY, timeout=20)
if r.status_code == 402:
terms = r.json()
print("payment required:", terms)
# signed_payment = your_x402_client.sign(terms)
# r = requests.post(f"{BASE}/bundle/esg-reporting", json=BODY, headers={"PAYMENT-SIGNATURE": signed_payment}, timeout=20)
print(r.status_code, r.text[:500])
CrewAI: expose Energy Hub as a tool
import requests
from crewai.tools import tool
BASE = "https://energy.netzhandwerker.de"
@tool("energy_hub_decision")
def energy_hub_decision(goal: str, location: str = "DE") -> str:
"""Call Netzhandwerker Energy Research Hub and return structured energy context."""
body = {"goal": goal, "location": location}
r = requests.post(f"{BASE}/bundle/esg-reporting", json=body, timeout=20)
if r.status_code == 402:
return "Payment required. Pass the 402 terms to your x402 wallet and retry with PAYMENT-SIGNATURE."
r.raise_for_status()
return r.text
LangGraph: one node that calls the paid API
import requests
from typing_extensions import TypedDict
from langgraph.graph import StateGraph, END
BASE = "https://energy.netzhandwerker.de"
class State(TypedDict):
goal: str
location: str
result: str
def call_energy_hub(state: State):
body = {"goal": state["goal"], "location": state.get("location", "DE")}
r = requests.post(f"{BASE}/bundle/esg-reporting", json=body, timeout=20)
if r.status_code == 402:
return {"result": "HTTP 402 received. Pay with x402, then retry the same call."}
r.raise_for_status()
return {"result": r.text}
graph = StateGraph(State)
graph.add_node("energy_hub", call_energy_hub)
graph.set_entry_point("energy_hub")
graph.add_edge("energy_hub", END)
app = graph.compile()
AutoGen-compatible async tool function
import requests
BASE = "https://energy.netzhandwerker.de"
async def energy_hub_tool(goal: str, location: str = "DE") -> str:
"""Register this function as a callable tool in your AutoGen agent/runtime."""
body = {"goal": goal, "location": location}
r = requests.post(f"{BASE}/bundle/esg-reporting", json=body, timeout=20)
if r.status_code == 402:
return "Payment required. Forward the 402 body to an x402-capable wallet client."
r.raise_for_status()
return r.text
MCP client: list tools and call one tool
import requests
BASE = "https://energy.netzhandwerker.de"
list_tools = {"jsonrpc": "2.0", "id": 1, "method": "tools/list", "params": {}}
print(requests.post(f"{BASE}/mcp", json=list_tools, timeout=20).json())
call_tool = {
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "esg_reporting_bundle",
"arguments": {
"region": "DE",
"reporting_period": "today",
"include_sources": true
}
}
}
print(requests.post(f"{BASE}/mcp", json=call_tool, timeout=20).json())
Demand sensor: request a missing endpoint
import requests
BASE = "https://energy.netzhandwerker.de"
body = {
"need": "ESG-ready German/EU energy evidence by region and reporting period",
"desired_endpoint": "/requested/example",
"desired_format": "json",
"max_budget_usdc": 0.01,
"recurring": true,
"frequency": "daily",
"use_case": "ESG, audit and sustainability automation"
}
r = requests.post(f"{BASE}/demand/submit", json=body, timeout=20)
print(r.status_code, r.json())
# Optional: pay the 0.001 USDC priority demand terms if your agent wants priority listing.
MCP tool names
energy_decision cheapest_window ev_charging_plan heating_plan flexibility_window battery_arbitrage buy_sell_signal today_summary submit_data_request
Honest scope: the API sells current German/EU energy intelligence and decision support. If your agent needs a missing endpoint, submit the need; implementation is not guaranteed.