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