
Company News
Socket Joins New OpenJS Program to Fund Node.js Security Work
Socket is joining the OpenJS Security Stewardship Program to fund Node.js vulnerability research, maintainer remediation, and security releases.
@monoes/routing
Advanced tools
Semantic task-to-agent routing for Monomind (
@monoes/routingv1.0.3/ Monomind CLIv2.9.0).
Part of the Monomind ecosystem. Handles deterministic keyword filtering, hash-embedding cosine similarity matching, and LLM fallback classification to route user tasks to specialized agent roles.
When a task description is processed, @monoes/routing executes a multi-tier cascade flow (fast deterministic $\rightarrow$ embedding similarity $\rightarrow$ LLM fallback):
Task Description
│
▼
┌───────────────────────────┐
│ Tier 1: Keyword Pre-Filter │ ── Match ──▶ confidence: 1.0 (method: 'keyword')
│ (24 rules, < 1ms) │
└───────────────────────────┘
│ No Match
▼
┌───────────────────────────┐
│ Tier 2: Cosine Centroid │ ── Sim >= 0.5 ──▶ confidence: cosine (method: 'semantic')
│ (256-D MD5/HNSW Vector) │
└───────────────────────────┘
│ Below Threshold
▼
┌───────────────────────────┐
│ Tier 3: LLM Fallback │ ── Classify ──▶ confidence: 0.85 (method: 'llm_fallback')
│ (Claude Haiku / Degraded) │
└───────────────────────────┘
keyword-pre-filter.ts:18-93name, such as Security Engineer.confidence: 1.0 and method: 'keyword'.route-layer.ts:73-106, cosine.ts:5-20LocalEncoder) or transformer embeddings (HNSWEncoder).method: 'semantic'.llm-fallback.ts:20-88, prompts/classify.ts:4-28confidence: 0.85 and method: 'llm_fallback'.method: 'semantic_degraded'.monomind route)The Monomind CLI provides 9 subcommands under monomind route (defined in src/commands/route.ts:80-800):
| Subcommand | Usage | Description | Key Flags |
|---|---|---|---|
task | monomind route task "<prompt>" | Primary CLI entry point. Routes a task prompt to the best agent slug. | --json, --verbose |
semantic | monomind route semantic "<prompt>" | Executes full @monoes/routing embedding + centroid pipeline. | --threshold N, --json |
list-agents | monomind route list-agents | Displays all registered agents, capabilities, and keyword patterns. | --format json |
stats | monomind route stats | Displays routing performance metrics, cache hits, and tier usage breakdown. | --reset |
feedback | monomind route feedback -t "<task>" -a <agent> -r <reward> | Records routing outcome to the local feedback ledger (route-outcomes.jsonl). | -t, -a, -r |
reset | monomind route reset | Resets cached route centroids, outcomes, and feedback data. | --force |
export | monomind route export --out <file> | Exports learned routing centroids and capability index to JSON. | --out |
import | monomind route import --in <file> | Imports routing centroids and rules from external JSON file. | --in, --merge |
coverage / cov | monomind route coverage | Runs benchmark coverage test across sample task prompts. | --min-score N |
Task complexity is dynamically calculated to estimate execution duration, budget allocation, and agent delegation hierarchy:
High (Estimated 2-4 hours): Task description contains 'complex' or 'architecture' OR character length > 200 (hooks-routing.ts:395-400).Low (Estimated 10-30 min): Task description contains 'simple' or 'fix' OR character length < 50.Medium (Estimated 30-60 min): All other standard task prompts.Vitest test suites are located in packages/@monomind/routing/__tests__/:
route-layer.test.ts: Cascade evaluation, thresholds, and fallback behavior.keyword-pre-filter.test.ts: Regex rule precedence and pattern matching.encoder.test.ts: 256-D MD5/SHA-256 local encoding and LRU cache eviction.llm-fallback.test.ts: LLM prompt construction, candidate hint parsing, and error recovery.cosine.test.ts: Validates vector dot product calculation and centroid position aggregation.capability-index.test.ts: Ensures agent capability indexing stays under the 8,000-character context budget.Run unit tests via:
pnpm --filter @monoes/routing test
import { RouteLayer } from '@monoes/routing';
const router = new RouteLayer({
routes: [
{ name: 'coder', agentSlug: 'coder', utterances: ['implement feature', 'build api'], threshold: 0.5 },
{ name: 'tester', agentSlug: 'tester', utterances: ['write unit test', 'add coverage'], threshold: 0.5 },
{ name: 'security', agentSlug: 'Security Engineer', utterances: ['fix cve', 'audit vulnerability'], threshold: 0.5 },
],
enableKeywordFilter: true,
});
await router.initialize();
// Tier 1 Match (<1ms)
const res1 = await router.route('Fix CVE-2024-12345 vulnerability');
// { agentSlug: 'Security Engineer', confidence: 1.0, method: 'keyword' }
// Tier 2 Match (Embedding Centroid)
const res2 = await router.route('Create new REST endpoint for user profiles');
// { agentSlug: 'coder', confidence: 0.82, method: 'semantic' }
Apache-2.0
FAQs
Semantic task-to-agent routing for monomind
The npm package @monoes/routing receives a total of 936 weekly downloads. As such, @monoes/routing popularity was classified as not popular.
We found that @monoes/routing demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.

Company News
Socket is joining the OpenJS Security Stewardship Program to fund Node.js vulnerability research, maintainer remediation, and security releases.

Security News
Two compromised GitHub Actions were re-enabled with malicious tags intact, exposing thousands of downstream repositories to Mini Shai-Hulud.

Research
/Security News
A malicious Firefox extension fetches its payload after installation to evade detection, steal Google session cookies, and automate account takeover.