J.

Jev Stale automation detection Code Example

Identify a workflow that has outlived its original purpose.

Send launch reminders

Workflow Send launch reminders
Launch Date three months ago
Still Running Yes

What maintenance action is appropriate?

0% Review for retirement.
Review for retirement 72%
Keep running 20%
Increase frequency 8%

Send it to review for retirement.

Code
Conceptual pseudocode — not official Jev SDK syntax
// Conceptual pseudocode — not Jev SDK syntax
const state = {
  "workflow": "Send launch reminders",
  "launch_date": "three months ago",
  "still_running": true
};

const decision = await evaluateDecision({
  state,
  question: "What maintenance action is appropriate?",
  options: ["Review for retirement","Keep running","Increase frequency"],
});

// Your adapter normalizes the provider response.
// Tune this example threshold on labelled data.
if (decision.outcome === "Review for retirement"
    && decision.probability >= 0.85) {
  flagStaleWorkflow(decision);
} else {
  queueForReview(decision);
}

This adapter illustrates the decision boundary. Check the official Jev docs for current API syntax.