Back to Learn Jev
Starter project 07 · Agent loops

Skill caddy

Pick the one capability a coding agent needs now instead of loading every tool into context.

Time
60–90 min
Level
Agent routing
Shape
Task + capability list → bounded choice → one safe tool or none
You’ll practice
Dynamic choices · Tool routing · Abstention

The agent prompt

Copy this brief into your coding agent from the root of the project you want to build in. It names the behaviour, the constraints, and the checks to run — the decisions Jev makes stay explicit so you can see what the model actually decided.

Build a "Skill caddy" prototype in this repository using Jev from TypeSafe AI.

Inspect the existing stack first. Use the official TypeSafe skill to implement current SDK patterns; install it with npx skills add typesafe-ai/skills --skill typesafe-ai if it is not available.

The tool receives a user task and a small JSON manifest of available agent capabilities. Build a dynamic Choice question whose options are stable capability IDs and whose criteria come from concise descriptions. Include an explicit none option. Show the selected capability, probabilities, and confidence, then render the exact context snippet that would be handed to an agent. Do not actually invoke tools in this version.

Requirements:
- Validate and cap the manifest; reject duplicate IDs and untrusted executable content.
- Keep TYPESAFE_API_KEY server-side.
- Fail closed: low confidence, none, or API failure means inject no capability.
- Separate selection, policy, and rendering into testable modules.
- Add fixtures for clear, ambiguous, adversarial, and irrelevant tasks.
- Measure the approximate characters kept versus the full manifest.
- Document setup, limitations, and the path to a real agent integration.

Run all checks and summarize the routing contract and changed files.

Built something like this

Community projects in the directory that solve a similar problem: