Agent tooling

flue-jev-demo

@matthewp7TypeScriptupdated 2026-09-18runnable

Flue agent routing with TypeSafe Jev through Cloudflare AI Gateway

matthewp/flue-jev-demo

Where it calls Jev

export const JEV_MODEL = 'typesafe/jev';

src/flue-jev.ts:76

The link points at the commit we read, so the line number still holds.

What it asks Jev

These question sets are lifted from this project's source exactly as written.

from scripts/demo.mjs:73

  1. intentchoice

    Which team owns this request?

    • billingCharges, invoices, and refunds
    • technicalBugs, outages, and integrations
    • accountLogin, password, and account access
  2. isUrgenttrue/false

    Does this request need immediate attention?

Run it on your own text

The code
import { experimental_evaluate as evaluate } from 'ai';

const { answers } = await evaluate({
  model: 'typesafe-ai/jev',
  state,
  questions: {
    intent: { type: 'choice', instructions: 'Which team owns this request?',
      criteria: { billing: 'Charges, invoices, and refunds', technical: 'Bugs, outages, and integrations', account: 'Login, password, and account access' } },
    isUrgent: { type: 'boolean', instructions: 'Does this request need immediate attention?' },
  },
});

from src/agents/support.ts:7

  1. intentchoice

    Which support team should handle this request?

    • billingCharges, refunds, subscriptions, invoices, and payment methods
    • technicalBugs, outages, errors, configuration, and integrations
    • humanAmbiguous, sensitive, abusive, or explicitly asks for a person
  2. isUrgenttrue/false

    Does this request need immediate attention?

Run it on your own text

The code
import { experimental_evaluate as evaluate } from 'ai';

const { answers } = await evaluate({
  model: 'typesafe-ai/jev',
  state,
  questions: {
    intent: { type: 'choice', instructions: 'Which support team should handle this request?',
      criteria: { billing: 'Charges, refunds, subscriptions, invoices, and payment methods', technical: 'Bugs, outages, errors, configuration, and integrations', human: 'Ambiguous, sensitive, abusive, or explicitly asks for a person' } },
    isUrgent: { type: 'boolean', instructions: 'Does this request need immediate attention?' },
  },
});

from test/flue-jev.test.ts:7

  1. intentchoice

    Which team owns this request?

    • billingCharges and refunds
    • technicalBugs and outages
  2. isUrgenttrue/false

    Does this need immediate attention?

Run it on your own text

The code
import { experimental_evaluate as evaluate } from 'ai';

const { answers } = await evaluate({
  model: 'typesafe-ai/jev',
  state,
  questions: {
    intent: { type: 'choice', instructions: 'Which team owns this request?',
      criteria: { billing: 'Charges and refunds', technical: 'Bugs and outages' } },
    isUrgent: { type: 'boolean', instructions: 'Does this need immediate attention?' },
  },
});

Other projects in this category