Skip to content

Docs

The khepra model step by step — every formula and default it uses.

Forecast

  1. Pick a sample shape to try the planner, or choose “Paste my own forecast”. Samples are made up to show typical day shapes; they are not any grid's real data.
  2. A pasted forecast is 2 to 72 numbers in gCO₂e/kWh, one per hour, separated by commas, spaces, semicolons or new lines. Values must be between 0 and 2,000.
  3. Set “First hour” to the clock hour (0–23) of the first value so start times read as real times. Times past midnight show “+1 day”.
  4. Public sources that publish hourly forecasts include grid operators (for example the National Grid ESO Carbon Intensity API in Great Britain) and data providers; copy the forecast column and paste it.

Job

  1. Job length is the run time in whole hours (1–48). The window is always one contiguous run — khepra does not pause or split jobs.
  2. Average power is what the job draws while running, in kW — for example the GPU and server draw of a training node, or a measured rack average.
  3. “Finish within” is the deadline in hours from the first forecast hour. It cannot be longer than the forecast, and the job cannot be longer than the deadline.
  4. A field out of range turns red with the reason under it and the result waits until it is fixed. “Reset to defaults” puts every field back.

Window search

  1. For every start hour s from 0 to deadline − length, khepra averages the forecast values s … s + length − 1.
  2. The window with the lowest average wins. On a tie the earliest start wins, so nothing waits longer than it has to.
  3. “Run now” is the window that starts at the first forecast hour.

Emissions

  1. Energy (kWh) = average power (kW) × job length (h). It is the same for both windows.
  2. Emissions (kg CO₂e) = average intensity of the window (g/kWh) × energy (kWh) ÷ 1,000.
  3. Saved = run-now kg − best-window kg; the percentage is saved ÷ run-now.
  4. This uses the average intensity of the grid mix you pasted, not the marginal plant that answers your extra load, and ignores data-center overhead (PUE). Multiply power by your PUE first if you want it included.

Workspace, saved plans and CSV

  1. Choose Sign up, then enter your name, email and a password with at least 8 characters, one letter and one number.
  2. You land in your workspace at /app. The planner there remembers your last inputs in this browser (localStorage).
  3. Name a plan and choose “Save plan” to keep it in the list below the planner (up to 200, newest first). Delete removes one; clearing site data removes all.
  4. “Export CSV” downloads every saved plan. Text cells that start with = + - @ get a leading apostrophe so a spreadsheet does not run them as formulas.
  5. Use Log out in the top bar when you are done on a shared device. To delete your account, email [email protected].

Account API

  1. POST /api/auth/signup with JSON { name, email, password } → 201 and a session cookie; 409 if the email is taken, 400 on invalid input.
  2. POST /api/auth/login with JSON { email, password } → 200 and a session cookie; 401 on a wrong password, 429 after too many tries.
  3. GET /api/auth/me → 200 with the signed-in user, or 401 when signed out. POST /api/auth/logout ends the session.
  4. Requests that change data must come from the same origin (cookie session, no API keys). The planner itself has no API — it runs in your browser.

khepra is a planning aid, not a measurement: results are only as good as the forecast you paste, and the sample shapes are made up. Check real emissions against your provider's data.