Try Hanzo
typesafe · starter

Jev

Typed decisions at POST /v1/decisions.

Specifications

Architecturedecision
Modalitiesdecision
Price…
Model ID~typesafe/jev-latest
Decisions
TypeScript
// npm install hanzoai
import { AiApi, Configuration } from 'hanzoai'

const ai = new AiApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }))

const { data: decision } = await ai.postDecisions({
  aiDecisionsRequest: {
    model: '~typesafe/jev-latest',
    state: { incident: 'checkout 5xx at 14%' },
    questions: {
      severity: {
        type: 'choice',
        instructions: 'How severe is this incident?',
        criteria: {
          low: 'cosmetic or internal; no customer is affected',
          high: 'some customers are blocked from finishing a task',
          critical: 'every customer is blocked and no revenue comes in',
        },
      },
    },
  },
})

const { choice, probabilities } = decision.answers.severity
console.log(choice, probabilities)
…

Use Jev via Hanzo AI

One API key. One call to POST /v1/decisions.

Build what’s next.