Skip to page content
SAVRN
Search Plan a project

Open-weight model

AgentWeave-Router-MiniLM

by Saurav Singla sauravsingla08/AgentWeave-Router-MiniLM

AgentWeave-Router-MiniLM is an open-weight model from Saurav Singla, released under Apache License 2.0. Its published files total 12.5 KB.

A lightweight, CPU-first semantic capability router for AgentWeave. It uses sentence-transformers/all-MiniLM-L6-v2 as a frozen embedding encoder and ranks route prototypes with cosine similarity before downstream model inference.

Parameters—
Context—
Weights12.5 KB
Licenseapache-2.0
AccessOpen weights
Monthly Downloads—

Model Card

By Saurav Singla, published under apache-2.0, revision 5a2aee44c106.

A lightweight, CPU-first semantic capability router for AgentWeave. It uses sentence-transformers/all-MiniLM-L6-v2 as a frozen embedding encoder and ranks route prototypes with cosine similarity before downstream model inference. This repository is intentionally small: it publishes the AgentWeave routing configuration, route prototypes, and executable router code while reusing the upstream MiniLM encoder at runtime instead of copying its weights. This Hub repository is a routing artifact, not a derived MiniLM checkpoint. - No MiniLM weights are included in this repository. - No fine-tuning, adapter training, quantization, merge, or weight transformation is claimed.…

Read Saurav Singla's full model card

Route before you reason.

A lightweight, CPU-first semantic capability router for AgentWeave. It uses sentence-transformers/all-MiniLM-L6-v2 as a frozen embedding encoder and ranks route prototypes with cosine similarity before downstream model inference.

This repository is intentionally small: it publishes the AgentWeave routing configuration, route prototypes, and executable router code while reusing the upstream MiniLM encoder at runtime instead of copying its weights.

Artifact type and dependency boundary

This Hub repository is a routing artifact, not a derived MiniLM checkpoint.

  • No MiniLM weights are included in this repository.
  • No fine-tuning, adapter training, quantization, merge, or weight transformation is claimed.
  • sentence-transformers/all-MiniLM-L6-v2 is downloaded separately at runtime and used as a frozen encoder dependency.
  • AgentWeave-specific behavior comes from the route taxonomy, human-readable prototypes, and cosine-ranking logic published here.

For that reason the Hub metadata intentionally does not declare this repository as a base_model derivative or as a standalone SentenceTransformers checkpoint.

Why this exists

Tool-rich agents can expose large action spaces to a language model. AgentWeave explores a complementary systems strategy: reduce the candidate action space before model reasoning. This model repository provides an experimental semantic routing companion to AgentWeave's default deterministic routing path.

Route families

  • research
  • retrieval
  • analysis
  • coding
  • planning
  • verification
  • summarization
  • data_analysis

Architecture

Task / user request
        │
        ▼
all-MiniLM-L6-v2
frozen 384-d encoder
        │
        ├──────────────┐
        ▼              ▼
query vector     route prototypes
        │              │
        └──── cosine ──┘
               │
               ▼
        ranked route set
               │
               ▼
      downstream AgentWeave

No fine-tuning is claimed. This is a prototype-based semantic router built on a frozen MiniLM encoder. Similarity scores are ranking signals, not calibrated probabilities.

Quick start

Clone or download the files in this repository, then run:

pip install -r requirements.txt
python router.py "research the latest protocol changes, verify the sources, and summarize the findings"

Example output shape:

[
  {"route": "research", "score": 0.0},
  {"route": "verification", "score": 0.0},
  {"route": "summarization", "score": 0.0}
]

The numeric values above are placeholders showing the response schema; actual scores are computed locally from MiniLM embeddings.

Python usage

from router import AgentWeaveSemanticRouter

router = AgentWeaveSemanticRouter()
routes = router.route(
    "inspect this code, identify correctness risks, and propose a fix",
    top_k=3,
)
print(routes)

CPU-first design

The router is designed for lightweight local execution:

  • frozen MiniLM encoder
  • no text generation
  • no external inference API required
  • normalized embeddings + cosine ranking
  • small route-prototype file

The first run downloads the upstream MiniLM encoder. Subsequent runs can use the local Hugging Face cache.

Relationship to AgentWeave

AgentWeave's documented default BYOM routing path is deterministic and provider-neutral. This MiniLM router is an experimental semantic companion, not a replacement for the default router and not the source of AgentWeave's published deterministic-router benchmark claims.

Relevance routing also does not grant permission to execute a tool. Policy filtering, scope controls, and authorization remain separate boundaries in AgentWeave.

Files

File Purpose
router.py CPU semantic router implementation
route_prototypes.json Human-readable capability prototypes
config.json Frozen encoder dependency and routing configuration
requirements.txt Minimal runtime dependencies

Intended use

Good fits:

  • pre-inference capability routing
  • agent/tool candidate reduction experiments
  • CPU routing demos
  • semantic route exploration
  • research comparisons with deterministic routing

Not intended as:

  • a calibrated confidence model
  • an authorization engine
  • a safety classifier
  • a standalone MiniLM or SentenceTransformers checkpoint
  • a replacement for downstream function-calling evaluation

Limitations

  • English-focused route prototypes
  • prototype wording influences ranking
  • route scores are cosine similarities, not probabilities
  • the route taxonomy is intentionally compact
  • domain-specific tools may need custom prototypes

Related research artifacts

  • Paper: https://arxiv.org/abs/2608.23078
  • Dataset: https://huggingface.co/datasets/sauravsingla08/AgentWeave-Tool-Routing
  • Interactive Space: https://huggingface.co/spaces/sauravsingla08/AgentWeave
  • Source: https://github.com/sauravsingla/agentweave

License

Apache-2.0. The upstream sentence-transformers/all-MiniLM-L6-v2 model is loaded separately at runtime and remains subject to its own model card and license terms.

Configuration

Model type
agentweave_semantic_router

Identity and Version

Repository
sauravsingla08/AgentWeave-Router-MiniLM
Publisher
Saurav Singla
Task
Not stated by the source
Modality
Other
Library
sentence-transformers
Parameters
Not stated by the source
Languages
en
Revision
5a2aee44c10635866056d99c163b630e923bf084
First published
2026-09-27
Last updated
2026-09-28

Files and Weights

6 files, 12.5 KB in total.

Configuration3 files · 5.3 KB
Documentation1 file · 5.6 KB
Other1 file · 43 B
Repository1 file · 1.5 KB
Every file
FileTypeSizeSHA-256
config.jsonConfiguration443 B —
route_prototypes.jsonConfiguration1.6 KB —
router.pyConfiguration3.3 KB —
README.mdDocumentation5.6 KB —
requirements.txtOther43 B —
.gitattributesRepository1.5 KB —

License and Download

License
apache-2.0
Access
Open weights, no gate
Download from Saurav Singla

Released by Saurav Singla through its official repository on Hugging Face. Read the license.

Built From

  • Described by arXiv:2608.23078
  • Trained on (disclosed) sauravsingla08/AgentWeave-Tool-Routing

Questions About AgentWeave-Router-MiniLM

Can I use AgentWeave-Router-MiniLM commercially?

Yes. AgentWeave-Router-MiniLM is released under Apache License 2.0. The Apache License 2.0 is a permissive open-source license. It permits commercial use, modification and redistribution. It requires keeping the license and copyright notices and any NOTICE file, stating significant changes, and it includes an express patent grant from contributors.