[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7CRADR3ZX7YSN45JKX51B94":3,"skill-same:01M7CRADR3ZX7YSN45JKX51B94":61},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":29,"commitSha":30,"skillDirectory":31,"forksCount":14,"repositoryHtmlUrl":32,"repositoryHomepageUrl":6,"ownerHtmlUrl":33,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":34,"install":35,"resources":48},"01M7CRADR3ZX7YSN45JKX51B94","kev-deploy",null,"Deploy a Kev decision model (the open Jev-style System One model) as the user's own TypeSafe-compatible HTTPS endpoint on Modal with one command, wire it into their code, and take it down. Use when someone wants to host Kev, get a Kev API URL, replace Jev \u002F TypeSafe calls with a self-hosted model, pick a Kev size or GPU, add an API key, keep an endpoint warm, or stop and remove a Kev deployment.","TangledDaunT\u002FLazy_agents","TangledDaunT","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F99529803?v=4","01M7CR9CTGGVS37C2P83M9P98T","Shreyansh Misra","01M7CR9CV6NAV7YT0MHPSYQJFB",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002FTangledDaunT\u002FLazy_agents\u002Fblob\u002Fmaster\u002Fkev\u002Fskills\u002Fkev-deploy\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: kev-deploy\ndescription: Deploy a Kev decision model (the open Jev-style System One model) as the user's own TypeSafe-compatible HTTPS endpoint on Modal with one command, wire it into their code, and take it down. Use when someone wants to host Kev, get a Kev API URL, replace Jev \u002F TypeSafe calls with a self-hosted model, pick a Kev size or GPU, add an API key, keep an endpoint warm, or stop and remove a Kev deployment.\nlicense: Apache-2.0\ncompatibility: Requires Python 3.10+ and a Modal account (`pip install modal && modal setup`, free tier works for the small models). No GPU, no clone of the Kev repo, no Hugging Face account for the public checkpoints.\nmetadata:\n  author: jaredpalmer\n  version: \"1.0\"\n  repository: https:\u002F\u002Fgithub.com\u002Fjaredpalmer\u002Fkev\n---\n\n# Deploy Kev on Modal\n\n`scripts\u002Fkev_serve.py` is a single self-contained Modal app. `modal deploy` on it builds an image with the kev package at\na pinned commit, loads a Kev checkpoint from the Hugging Face Hub on a GPU sized for it, and serves TypeSafe's System One\nprotocol (`POST \u002Fv1\u002Fsystemone`, `GET \u002Fv1\u002Fmodels`) at `https:\u002F\u002F\u003Cworkspace>--kev-api.modal.run`. It scales to zero when idle.\nThe file is short on purpose: if the user's case does not fit, read it and edit it.\n\n## 1. Check the prerequisites\n\n```bash\npython3 -c \"import modal\" 2>\u002Fdev\u002Fnull || pip install modal\nmodal profile current 2>\u002Fdev\u002Fnull || modal setup      # opens a browser to sign in; the user must do this step\nmodal skills install -y                               # optional: Modal's own agent skill + docs (into .agents\u002F, or -g for home)\n```\n\nIf `modal setup` is needed, tell the user and wait; do not try to authenticate for them. `modal skills install` gives you\nModal's official skill and documentation, which helps with anything beyond this file: GPUs, secrets, volumes, logs, billing.\n\n## 2. Pick the model\n\n| `KEV_MODEL` | GPU (automatic; fallbacks in parentheses) | Cold start, measured 2026-09-23 (first ever \u002F weights cached) | Idle cost | When |\n| --- | --- | --- | --- | --- |\n| `jaredpalmer\u002Fkev-0.8b` | L4 (A10G, L40S) | 77 s \u002F 33 s | $0 (scales to zero) | cheapest, prototyping |\n| `jaredpalmer\u002Fkev-4b` (default) | L4 (A10G, L40S) | ~2 min \u002F 52 s | $0 | the default: best quality per dollar |\n| `jaredpalmer\u002Fkev-9b` | A100-80GB (H100) | 128 s \u002F 42 s | $0 | best released accuracy |\n\nA warm container costs the GPU's hourly rate only while it is up (L4 about $0.80\u002Fh, A100-80GB about $2.50\u002Fh); after five\nidle minutes it scales to zero. `KEV_MIN_CONTAINERS=1` keeps one warm (no cold starts, pays the hourly rate all the time).\nAny Kev checkpoint on the Hub works (`you\u002Fkev-4b-support`, `repo@revision`); the GPU is picked by the name's size prefix\n(`kev-4b...` -> L4), anything else gets an H100 unless `KEV_GPU` says otherwise. A private checkpoint needs `HF_TOKEN` at\ndeploy time; the file uploads `HF_TOKEN` as a Modal secret whenever it is set in the shell, so unset it for public ones.\nCheckpoints fine-tuned with the `kev-finetune` skill deploy the same way once published.\n\n## 3. Deploy\n\nAlways set an API key unless the user explicitly wants a public URL; without one, anyone with the URL can spend their\nGPU time.\n\n```bash\ncurl -LO https:\u002F\u002Fraw.githubusercontent.com\u002Fjaredpalmer\u002Fkev\u002Fmain\u002Fskills\u002Fkev-deploy\u002Fscripts\u002Fkev_serve.py   # or use the skill's copy\nexport KEV_API_KEY=$(openssl rand -hex 24)                # save it: it is the endpoint's bearer token\nKEV_MODEL=jaredpalmer\u002Fkev-4b modal deploy kev_serve.py    # prints the URL\n```\n\nSettings are read at deploy time; redeploying with other values replaces the model behind the same URL.\n`KEV_APP_NAME=kev-support` gives a second, independent endpoint (`https:\u002F\u002F\u003Cworkspace>--kev-support-api.modal.run`).\n`KEV_GPU=H100` overrides the GPU.\n\n## 4. Verify\n\nThe first request after a deploy or an idle period waits for the cold start. Modal answers a request that waits longer\nthan 150 s with an HTTP 303 to a result URL, so warm the endpoint with a redirect-following call first:\n\n```bash\ncurl -sL --max-time 900 $KEV_URL\u002Fv1\u002Fmodels -H \"authorization: Bearer $KEV_API_KEY\"   # returns once the model is loaded\n```\n\n```bash\ncurl -s $KEV_URL\u002Fv1\u002Fsystemone -H \"authorization: Bearer $KEV_API_KEY\" -H 'content-type: application\u002Fjson' -d '{\n  \"state\": \"Order 4411 arrived late and the box was crushed. Two charges appear on my card.\", \"model\": \"kev-latest\",\n  \"questions\": {\"team\": {\"type\": \"choice\", \"instructions\": \"Which team should handle this?\",\n                         \"criteria\": {\"returns\": \"Exchanges, refunds\", \"shipping\": \"Delivery, delays\", \"billing\": \"Charges, payments\"}},\n                \"urgent\": {\"type\": \"noul\", \"instructions\": \"Does this need urgent human attention?\"}}}'\ncurl -s $KEV_URL\u002Fv1\u002Fmodels -H \"authorization: Bearer $KEV_API_KEY\"       # served checkpoint, base, temperature\n```\n\nExpect per-question `probabilities` (calibrated by the checkpoint's own temperature), `choice` \u002F `noul` \u002F `score`,\n`latency_ms` (about 80-150 ms warm on an L4 for a short state). A request without the key must return 401.\n\n## 5. Wire it in\n\nThe protocol is TypeSafe's, so only the base URL and key change:\n\n```python\nclient = TypeSafeClient(api_key=KEV_API_KEY, base_url=KEV_URL, model=\"kev-latest\")   # was: TypeSafeClient(api_key=TYPESAFE_KEY)\n```\n\n```ts\nconst r = await fetch(`${KEV_URL}\u002Fv1\u002Fsystemone`, { method: \"POST\",\n  headers: { \"content-type\": \"application\u002Fjson\", authorization: `Bearer ${KEV_API_KEY}` },\n  body: JSON.stringify({ state, model: \"kev-latest\", questions }) });   \u002F\u002F question type \"noul\", not \"boolean\"\n```\n\nKev answers typed questions about a state (Choice over named options, Noul yes\u002Fno, Score over ordered levels) without\ngenerating text. It was trained on public classification, policy and rule data; on the user's own domain, measure it on a\nfew hundred labelled examples before relying on it, and if it falls short, fine-tune it with the `kev-finetune` skill.\n\n## 6. Take it down\n\n```bash\nmodal app stop kev            # or the KEV_APP_NAME used; the URL stops working immediately\nmodal volume delete kev-hf-cache   # optional: the cached weights (shared with kev-finetune; next deploy re-downloads)\n```\n\n## Troubleshooting\n\n- **First request returns nothing or a 303**: the cold start is still running (weights download on the very first start,\n  or Modal is still finding a GPU; `modal app logs kev` says \"waiting to be scheduled\"). Follow redirects (`curl -L`), use a\n  longer client timeout, or deploy with `KEV_MIN_CONTAINERS=1`.\n- **CUDA out of memory on start**: the GPU is too small for that checkpoint; use the table above or `KEV_GPU=H100`.\n- **401 with the right key**: the key is fixed at deploy time; redeploy with the same `KEV_API_KEY` exported.\n- **Logs**: `modal app logs kev` shows the load line (`serving \u003Cmodel> on \u003CGPU> ... ready in Ns`) and every request.\n","# Deploy Kev on Modal\n\n`scripts\u002Fkev_serve.py` is a single self-contained Modal app. `modal deploy` on it builds an image with the kev package at\na pinned commit, loads a Kev checkpoint from the Hugging Face Hub on a GPU sized for it, and serves TypeSafe's System One\nprotocol (`POST \u002Fv1\u002Fsystemone`, `GET \u002Fv1\u002Fmodels`) at `https:\u002F\u002F\u003Cworkspace>--kev-api.modal.run`. It scales to zero when idle.\nThe file is short on purpose: if the user's case does not fit, read it and edit it.\n\n## 1. Check the prerequisites\n\n```bash\npython3 -c \"import modal\" 2>\u002Fdev\u002Fnull || pip install modal\nmodal profile current 2>\u002Fdev\u002Fnull || modal setup      # opens a browser to sign in; the user must do this step\nmodal skills install -y                               # optional: Modal's own agent skill + docs (into .agents\u002F, or -g for home)\n```\n\nIf `modal setup` is needed, tell the user and wait; do not try to authenticate for them. `modal skills install` gives you\nModal's official skill and documentation, which helps with anything beyond this file: GPUs, secrets, volumes, logs, billing.\n\n## 2. Pick the model\n\n| `KEV_MODEL` | GPU (automatic; fallbacks in parentheses) | Cold start, measured 2026-09-23 (first ever \u002F weights cached) | Idle cost | When |\n| --- | --- | --- | --- | --- |\n| `jaredpalmer\u002Fkev-0.8b` | L4 (A10G, L40S) | 77 s \u002F 33 s | $0 (scales to zero) | cheapest, prototyping |\n| `jaredpalmer\u002Fkev-4b` (default) | L4 (A10G, L40S) | ~2 min \u002F 52 s | $0 | the default: best quality per dollar |\n| `jaredpalmer\u002Fkev-9b` | A100-80GB (H100) | 128 s \u002F 42 s | $0 | best released accuracy |\n\nA warm container costs the GPU's hourly rate only while it is up (L4 about $0.80\u002Fh, A100-80GB about $2.50\u002Fh); after five\nidle minutes it scales to zero. `KEV_MIN_CONTAINERS=1` keeps one warm (no cold starts, pays the hourly rate all the time).\nAny Kev checkpoint on the Hub works (`you\u002Fkev-4b-support`, `repo@revision`); the GPU is picked by the name's size prefix\n(`kev-4b...` -> L4), anything else gets an H100 unless `KEV_GPU` says otherwise. A private checkpoint needs `HF_TOKEN` at\ndeploy time; the file uploads `HF_TOKEN` as a Modal secret whenever it is set in the shell, so unset it for public ones.\nCheckpoints fine-tuned with the `kev-finetune` skill deploy the same way once published.\n\n## 3. Deploy\n\nAlways set an API key unless the user explicitly wants a public URL; without one, anyone with the URL can spend their\nGPU time.\n\n```bash\ncurl -LO https:\u002F\u002Fraw.githubusercontent.com\u002Fjaredpalmer\u002Fkev\u002Fmain\u002Fskills\u002Fkev-deploy\u002Fscripts\u002Fkev_serve.py   # or use the skill's copy\nexport KEV_API_KEY=$(openssl rand -hex 24)                # save it: it is the endpoint's bearer token\nKEV_MODEL=jaredpalmer\u002Fkev-4b modal deploy kev_serve.py    # prints the URL\n```\n\nSettings are read at deploy time; redeploying with other values replaces the model behind the same URL.\n`KEV_APP_NAME=kev-support` gives a second, independent endpoint (`https:\u002F\u002F\u003Cworkspace>--kev-support-api.modal.run`).\n`KEV_GPU=H100` overrides the GPU.\n\n## 4. Verify\n\nThe first request after a deploy or an idle period waits for the cold start. Modal answers a request that waits longer\nthan 150 s with an HTTP 303 to a result URL, so warm the endpoint with a redirect-following call first:\n\n```bash\ncurl -sL --max-time 900 $KEV_URL\u002Fv1\u002Fmodels -H \"authorization: Bearer $KEV_API_KEY\"   # returns once the model is loaded\n```\n\n```bash\ncurl -s $KEV_URL\u002Fv1\u002Fsystemone -H \"authorization: Bearer $KEV_API_KEY\" -H 'content-type: application\u002Fjson' -d '{\n  \"state\": \"Order 4411 arrived late and the box was crushed. Two charges appear on my card.\", \"model\": \"kev-latest\",\n  \"questions\": {\"team\": {\"type\": \"choice\", \"instructions\": \"Which team should handle this?\",\n                         \"criteria\": {\"returns\": \"Exchanges, refunds\", \"shipping\": \"Delivery, delays\", \"billing\": \"Charges, payments\"}},\n                \"urgent\": {\"type\": \"noul\", \"instructions\": \"Does this need urgent human attention?\"}}}'\ncurl -s $KEV_URL\u002Fv1\u002Fmodels -H \"authorization: Bearer $KEV_API_KEY\"       # served checkpoint, base, temperature\n```\n\nExpect per-question `probabilities` (calibrated by the checkpoint's own temperature), `choice` \u002F `noul` \u002F `score`,\n`latency_ms` (about 80-150 ms warm on an L4 for a short state). A request without the key must return 401.\n\n## 5. Wire it in\n\nThe protocol is TypeSafe's, so only the base URL and key change:\n\n```python\nclient = TypeSafeClient(api_key=KEV_API_KEY, base_url=KEV_URL, model=\"kev-latest\")   # was: TypeSafeClient(api_key=TYPESAFE_KEY)\n```\n\n```ts\nconst r = await fetch(`${KEV_URL}\u002Fv1\u002Fsystemone`, { method: \"POST\",\n  headers: { \"content-type\": \"application\u002Fjson\", authorization: `Bearer ${KEV_API_KEY}` },\n  body: JSON.stringify({ state, model: \"kev-latest\", questions }) });   \u002F\u002F question type \"noul\", not \"boolean\"\n```\n\nKev answers typed questions about a state (Choice over named options, Noul yes\u002Fno, Score over ordered levels) without\ngenerating text. It was trained on public classification, policy and rule data; on the user's own domain, measure it on a\nfew hundred labelled examples before relying on it, and if it falls short, fine-tune it with the `kev-finetune` skill.\n\n## 6. Take it down\n\n```bash\nmodal app stop kev            # or the KEV_APP_NAME used; the URL stops working immediately\nmodal volume delete kev-hf-cache   # optional: the cached weights (shared with kev-finetune; next deploy re-downloads)\n```\n\n## Troubleshooting\n\n- **First request returns nothing or a 303**: the cold start is still running (weights download on the very first start,\n  or Modal is still finding a GPU; `modal app logs kev` says \"waiting to be scheduled\"). Follow redirects (`curl -L`), use a\n  longer client timeout, or deploy with `KEV_MIN_CONTAINERS=1`.\n- **CUDA out of memory on start**: the GPU is too small for that checkpoint; use the table above or `KEV_GPU=H100`.\n- **401 with the right key**: the key is fixed at deploy time; redeploy with the same `KEV_API_KEY` exported.\n- **Logs**: `modal app logs kev` shows the load line (`serving \u003Cmodel> on \u003CGPU> ... ready in Ns`) and every request.\n",{"name":5,"license":15,"metadata":24,"description":7,"compatibility":28},{"author":25,"version":26,"repository":27},"jaredpalmer","1.0","https:\u002F\u002Fgithub.com\u002Fjaredpalmer\u002Fkev","Requires Python 3.10+ and a Modal account (`pip install modal && modal setup`, free tier works for the small models). No GPU, no clone of the Kev repo, no Hugging Face account for the public checkpoints.","master","beaf58e02c5f2f8ebd746832e5974736577e6c27","kev\u002Fskills\u002Fkev-deploy","https:\u002F\u002Fgithub.com\u002FTangledDaunT\u002FLazy_agents","https:\u002F\u002Fgithub.com\u002FTangledDaunT","2026-10-05 16:00:19",{"source":8,"skillName":5,"commands":36,"prompt":46,"zipAvailable":47},[37,40,43],{"tool":38,"command":39},"npx","npx skills add TangledDaunT\u002FLazy_agents --skill kev-deploy",{"tool":41,"command":42},"bunx","bunx skills add TangledDaunT\u002FLazy_agents --skill kev-deploy",{"tool":44,"command":45},"pnpm","pnpm dlx skills add TangledDaunT\u002FLazy_agents --skill kev-deploy","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FTangledDaunT\u002FLazy_agents\u002Fblob\u002Fmaster\u002Fkev\u002Fskills\u002Fkev-deploy\u002FSKILL.md",true,[49,55],{"path":50,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":53,"sourceHtmlUrl":54},"README.md","REFERENCE","参考文档",1383,"https:\u002F\u002Fgithub.com\u002FTangledDaunT\u002FLazy_agents\u002Fblob\u002Fmaster\u002Fkev\u002Fskills\u002Fkev-deploy\u002FREADME.md",{"path":56,"resourceType":57,"resourceTypeDesc":58,"sizeBytes":59,"sourceHtmlUrl":60},"scripts\u002Fkev_serve.py","SCRIPT","脚本",5597,"https:\u002F\u002Fgithub.com\u002FTangledDaunT\u002FLazy_agents\u002Fblob\u002Fmaster\u002Fkev\u002Fskills\u002Fkev-deploy\u002Fscripts\u002Fkev_serve.py",[62],{"skillNo":63,"name":64,"nameZh":6,"description":65,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":66,"categories":67,"keywords":68,"publishedAt":19},"01M7CRAJN9KGJXB6Q1JPW7CR2D","kev-finetune","Fine-tune a Kev decision model (open Jev-style System One model) on a user's own workload and serve it with calibrated probabilities. Interviews the user, finds existing Jev\u002FTypeSafe questions or labelled data in their codebase, generates enough synthetic training data to measure a gain, trains and calibrates on Modal, scores against the released checkpoint, deploys a TypeSafe-compatible endpoint, and tears everything down. Use when someone wants noul\u002Fchoice\u002Fscore questions answered on their own domain (routing, triage, moderation, classification, scoring), wants calibrated confidence for automation thresholds, mentions Jev, TypeSafe, System One or Kev, or asks to fine-tune, evaluate, deploy or clean up Kev.","https:\u002F\u002Fgithub.com\u002FTangledDaunT\u002FLazy_agents\u002Fblob\u002Fmaster\u002Fkev\u002Fskills\u002Fkev-finetune\u002FSKILL.md",[],[]]