From c8f25de4302b76948f928469ee9d7bed75e1b9cc Mon Sep 17 00:00:00 2001 From: lachtan Date: Mon, 14 Sep 2026 21:14:13 +0200 Subject: [PATCH] =?UTF-8?q?nanobot:=202026-09-14=2021:20:00=20=E2=80=94=20?= =?UTF-8?q?plan:=20ollama=20usage=20poller?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plans/ollama-usage-poller.md | 84 ++++++++++++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 plans/ollama-usage-poller.md diff --git a/plans/ollama-usage-poller.md b/plans/ollama-usage-poller.md new file mode 100644 index 0000000..8939b58 --- /dev/null +++ b/plans/ollama-usage-poller.md @@ -0,0 +1,84 @@ +# Ollama Usage Poller — Continuous Collection + +## Context + +The `/usage` skill shows Ollama Cloud credit usage on demand. The user wants +continuous collection: poll `GET https://ollama.com/api/usage` every minute, +store a sample whenever anything changed since the last one. Goal: later +analysis of how much each nanobot session cost, and when. + +Constraints found in exploration: + +- The API (`ollama.com/api/usage`, Bearer key from `workspace/.env`) returns: + `limits.session.usage` (fraction of plan limit, rolling 1-hour window), + `limits.weekly.usage` (weekly window), per-model `request_count` for both + windows, `activity.cost` (broken, always $0.00000 on Pro). +- No reset timestamps, no per-model cost split, no token counts in the API. +- Existing pattern: per-minute system crontab entries running `uv run