updates on the hook and endpoints for the ai agents

This commit is contained in:
2026-09-30 15:08:33 +05:30
parent ede1731fa5
commit d33fff01d3
5 changed files with 180 additions and 38 deletions

View File

@@ -826,6 +826,16 @@ export const updateAiAgent = async (id, patch) => {
* false when the backend is not subscribed to AI_engine telemetry.
* @param {number} days
*/
/**
* What is actually wired, for the Skills & Tools banner: whether AI_engine is
* reading the registry (it polls ~every 30 s; the backend records each read),
* telemetry, live agents, and whether the Test tab has a model.
*/
export const getAiStatus = async () => {
const response = await doormileAxios.get('/admin/ai/status');
return response.data.data;
};
export const getAiInsights = async (days = 7) => {
const response = await doormileAxios.get(`/admin/ai/insights${buildQuery({ days })}`);
return response.data.data;