Skip to content

feat(prometheus): expose PromQL query as invokable provider method#6483

Open
ykd007 wants to merge 2 commits into
keephq:mainfrom
ykd007:feat/prometheus-expose-query
Open

feat(prometheus): expose PromQL query as invokable provider method#6483
ykd007 wants to merge 2 commits into
keephq:mainfrom
ykd007:feat/prometheus-expose-query

Conversation

@ykd007
Copy link
Copy Markdown

@ykd007 ykd007 commented May 14, 2026

Problem

Closes #6475

Users want to use Keep's AI assistant to query Prometheus directly via PromQL. Currently PrometheusProvider has a private _query() method that isn't registered as an invokable method, so it doesn't appear in the AI agent's tool list or the Keep provider UI.

Solution

  • Added PROVIDER_METHODS registration for a new execute_query method
  • Added public execute_query(query: str) -> dict wrapper with friendly HTTP error messages
  • Keep's ProviderMethodDTO auto-infers the query parameter from the function signature via reflection — no manual param spec needed

Now users can invoke PromQL queries directly from the Keep AI assistant or workflow actions.

@dosubot dosubot Bot added size:S This PR changes 10-29 lines, ignoring generated files. Feature A new feature Provider Providers related issues labels May 14, 2026
@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@ykd007
Copy link
Copy Markdown
Author

ykd007 commented May 14, 2026

I have read the CLA Document and I hereby sign the CLA

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature A new feature Provider Providers related issues size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[➕ Feature]: Add method to query prometheus provider

2 participants