A DECISION PATTERN / CHOICE

Select an Agent Tool with Jev

A useful agent knows which tool to reach for—and when not to reach for one.

The decision boundary

This pattern chooses a tool category from an allowlist. It does not execute the tool or grant permissions. Your application must still validate arguments, enforce authorization, and restrict the resources each tool can access.

Try your own context

Edit the example below. Selecting a preset does not use an allowance; only a successful run does.

Playground v1.13
typesafe/jev-1.13
01 / INPUT
52 / 20,000
A
B
C
D
100 free decisions per day--:--:--
02 / OUTPUT

A little context.
A clear decision.

Give Jev a state and a question.
Your decision, probabilities, and insights
will appear right here.

Ready when you are
START WITH AN EXAMPLE
FROM PLAYGROUND TO PRODUCTION

Take the pattern to
your next build.

Inspect the request shape.
Build with Jev through its official docs.

Visit Jev official docs
AIJEV PLAYGROUND REQUEST SHAPE.
{
  "playground": "https://aijev.net",
  "language": "JavaScript",
  "request": {
    "model": "typesafe/jev-1.13",
    "state": "A user asks: What is the weather in Tokyo right now?",
    "questions": {
      "decision": {
        "type": "choice",
        "instructions": "Which tool should the agent use?",
        "criteria": {
          "Weather API": "Weather API",
          "Web Search": "Web Search",
          "Calculator": "Calculator",
          "No tool": "No tool"
        }
      }
    },
    "provider": {
      "allow_fallbacks": false
    }
  },
  "note": "AIJev Playground request shape only. For application integration, visit https://docs.typesafe.ai."
}
AIJev Playground only Not a public integration API

What to expect

For a request about current Tokyo weather, Weather API is a plausible tool selection. This is an illustrative expectation, not a measured prediction. Run the example to see the real result.

Use it in your application

{
  "playground": "https://aijev.net",
  "language": "JavaScript",
  "request": {
    "model": "typesafe/jev-1.13",
    "state": "A user asks: What is the weather in Tokyo right now?",
    "questions": {
      "decision": {
        "type": "choice",
        "instructions": "Which tool should the agent use?",
        "criteria": {
          "Weather API": "Weather API",
          "Web Search": "Web Search",
          "Calculator": "Calculator",
          "No tool": "No tool"
        }
      }
    },
    "provider": {
      "allow_fallbacks": false
    }
  },
  "note": "AIJev Playground request shape only. For application integration, visit https://docs.typesafe.ai."
}

When this pattern is useful

Use this when the available tools have clear, distinct capabilities. Keep the choice set short and describe the difference between live lookup, general search, calculation, and no-tool responses.

When a human should review

Require review before irreversible or consequential actions such as publishing, purchasing, or deleting. Treat text in the state as untrusted input, and never allow a model’s tool choice to override your application’s permissions.

Frequently asked questions

Does selecting a tool run it?+

No. This example returns a classification only. Execution and authorization belong to your application.

What happens when no option fits?+

Include an explicit fallback option and route uncertain cases for review. A constrained answer set cannot identify a category that was never offered.

Next: Support ticket routing · API integration guide · All examples.