ebb-ai — carbon-aware deferral

OpenClaw plugin: auto-defer "do it later" / "by tomorrow" / "overnight" tasks to the cleanest electricity-grid hour inside a deadline. Native OpenClaw tools for carbon-aware AI workflow scheduling. Shares ~/.ebb-ai/queue.db with the ebb-ai MCP server and CLI.

Audits

Pending

Install

openclaw plugins install clawhub:@vitalini/ebb

@vitalini/ebb

OpenClaw plugin that exposes ebb-ai as native OpenClaw tools. Published on ClawHub as @vitalini/ebb; its runtime id in the gateway is ebb.

When a user says "do this later", "by tomorrow", "tonight", "overnight", "by EOD", "remind me to", or any other deferral phrase, this plugin's schedule_task tool gets invoked automatically — the LLM dispatch is routed to the cleanest electricity-grid hour inside the deadline, 40-70 % lower carbon vs running immediately.

Tools registered

Tool names match the @ebb-ai/mcp MCP-server surface (no ebb_ prefix).

ToolPurpose
schedule_taskQueue a task at the cleanest hour. The deferral trigger.
recommend_windowPreview the cleanest hour without queueing. Read-only.
check_queue_statusList all tasks / detail one (with carbon receipt). Read-only.
cancel_taskCancel a queued task. Idempotent.
get_grid_forecastHourly grid carbon-intensity forecast. Read-only.
update_deadlineMove a queued/scheduled task's deadline.
cancel_allCancel every queued/scheduled task at once.

Install

openclaw plugins install clawhub:@vitalini/ebb

Restart the OpenClaw gateway. To update later: openclaw plugins update @vitalini/ebb.

Verify the install (smoke test)

After installing and restarting the gateway:

  1. Inspect — all four tools should be listed:

    openclaw plugins inspect ebb --runtime --json
    

    The tools array contains schedule_task, recommend_window, check_queue_status, cancel_task, get_grid_forecast, update_deadline, cancel_all. (Shape: non-capability in the plain inspect output is the normal label OpenClaw gives tool plugins — it is not an error.)

  2. Validate the installed package:

    openclaw plugins validate --root ~/.openclaw/extensions/ebb --entry ./dist/index.js
    
  3. Exercise the tools in any OpenClaw session:

    • "preview the cleanest window for a task due tomorrow 6pm in GB" → ebb_recommend_window
    • "do this overnight: summarise today's commits" → ebb_schedule_task
    • "what's in my ebb queue?" → ebb_check_queue_status

The queue is a SQLite ledger opened through Node's built-in node:sqlite (Node ≥ 22.5) — there is no native module to compile, so a fresh install needs no extra build step.

Building from source

pnpm --filter @vitalini/ebb build          # bundle to dist/index.js
openclaw plugins build    --root packages/openclaw-plugin --entry ./dist/index.js
openclaw plugins validate --root packages/openclaw-plugin --entry ./dist/index.js
pnpm --filter @vitalini/ebb test           # run the plugin test suite

Pack and install the tarball directly (no ClawHub round-trip):

cd packages/openclaw-plugin && npm pack
openclaw plugins install ./vitalini-ebb-<version>.tgz

Configuration

Optional config schema:

{
  "dbPath": "/home/you/.ebb-ai/queue.db",
  "defaultRegion": "GB"
}

dbPath defaults to ~/.ebb-ai/queue.db — the same path used by @ebb-ai/mcp (MCP server) and @ebb-ai/cli (CLI). All three share one ledger, so deferring a task in OpenClaw and listing it from ebb stats Just Works.

defaultRegion — the grid region used when a tool call doesn't name one. Leave it unset and ebb-ai auto-detects the region from the host machine's timezone: Europe/LondonGB, America/Los_AngelesUS-CAL-CISO, America/New_YorkUS-MIDA-PJM, Europe/ParisFR, Europe/BerlinDE. Timezones it can't map fall back to GB (always-live data via UK National Grid ESO, no API key). Set defaultRegion explicitly for any other region (US-TEX-ERCO, US-NE-ISNE, …). Each tool call may also pass its own region, which overrides everything; ebb_schedule_task reports a region_source (request / config / timezone / default) so you can see which rule applied. Non-GB regions may need EBB_*_API_KEY env vars for live data, otherwise a deterministic mock is used.

When does the plugin auto-invoke?

The ebb_schedule_task tool description tells the LLM to invoke when the user's phrasing signals deferral:

  • "do this later" / "by tomorrow" / "tonight" / "overnight"
  • "by EOD" / "this week" / "next week"
  • "when you have a moment" / "remind me to"
  • "queue this up" / "schedule this"
  • "no rush" / "not urgent"

For interactive tasks ("summarize this", "what does X do", "write a function") the plugin stays out of the way.

License

Apache-2.0 © Vitalii Borovyk · https://github.com/Vitalini/ebb-ai