agentleFS
GetStreamGetStream/Agents/.claude/skills/router-detection/SKILL.md

router-detection

Skill8.2k starsChanged 58 days agoApache-2.0View on GitHub

What the detection router can be asked for, what each vendor calls it, and what it refuses to fake. Read before adding a detection option or a detection provider (Moondream, Roboflow, Ultralytics YOLO).

Adopted by

Steady: 0 new projects took it in the last 4 weeks, none the 4 weeks before.thin data

Week of Oct 4: 0 new projectsWeek of Oct 11: 0 new projectsWeek of Oct 18: 0 new projectsWeek of Oct 25: 0 new projectsWeek of Nov 1: 0 new projectsWeek of Nov 8: 0 new projectsWeek of Nov 15: 0 new projectsWeek of Nov 22: 0 new projects
Oct 2026Nov 2026Nov 2026
New projects taking a version of this file each week, over the 8 weeks our latest run read: only 0 in all, so this is a hint, not a trend.

Who's talking about GetStream/Agents

The biggest 5 of 8 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 8

Talked about on GitHub (8 times).

On GitHub · 8

3 more on GitHub

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Every box comes back normalized to 0..1 as x_min, y_min, x_max, y_max, whatever the vendor sent, so a caller never needs the image size to …

    line 19

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Routing detection

The per-modality half of router-interface. The contract is internal/detection, the router is internal/detectionrouter, the providers sit under internal/detection/<vendor>, and they are declared in the detection: section of router.yaml.

Detection is one image in and boxes out, so like search and image generation it is a plain POST /v1/detection with no socket. The router never sees the call's video: a worker (the Python stream.DetectionProcessor) samples frames and sends them one at a time. One request is one stat row with images: 1, priced per_image.

Every box comes back normalized to 0..1 as x_min, y_min, x_max, y_max, whatever the vendor sent, so a caller never needs the image size to draw it.

The vendors, and what each calls the same thing

OptionMoondreamRoboflow modelRoboflow WorkflowUltralytics YOLO
endpointPOST api.moondream.ai/v1/detectPOST serverless.roboflow.com/{project}/{version}POST serverless.roboflow.com/workflows/run or /infer/workflows/{ws}/{id}POST platform.ultralytics.com/api/models/{owner}/{project}/{model}/predict
authX-Moondream-Authapi_key queryapi_key bodyAuthorization: Bearer, optional for public models
imageimage_url data URIbase64 body, form encodedinputs.image {type: base64}multipart file
classesobject, free text, one call per classfilter after the factfilter after the factfilter after the fact
confidencenone, no score returnedconfidenceinside the Workflowconf
boxnormalized x_min..y_maxcentre x, y, width, height in pixelssame as a modelx1..y2, normalized with normalize=true
embeddingsnonenonewhat the Workflow outputs as embeddingsnone

What the table is saying:

  • Only Moondream is open vocabulary. It finds whatever noun it is asked for, so "package" or "a red mug" works. A Roboflow or YOLO model has the classes it was trained on (COCO's 80 for coco/3 and yolo26n), and asking one for a class it does not have finds nothing.
  • Moondream returns no confidence. Its boxes carry confidence: 1, and a request asking for a confidence floor is not routed to it.
  • Embeddings come from a Workflow. roboflow/faces is a built-in Workflow (face detection, dynamic crop, CLIP) whose boxes each carry a 512-dimension vector. CLIP describes how a crop looks, not who it is: it re-identifies the same person in the same light and clothes, and is not face identification.

What the router refuses to fake

The terms a detection model declares in supports::

TermMeaningDeclared by
open_vocabularyclasses may be any words, not only trained labelsMoondream
confidencemin_confidence is honouredRoboflow, Ultralytics
embeddingseach box carries a vectorroboflow/faces, roboflow/workflow

A request that asks for one is only routed to a model that declared it, and a term nothing can serve is a 400 naming it. A fixed-class model asked for "package" would return an empty list that looks like "there is no package", which is the exact failure terms exist to prevent.

Overwrites

options.overwrites carries what the vocabulary has no word for, keyed by provider:

{"overwrites": {"roboflow": {"workspace": "acme", "workflow_id": "doorbell"}}}
  • roboflow/workflow needs workspace and workflow_id (a saved Workflow), or specification (an inline one). It must output predictions, and may output embeddings, one per box.
  • There is no overwrite for an address. Ultralytics' shared API is limited to 20 requests a minute, and a deployment that needs more names a dedicated endpoint in ULTRALYTICS_ENDPOINT. That is the operator's to set, because whatever address it names is sent the key and the frame.

Adding a provider

  1. A package under internal/detection/<vendor> implementing detection.Provider, reading its key from the environment, normalizing boxes, and failing with detection.Fail.
  2. Register it in detectionrouter.DefaultRegistry.
  3. Declare its models in router.yaml with per_image and the terms it really sends.
  4. A unit test against an httptest server for the request it sends and the boxes it reads, and an integration test against the real API.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.