Skip to content

flue-jev-demo

Cloudflare Flue agent example that adds a validated route_with_jev tool for typed support routing through AI Gateway.

Serviceprototype

Overview

flue-jev-demo is a standalone Cloudflare-targeted example for the Flue agent framework. All AI requests go through the Worker's AI binding and default AI Gateway, so there are no application API keys or account ID variables: chat turns use an OpenAI model via Cloudflare and typed routing uses TypeSafe Jev.

A useJevRouter() helper turns a typed question map into a validated route_with_jev Flue tool, so the agent can call Jev and receive structured choices, probabilities and confidence without treating Jev as its chat model. The sample SupportAgent routes incoming support requests to billing, technical or human and checks urgency, then reports the team, urgency, confidence and model. It uses published Flue npm packages rather than the monorepo. It uses the published @flue/runtime and @flue/vite packages.

What the decision model decides

TypeQuestionAnswers
ChoiceWhich support team should handle this request?billing · technical · human
Yes / noDoes this request need immediate attention?true · false

How it works

  1. User sends a support request to the Flue agent
  2. Agent calls route_with_jev with the request as state
  3. Jev returns team, urgency and confidence via AI Gateway
  4. Agent reports the routing result

Strengths

  • No application API keys; uses Cloudflare bindings
  • Typed tool validation
  • Jev separate from the chat model

Caveats

  • Example project
  • Requires Cloudflare AI Gateway access to Jev

Getting started

cd flue-jev-demo, pnpm install, then run or deploy with the Flue Vite tooling per the README.

At a glance

Type
Service
Status
prototype
Language
TypeScript
Runtime
Cloudflare Workers (Flue)
Has code
yes

Use cases and integrations

How curated lists describe it

Frequently asked questions

Do I need a TypeSafe key?

No, requests go through Cloudflare's AI binding and AI Gateway.

What does Jev decide?

Which support team should handle a request and whether it is urgent.

Is Jev the chat model?

No, chat uses an OpenAI model; Jev is a tool.

Related projects

  • Open-source team agent platform for Slack, GitHub and more that asks Jev once per session which agent runtime and model to use.

    ServicebetaTypeScript
  • n8n Jev Decision node that sends confident items onward automatically and routes uncertain ones to a person.

    ProjectbetaTypeScript
  • .NET 10 and React 19 ticket triage where Jev answers five typed questions in one call and .NET business rules make the final routing.

    ProjectprototypeC#
  • Symfony demo that triages French public-service requests with one Jev call each: intent choice, urgency score and bug noul.

    AppprototypePHP
  • E-commerce support sandbox where Jev classifies intent, emotion and escalation and blocks risky agent replies before sending.

    AppprototypeTypeScript
  • CLI ticket system where one Jev call answers category, priority, escalation and refund questions and Python routes the ticket.

    AppprototypePython