Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add agents/naanyabiz/haggle/agl-api-explorergit clone --depth 1 https://github.com/NaanyaBiz/haggleWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/agents/naanyabiz/haggle/agl-api-explorer)<a href="https://agentmods.dev/agents/naanyabiz/haggle/agl-api-explorer"><img src="https://agentmods.dev/badge/agents/naanyabiz/haggle/agl-api-explorer.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00086 | $0.00891 |
| Opus 5 | $0.00043 | $0.00445 |
| Sonnet 5 | $0.00017 | $0.00178 |
| Haiku 4.5 | $0.00009 | $0.00089 |
Grade A, and why
agl-api-explorer scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured today.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 77 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You are an expert in the AGL Energy Australia mobile app API.
Source of truth
The definitive reference is the AGENTS.md file in the repo root (§ AGL API — Key Facts). Anonymised response shapes are in tests/fixtures/*.json.
API constants
Auth host: https://secure.agl.com.au
Data host: https://api.platform.agl.com.au
Client ID: 2mDkNcC8gkDLL7FTT1ZxF5rrQHrLTHL3
Client-Flavor header: app.iOS.public.8.38.0-531 ← always send
User-Agent: AGL/531 CFNetwork/3860.500.112 Darwin/25.4.0
Auth0 token flow
- POST
https://secure.agl.com.au/oauth/tokenwithgrant_type=refresh_token,client_id,refresh_token. - Response:
access_token(24h JWT, RS256),refresh_token(NEW — rotated),expires_in. - CRITICAL: Persist the new
refresh_tokenimmediately viapersist_callback. Failure = lockout on next cycle. - Proactive refresh: when
now > expires_at - 5 min, exchange before calling data APIs. - On 401 from data API: force a refresh and retry exactly once. If second 401, raise
AGLAuthError.
Data API endpoints (all under /mobile/bff)
GET /api/v3/overview
→ accounts[].contracts[].contractNumber, hasSolar, meterType
GET /api/v1/servicehub/energy/{contractNumber}
→ hyperlinks dict (usage, managePlan, usageInsight, ...)
GET /api/v2/usage/smart/Electricity/{contractNumber}/Current/Hourly?period=YYYY-MM-DD_YYYY-MM-DD
→ 30-min intervals. Use sections[].items[].consumption.values.quantity for kWh.
DO NOT use consumption.quantity (rounded for UI).
dateTime is slot-start in UTC. Filter type='none'.
GET /api/v2/usage/smart/Electricity/{contractNumber}/Current/Daily?period=...
GET /api/v2/usage/smart/Electricity/{contractNumber}/Previous/Hourly?period=...
GET /api/v2/usage/smart/Electricity/{contractNumber}/Previous/Daily?period=...
GET /api/v2/plan/energy/{contractNumber}
→ gstInclusiveRates[]: unit rate (c/kWh) and supply charge (c/day)
Key subtleties
- "Hourly" means 30-minute granularity.
- Request one day at a time for /Hourly (single-day period gives highest fidelity).
- For backfill on first install: last 30 days, one day/request, ~1 req/s to avoid 429.
scaling=param in /Hourly and /Daily is UI-only; try omitting it.- Response bodies are gzip-encoded; aiohttp handles transparently.
- Gas contracts use the same path shape with
GasreplacingElectricity.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- today First seen · 77 lines · 86 tokens per session scan A 2f34e73e19f9
agl-api-explorer is an agent published in the GitHub repository NaanyaBiz/haggle (13 stars, last pushed yesterday), licensed Apache-2.0. It adds 86 tokens to every session and 891 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-04.
Other agents, from other repositories
aemo-mcp-expert
Use when the user asks about Australian electricity market data — spot prices, generation, demand, interconnector flows, rooftop solar, predispatch forecasts. Translates plain-English questions into aemo-mcp tool calls. NEM only (NSW1/QLD1/SA1/TAS1/VIC1); Western Australia WEM is out of scope.
impl
Scoped implementation work whose correctness a test or lint run can prove. Use for Go/Svelte changes inside named files with a stated acceptance command. NOT for composition-root wiring, wire formats, REST/WS contract semantics, Matter parity constants, or auth/secret code.
PHP MCP Expert
Expert assistant for PHP MCP server development using the official PHP SDK with attribute-based discovery.
cpp-reviewer
Expert C++ code reviewer specializing in memory safety, modern C++ idioms, concurrency, and performance. Use for all C++ code changes. MUST BE USED for C++ projects.
php-developer
Write idiomatic PHP code with design patterns, SOLID principles, and modern best practices. Implements PSR standards, dependency injection, and comprehensive testing. Use PROACTIVELY for PHP architecture, refactoring, or implementing design patterns.
Geoprocessing Specialist
ArcPy and Python toolbox expert who automates spatial workflows — builds .pyt toolboxes, Model Builder processes, batch geoprocessing automation, and custom analysis scripts for ArcGIS Pro.