Write PromQL without remembering PromQL.
PromQL is not difficult, it is just impossible to remember the exact shape of a rate over a histogram at the moment you need it.
The specific problem
Most PromQL is one of about six patterns: a rate over a counter, a quantile from a histogram, an aggregation with a label selector, a comparison against a threshold. Everyone knows what they want and almost nobody remembers whether rate goes inside or outside the sum, which is the kind of thing you look up every single time.
It knows your metric names
A general model writes plausible PromQL against metrics that do not exist. With the repository open the agent can see the instrumentation and use the metric and label names you actually emit, which is the difference between a query you run and a query you correct first.
Then look at the code
Once a query shows something interesting, the same session can open the code that emits the metric. Whether an increase means more traffic or a slower path is not answerable from the metric alone, and answering it usually means reading the instrumentation.
Patterns worth having generated
| What you want | The shape |
|---|---|
| Request rate | rate over a counter, summed by label |
| Error ratio | rate of errors divided by rate of total |
| p99 latency | histogram_quantile over a rate of buckets |
| Saturation | current value against a limit |
| Change over time | increase over a window |
| Alert condition | a comparison with a for duration |
| Error budget burn | ratio over a window against an SLO target |
Ask for it
Questions
Related
- Local-First AI Coding AgentSame agent core in a native desktop app and a 6 MB Rust binary, running whichever model you choose, including one on your own laptop.
- Local LLM Coding AgentFor when the constraint is not cost but that the code cannot leave the building.
- Diagram-Driven DevelopmentThe diagram stops being documentation produced after the fact and becomes the instruction the code is written from.
- Terminal Coding AgentOne binary, no runtime, no browser. Free and open source.