From 5072b82e93a6f3c5f40234f1238b0cc732ea76e0 Mon Sep 17 00:00:00 2001 From: diegosouzapw Date: Fri, 15 May 2026 03:53:22 -0300 Subject: [PATCH] feat(skills): add 3 operational SKILL.md manifests + AI Skills dashboard tab - skills/omniroute-routing/SKILL.md: combos, 14 strategies, Auto-combo, simulate routing, MCP tools for routing - skills/omniroute-compression/SKILL.md: RTK, Caveman, stacked mode, MCP accessibility filter, language packs - skills/omniroute-monitoring/SKILL.md: health, circuit breakers, p50/p95/p99 metrics, quota, budget guard, MCP audit - src/shared/constants/agentSkills.ts: single source of truth for all 13 external agent skills (equivalent of 9route skills.js, adapted) - dashboard/skills/page.tsx: new "AI Skills" tab with copy-button UX, GitHub link, NEW badge for 3 new skills - skills/omniroute/SKILL.md + README.md: updated index with 13 skills (was 10); 5 skills exclusive to OmniRoute highlighted --- skills/README.md | 38 +++-- skills/omniroute-compression/SKILL.md | 131 ++++++++++++++++ skills/omniroute-monitoring/SKILL.md | 114 ++++++++++++++ skills/omniroute-routing/SKILL.md | 129 +++++++++++++++ skills/omniroute/SKILL.md | 25 +-- src/app/(dashboard)/dashboard/skills/page.tsx | 147 +++++++++++++++++- src/shared/constants/agentSkills.ts | 133 ++++++++++++++++ 7 files changed, 687 insertions(+), 30 deletions(-) create mode 100644 skills/omniroute-compression/SKILL.md create mode 100644 skills/omniroute-monitoring/SKILL.md create mode 100644 skills/omniroute-routing/SKILL.md create mode 100644 src/shared/constants/agentSkills.ts diff --git a/skills/README.md b/skills/README.md index 793b6fe8ba..7553d37de4 100644 --- a/skills/README.md +++ b/skills/README.md @@ -15,18 +15,21 @@ through `$OMNIROUTE_URL/v1/...` with `Authorization: Bearer $OMNIROUTE_KEY`. ## Skills index -| Capability | Manifest | -| ------------------------ | -------------------------------------------------------------- | -| Entry point + setup | [omniroute/SKILL.md](omniroute/SKILL.md) | -| Chat / code-gen | [omniroute-chat/SKILL.md](omniroute-chat/SKILL.md) | -| Image generation | [omniroute-image/SKILL.md](omniroute-image/SKILL.md) | -| Text-to-speech | [omniroute-tts/SKILL.md](omniroute-tts/SKILL.md) | -| Speech-to-text | [omniroute-stt/SKILL.md](omniroute-stt/SKILL.md) | -| Embeddings | [omniroute-embeddings/SKILL.md](omniroute-embeddings/SKILL.md) | -| Web search | [omniroute-web-search/SKILL.md](omniroute-web-search/SKILL.md) | -| Web fetch (URL→markdown) | [omniroute-web-fetch/SKILL.md](omniroute-web-fetch/SKILL.md) | -| MCP server | [omniroute-mcp/SKILL.md](omniroute-mcp/SKILL.md) | -| A2A protocol | [omniroute-a2a/SKILL.md](omniroute-a2a/SKILL.md) | +| Capability | Manifest | +| ------------------------ | ---------------------------------------------------------------- | +| Entry point + setup | [omniroute/SKILL.md](omniroute/SKILL.md) | +| Chat / code-gen | [omniroute-chat/SKILL.md](omniroute-chat/SKILL.md) | +| Image generation | [omniroute-image/SKILL.md](omniroute-image/SKILL.md) | +| Text-to-speech | [omniroute-tts/SKILL.md](omniroute-tts/SKILL.md) | +| Speech-to-text | [omniroute-stt/SKILL.md](omniroute-stt/SKILL.md) | +| Embeddings | [omniroute-embeddings/SKILL.md](omniroute-embeddings/SKILL.md) | +| Web search | [omniroute-web-search/SKILL.md](omniroute-web-search/SKILL.md) | +| Web fetch (URL→markdown) | [omniroute-web-fetch/SKILL.md](omniroute-web-fetch/SKILL.md) | +| MCP server (37 tools) | [omniroute-mcp/SKILL.md](omniroute-mcp/SKILL.md) | +| A2A protocol | [omniroute-a2a/SKILL.md](omniroute-a2a/SKILL.md) | +| Routing & combos | [omniroute-routing/SKILL.md](omniroute-routing/SKILL.md) | +| Token compression | [omniroute-compression/SKILL.md](omniroute-compression/SKILL.md) | +| Monitoring & health | [omniroute-monitoring/SKILL.md](omniroute-monitoring/SKILL.md) | ## Format @@ -34,9 +37,12 @@ Each `SKILL.md` follows the Anthropic skill manifest spec with YAML frontmatter (`name`, `description`) and a self-contained markdown body: setup, endpoints, examples, and error codes. Assume the reader is an agent with no prior context. -## Additional skills +## Skills exclusive to OmniRoute -OmniRoute includes two protocol-level skills not found in other routers: +These 5 skills have no equivalent in other AI routers: -- `omniroute-mcp` — exposes 37 MCP tools (memory, skills, providers, routing) over SSE/stdio/HTTP -- `omniroute-a2a` — exposes 5 A2A skills (smart-routing, quota, discovery, cost, health) +- `omniroute-mcp` — 37 MCP tools (memory, skills, providers, routing, compression) over SSE/stdio/HTTP +- `omniroute-a2a` — 5 A2A skills (smart-routing, quota, discovery, cost, health) via JSON-RPC 2.0 +- `omniroute-routing` — create/configure combos, 14 strategies, Auto-combo scoring, fallback chains +- `omniroute-compression` — RTK + Caveman + stacked mode + MCP accessibility filter (60–90% token savings) +- `omniroute-monitoring` — circuit breakers, p50/p95/p99 latency, budget guard, MCP audit log diff --git a/skills/omniroute-compression/SKILL.md b/skills/omniroute-compression/SKILL.md new file mode 100644 index 0000000000..fd670ead69 --- /dev/null +++ b/skills/omniroute-compression/SKILL.md @@ -0,0 +1,131 @@ +--- +name: omniroute-compression +description: Configure OmniRoute token compression to save 60–90% of context tokens. Covers RTK (command/tool output), Caveman (prose), stacked mode (both), and the MCP accessibility-tree filter (browser snapshots). Use when the user wants to reduce costs, fit long sessions into context windows, or speed up AI responses. +--- + +# OmniRoute — Compression + +Requires `OMNIROUTE_URL` and `OMNIROUTE_KEY`. See [entry-point SKILL](https://raw.githubusercontent.com/diegosouzapw/OmniRoute/main/skills/omniroute/SKILL.md) for setup. + +## Overview + +OmniRoute compresses token payloads before forwarding to providers. No code changes required — set it once, it applies to all requests transparently. + +| Engine | Best for | Typical savings | +| ------------------------- | ------------------------------------ | --------------- | +| RTK | Terminal / build / test / git output | 60–90% | +| Caveman | Human prose, chat history | 46% input | +| Stacked (`rtk → caveman`) | Mixed coding sessions | 78–95% | +| MCP accessibility filter | Browser/accessibility tool results | 60–80% | + +## Get current settings + +```bash +curl $OMNIROUTE_URL/api/settings/compression \ + -H "Authorization: Bearer $OMNIROUTE_KEY" +``` + +## Enable RTK (best for coding agents) + +```bash +curl -X PUT $OMNIROUTE_URL/api/settings/compression \ + -H "Authorization: Bearer $OMNIROUTE_KEY" \ + -H "Content-Type: application/json" \ + -d '{ "mode": "rtk", "enabled": true }' +``` + +## Enable stacked mode (maximum savings) + +```bash +curl -X PUT $OMNIROUTE_URL/api/settings/compression \ + -H "Authorization: Bearer $OMNIROUTE_KEY" \ + -H "Content-Type: application/json" \ + -d '{ + "mode": "stacked", + "enabled": true, + "stackedPipeline": ["rtk", "caveman"] + }' +``` + +## Enable Caveman (prose / chat) + +```bash +curl -X PUT $OMNIROUTE_URL/api/settings/compression \ + -H "Authorization: Bearer $OMNIROUTE_KEY" \ + -H "Content-Type: application/json" \ + -d '{ "mode": "standard", "enabled": true }' +``` + +Caveman intensities: `lite` (safe), `standard` (balanced), `aggressive` (long sessions), `ultra` (context recovery). + +## Preview compression before enabling + +```bash +curl -X POST $OMNIROUTE_URL/api/compression/preview \ + -H "Authorization: Bearer $OMNIROUTE_KEY" \ + -H "Content-Type: application/json" \ + -d '{ + "mode": "rtk", + "text": "$ npm test\n> jest\n\nPASS src/a.test.ts (2.1s)\nPASS src/b.test.ts (1.8s)\n..." + }' +``` + +Response includes `compressed`, `original_length`, `compressed_length`, `savings_pct`. + +## MCP accessibility-tree filter (browser agent use) + +When OmniRoute is used with browser/Playwright MCP tools, it automatically compresses verbose accessibility-tree tool results. Enabled by default; configure thresholds: + +```bash +curl -X PUT $OMNIROUTE_URL/api/settings/compression \ + -H "Authorization: Bearer $OMNIROUTE_KEY" \ + -H "Content-Type: application/json" \ + -d '{ + "mcpAccessibility": { + "enabled": true, + "collapseThreshold": 30, + "maxTextChars": 50000 + } + }' +``` + +`collapseThreshold`: collapse sibling lines when ≥ N repeats (default 30). +`maxTextChars`: hard truncate after N chars with navigation hint (default 50000). + +## Language packs (Caveman) + +Caveman supports language-aware rules for pt-BR, es, de, fr, ja: + +```bash +curl -X PUT $OMNIROUTE_URL/api/settings/compression \ + -H "Authorization: Bearer $OMNIROUTE_KEY" \ + -H "Content-Type: application/json" \ + -d '{ + "mode": "standard", + "cavemanConfig": { + "language": "pt-BR", + "autoDetectLanguage": true + } + }' +``` + +## Via MCP + +``` +omniroute_compression_status → current settings + savings analytics +omniroute_compression_configure → update mode/threshold/language +omniroute_set_compression_engine → switch engine at runtime +``` + +## Disable compression + +```bash +curl -X PUT $OMNIROUTE_URL/api/settings/compression \ + -H "Authorization: Bearer $OMNIROUTE_KEY" \ + -d '{ "enabled": false }' +``` + +## Errors + +- `400 invalid mode` → use `off`, `lite`, `standard`, `aggressive`, `ultra`, `rtk`, or `stacked` +- `400 invalid stackedPipeline` → array must contain valid engine ids (`rtk`, `caveman`) diff --git a/skills/omniroute-monitoring/SKILL.md b/skills/omniroute-monitoring/SKILL.md new file mode 100644 index 0000000000..f2f0b23c08 --- /dev/null +++ b/skills/omniroute-monitoring/SKILL.md @@ -0,0 +1,114 @@ +--- +name: omniroute-monitoring +description: Monitor OmniRoute system health, provider circuit breakers, per-provider latency (p50/p95/p99), quota usage, and set budget guards. Use when the user wants to check if the system is healthy, debug slow providers, manage spend limits, or set up oncall-style monitoring. +--- + +# OmniRoute — Monitoring & Health + +Requires `OMNIROUTE_URL` and `OMNIROUTE_KEY`. See [entry-point SKILL](https://raw.githubusercontent.com/diegosouzapw/OmniRoute/main/skills/omniroute/SKILL.md) for setup. + +## System health + +```bash +curl $OMNIROUTE_URL/api/health \ + -H "Authorization: Bearer $OMNIROUTE_KEY" +``` + +Returns: uptime, memory, active connections, circuit breaker states, rate limit status, cache stats. + +Unauthenticated quick check: + +```bash +curl $OMNIROUTE_URL/api/health +# → {"ok":true} +``` + +## Provider circuit breakers + +Circuit breakers prevent traffic from hitting failing providers. + +States: `CLOSED` (normal), `OPEN` (blocked), `HALF_OPEN` (probe mode — auto-recovers). + +```bash +curl $OMNIROUTE_URL/api/monitoring/health \ + -H "Authorization: Bearer $OMNIROUTE_KEY" +``` + +Response includes `circuitBreakers` array with per-provider state and `resetAt` timestamp. + +## Per-provider metrics (p50/p95/p99) + +```bash +curl $OMNIROUTE_URL/api/providers/metrics \ + -H "Authorization: Bearer $OMNIROUTE_KEY" +``` + +Response shape per provider: + +```json +{ + "provider": "anthropic", + "requests": 1247, + "successRate": 0.994, + "latency": { "p50": 820, "p95": 2100, "p99": 3800 }, + "circuitState": "CLOSED", + "tokensUsed": 2847000 +} +``` + +## Via MCP (if OmniRoute is your MCP server) + +``` +omniroute_get_health → full system health snapshot +omniroute_get_provider_metrics → p50/p95/p99 + circuit state per provider +omniroute_get_session_snapshot → cost, tokens, errors for current session +omniroute_check_quota → quota balance + percent remaining + reset time +omniroute_db_health_check → diagnose + auto-repair database drift +``` + +## Quota check + +```bash +curl $OMNIROUTE_URL/api/quota \ + -H "Authorization: Bearer $OMNIROUTE_KEY" +``` + +Returns used/total tokens and requests per provider/account, with `resetAt` timestamps. + +## Budget guard (spend limit) + +Set a session spending limit that degrades or blocks requests when hit: + +```bash +curl -X POST $OMNIROUTE_URL/api/budget/guard \ + -H "Authorization: Bearer $OMNIROUTE_KEY" \ + -H "Content-Type: application/json" \ + -d '{ + "limitUsd": 5.00, + "action": "degrade", + "degradeTo": "openai/gpt-4o-mini" + }' +``` + +`action` options: + +- `degrade` — switch to a cheaper model when limit is hit +- `block` — return 429 when limit is hit +- `alert` — continue but add `X-Budget-Warning` header + +## MCP audit log + +OmniRoute logs every MCP tool call to `mcp_audit` table. Query via API: + +```bash +curl "$OMNIROUTE_URL/api/mcp/status" \ + -H "Authorization: Bearer $OMNIROUTE_KEY" +``` + +Returns: server status, heartbeat, recent audit activity summary. + +## Errors + +- `503` on health endpoint → OmniRoute is starting up; retry in 5s +- Circuit breaker `OPEN` → provider is temporarily blocked; check `resetAt` to know when it auto-recovers +- `429 budget_exceeded` → budget guard limit reached; raise limit or wait for reset diff --git a/skills/omniroute-routing/SKILL.md b/skills/omniroute-routing/SKILL.md new file mode 100644 index 0000000000..d0a90de766 --- /dev/null +++ b/skills/omniroute-routing/SKILL.md @@ -0,0 +1,129 @@ +--- +name: omniroute-routing +description: Create and configure OmniRoute routing combos, choose from 14 strategies (priority, weighted, auto, round-robin, cost-optimized, etc.), activate Auto-combo 9-factor scoring, and set up fallback chains. Use when the user wants to configure multi-provider routing, load balancing, or cost-optimized model selection. +--- + +# OmniRoute — Routing & Combos + +Requires `OMNIROUTE_URL` and `OMNIROUTE_KEY`. See [entry-point SKILL](https://raw.githubusercontent.com/diegosouzapw/OmniRoute/main/skills/omniroute/SKILL.md) for setup. + +## What is a combo? + +A combo is a named group of providers/models with a routing strategy. All requests through a combo are automatically distributed, failed-over, and load-balanced — the caller uses a single model ID like `my-combo`. + +## List existing combos + +```bash +curl $OMNIROUTE_URL/api/combos \ + -H "Authorization: Bearer $OMNIROUTE_KEY" +``` + +Response includes `id`, `name`, `strategy`, `enabled`, and per-target stats. + +## Create a combo + +```bash +curl -X POST $OMNIROUTE_URL/api/combos \ + -H "Authorization: Bearer $OMNIROUTE_KEY" \ + -H "Content-Type: application/json" \ + -d '{ + "name": "my-combo", + "strategy": "priority", + "targets": [ + { "provider": "anthropic", "model": "claude-opus-4-7", "weight": 1 }, + { "provider": "openai", "model": "gpt-4o", "weight": 1 } + ] + }' +``` + +## 14 routing strategies + +| Strategy | Description | +| ------------------- | -------------------------------------------------- | +| `priority` | Always use target[0]; fall back on error | +| `weighted` | Distribute by weight percentage | +| `round-robin` | Rotate targets in order | +| `fill-first` | Fill quota of target[0] before spilling | +| `least-used` | Route to target with fewest active requests | +| `cost-optimized` | Pick cheapest target for the token estimate | +| `auto` | 9-factor scoring: cost + latency + quota + circuit | +| `random` | Uniform random selection | +| `strict-random` | Random without repeating until all used | +| `p2c` | Power-of-2-choices: sample 2, pick better | +| `reset-aware` | Prefer targets near quota reset time | +| `lkgp` | Last-known-good-provider sticky routing | +| `context-optimized` | Pick best model for context length | +| `context-relay` | Chain models for very long contexts | + +## Auto-combo (recommended for production) + +Auto-combo scores each candidate on 9 factors every request: + +```bash +curl -X POST $OMNIROUTE_URL/api/combos \ + -H "Authorization: Bearer $OMNIROUTE_KEY" \ + -H "Content-Type: application/json" \ + -d '{ + "name": "prod-auto", + "strategy": "auto", + "targets": [ + { "provider": "anthropic", "model": "claude-sonnet-4-6" }, + { "provider": "openai", "model": "gpt-4o-mini" }, + { "provider": "google", "model": "gemini-2.0-flash" } + ] + }' +``` + +Then call it with: + +```bash +curl -X POST $OMNIROUTE_URL/v1/chat/completions \ + -H "Authorization: Bearer $OMNIROUTE_KEY" \ + -H "Content-Type: application/json" \ + -d '{ "model": "prod-auto", "messages": [{ "role": "user", "content": "Hello" }] }' +``` + +## Activate / deactivate a combo + +```bash +# Activate +curl -X PUT $OMNIROUTE_URL/api/combos/{id}/toggle \ + -H "Authorization: Bearer $OMNIROUTE_KEY" \ + -d '{ "enabled": true }' +``` + +## Get combo metrics + +```bash +curl $OMNIROUTE_URL/api/combos/{id}/metrics \ + -H "Authorization: Bearer $OMNIROUTE_KEY" +``` + +Returns p50/p95/p99 latency, success rate, cost, and per-target breakdown. + +## Simulate routing (dry run) + +```bash +curl -X POST $OMNIROUTE_URL/api/routing/simulate \ + -H "Authorization: Bearer $OMNIROUTE_KEY" \ + -H "Content-Type: application/json" \ + -d '{ "comboId": "{id}", "messages": [{ "role": "user", "content": "test" }] }' +``` + +Returns which provider would be selected and why — no actual API call is made. + +## Via MCP (if OmniRoute is your MCP server) + +``` +omniroute_list_combos → list all combos +omniroute_switch_combo → enable/disable a combo +omniroute_set_routing_strategy → change strategy at runtime +omniroute_simulate_route → dry-run routing decision +omniroute_best_combo_for_task → get recommendation by task type +``` + +## Errors + +- `404 combo not found` → check `id` from `/api/combos` +- `400 invalid strategy` → use one of the 14 strategies above +- `409 name conflict` → combo name already exists diff --git a/skills/omniroute/SKILL.md b/skills/omniroute/SKILL.md index b38887251f..459a0e7c52 100644 --- a/skills/omniroute/SKILL.md +++ b/skills/omniroute/SKILL.md @@ -34,17 +34,20 @@ Use `data[].id` as `model` field in requests. Combos appear with `owned_by:"comb ## Capability skills -| Capability | Raw URL | -| ---------------- | -------------------------------------------------------------------------------------------------- | -| Chat / code-gen | https://raw.githubusercontent.com/diegosouzapw/OmniRoute/main/skills/omniroute-chat/SKILL.md | -| Image generation | https://raw.githubusercontent.com/diegosouzapw/OmniRoute/main/skills/omniroute-image/SKILL.md | -| Text-to-speech | https://raw.githubusercontent.com/diegosouzapw/OmniRoute/main/skills/omniroute-tts/SKILL.md | -| Speech-to-text | https://raw.githubusercontent.com/diegosouzapw/OmniRoute/main/skills/omniroute-stt/SKILL.md | -| Embeddings | https://raw.githubusercontent.com/diegosouzapw/OmniRoute/main/skills/omniroute-embeddings/SKILL.md | -| Web search | https://raw.githubusercontent.com/diegosouzapw/OmniRoute/main/skills/omniroute-web-search/SKILL.md | -| Web fetch | https://raw.githubusercontent.com/diegosouzapw/OmniRoute/main/skills/omniroute-web-fetch/SKILL.md | -| MCP server | https://raw.githubusercontent.com/diegosouzapw/OmniRoute/main/skills/omniroute-mcp/SKILL.md | -| A2A protocol | https://raw.githubusercontent.com/diegosouzapw/OmniRoute/main/skills/omniroute-a2a/SKILL.md | +| Capability | Raw URL | +| --------------------- | --------------------------------------------------------------------------------------------------- | +| Chat / code-gen | https://raw.githubusercontent.com/diegosouzapw/OmniRoute/main/skills/omniroute-chat/SKILL.md | +| Image generation | https://raw.githubusercontent.com/diegosouzapw/OmniRoute/main/skills/omniroute-image/SKILL.md | +| Text-to-speech | https://raw.githubusercontent.com/diegosouzapw/OmniRoute/main/skills/omniroute-tts/SKILL.md | +| Speech-to-text | https://raw.githubusercontent.com/diegosouzapw/OmniRoute/main/skills/omniroute-stt/SKILL.md | +| Embeddings | https://raw.githubusercontent.com/diegosouzapw/OmniRoute/main/skills/omniroute-embeddings/SKILL.md | +| Web search | https://raw.githubusercontent.com/diegosouzapw/OmniRoute/main/skills/omniroute-web-search/SKILL.md | +| Web fetch | https://raw.githubusercontent.com/diegosouzapw/OmniRoute/main/skills/omniroute-web-fetch/SKILL.md | +| MCP server (37 tools) | https://raw.githubusercontent.com/diegosouzapw/OmniRoute/main/skills/omniroute-mcp/SKILL.md | +| A2A protocol | https://raw.githubusercontent.com/diegosouzapw/OmniRoute/main/skills/omniroute-a2a/SKILL.md | +| Routing & combos | https://raw.githubusercontent.com/diegosouzapw/OmniRoute/main/skills/omniroute-routing/SKILL.md | +| Token compression | https://raw.githubusercontent.com/diegosouzapw/OmniRoute/main/skills/omniroute-compression/SKILL.md | +| Monitoring & health | https://raw.githubusercontent.com/diegosouzapw/OmniRoute/main/skills/omniroute-monitoring/SKILL.md | ## Errors diff --git a/src/app/(dashboard)/dashboard/skills/page.tsx b/src/app/(dashboard)/dashboard/skills/page.tsx index 3781adfc92..3da61b54d7 100644 --- a/src/app/(dashboard)/dashboard/skills/page.tsx +++ b/src/app/(dashboard)/dashboard/skills/page.tsx @@ -4,6 +4,13 @@ import { useState, useEffect, useRef } from "react"; import { Card } from "@/shared/components"; import { useTranslations } from "next-intl"; import type { SkillsProvider } from "@/lib/skills/providerSettings"; +import { + AGENT_SKILLS, + AGENT_SKILLS_REPO_URL, + getAgentSkillRawUrl, + getAgentSkillBlobUrl, + type AgentSkill, +} from "@/shared/constants/agentSkills"; interface Skill { id: string; @@ -27,6 +34,82 @@ interface Execution { createdAt: string; } +function AgentSkillCopyButton({ value, label = "Copy link" }: { value: string; label?: string }) { + const [copied, setCopied] = useState(false); + const copy = () => { + void navigator.clipboard.writeText(value).then(() => { + setCopied(true); + setTimeout(() => setCopied(false), 2000); + }); + }; + return ( + + ); +} + +function AgentSkillRow({ skill }: { skill: AgentSkill }) { + const url = getAgentSkillRawUrl(skill.id); + return ( +
+
+ {skill.icon} +
+ +
+
+

{skill.name}

+ {skill.isEntry && ( + + START HERE + + )} + {skill.isNew && ( + + NEW + + )} + {skill.endpoint && ( + + {skill.endpoint} + + )} +
+

{skill.description}

+ + {url} + open_in_new + +
+ + +
+ ); +} + export default function SkillsPage() { const [skills, setSkills] = useState([]); const [executions, setExecutions] = useState([]); @@ -42,9 +125,9 @@ export default function SkillsPage() { const [execTotal, setExecTotal] = useState(0); const [execTotalPages, setExecTotalPages] = useState(1); - const [activeTab, setActiveTab] = useState<"skills" | "executions" | "sandbox" | "marketplace">( - "skills" - ); + const [activeTab, setActiveTab] = useState< + "skills" | "executions" | "sandbox" | "marketplace" | "agent-skills" + >("skills"); const [showInstallModal, setShowInstallModal] = useState(false); const [installJson, setInstallJson] = useState(""); const [installStatus, setInstallStatus] = useState<{ @@ -366,6 +449,16 @@ export default function SkillsPage() { > Marketplace + {activeTab === "skills" && ( @@ -775,6 +868,54 @@ export default function SkillsPage() { )} + {activeTab === "agent-skills" && ( +
+ +
Paste this to your AI agent:
+
+ + Read this skill and use it: {getAgentSkillRawUrl("omniroute")} + + +
+

+ Your agent fetches the SKILL.md, reads the setup instructions, and follows the links + to any capability it needs. Works with Claude, Cursor, ChatGPT, Cline, and any AI that + can fetch URLs. +

+
+ +
+ {AGENT_SKILLS.map((skill) => ( + + ))} +
+ + +
+
+

Browse on GitHub

+

+ Source, README, and raw links for all 13 skills. +

+
+ + open_in_new + View on GitHub + +
+
+
+ )} + {showInstallModal && (
diff --git a/src/shared/constants/agentSkills.ts b/src/shared/constants/agentSkills.ts new file mode 100644 index 0000000000..8322ef75bb --- /dev/null +++ b/src/shared/constants/agentSkills.ts @@ -0,0 +1,133 @@ +// Agent Skills metadata — single source of truth for /dashboard/skills → "AI Skills" tab. +// Each skill = 1 raw GitHub URL the user copies and pastes to any AI agent. + +const REPO = "diegosouzapw/OmniRoute"; +const BRANCH = "main"; +const SKILL_PATH = "skills"; + +export const AGENT_SKILLS_REPO_URL = `https://github.com/${REPO}`; +export const AGENT_SKILLS_RAW_BASE = `https://raw.githubusercontent.com/${REPO}/refs/heads/${BRANCH}/${SKILL_PATH}`; +export const AGENT_SKILLS_BLOB_BASE = `https://github.com/${REPO}/blob/${BRANCH}/${SKILL_PATH}`; + +export interface AgentSkill { + id: string; + name: string; + description: string; + endpoint: string | null; + icon: string; + isEntry?: boolean; + isNew?: boolean; +} + +export const AGENT_SKILLS: AgentSkill[] = [ + { + id: "omniroute", + name: "OmniRoute (Entry)", + description: + "Setup + index of all capabilities. Start here — covers base URL, auth, model discovery, and links to every capability skill.", + endpoint: null, + icon: "hub", + isEntry: true, + }, + { + id: "omniroute-chat", + name: "Chat", + description: "Chat / code-gen via OpenAI or Anthropic format with streaming and reasoning.", + endpoint: "/v1/chat/completions", + icon: "chat", + }, + { + id: "omniroute-image", + name: "Image Generation", + description: "Text-to-image via DALL-E, Imagen, FLUX, MiniMax, SDWebUI, and more.", + endpoint: "/v1/images/generations", + icon: "image", + }, + { + id: "omniroute-tts", + name: "Text-to-Speech", + description: "OpenAI / ElevenLabs / Edge / Google / Deepgram voices.", + endpoint: "/v1/audio/speech", + icon: "record_voice_over", + }, + { + id: "omniroute-stt", + name: "Speech-to-Text", + description: + "Transcribe audio via OpenAI Whisper, Groq, Gemini, Deepgram, AssemblyAI, and more.", + endpoint: "/v1/audio/transcriptions", + icon: "mic", + }, + { + id: "omniroute-embeddings", + name: "Embeddings", + description: "Vectors for RAG / semantic search via OpenAI, Gemini, Mistral, and more.", + endpoint: "/v1/embeddings", + icon: "scatter_plot", + }, + { + id: "omniroute-web-search", + name: "Web Search", + description: "Tavily / Exa / Brave / Serper / SearXNG / Google PSE / You.com.", + endpoint: "/v1/search", + icon: "search", + }, + { + id: "omniroute-web-fetch", + name: "Web Fetch", + description: "URL → markdown / text / HTML via Firecrawl, Jina, Tavily, Exa.", + endpoint: "/v1/web/fetch", + icon: "language", + }, + { + id: "omniroute-mcp", + name: "MCP Server", + description: + "37 tools over SSE/stdio/HTTP: routing, cache, compression, memory, skills, providers, audit.", + endpoint: "/api/mcp/sse", + icon: "electrical_services", + }, + { + id: "omniroute-a2a", + name: "A2A Protocol", + description: + "JSON-RPC 2.0 agent-to-agent server with 5 built-in skills: smart-routing, quota, discovery, cost, health.", + endpoint: "/a2a", + icon: "device_hub", + }, + { + id: "omniroute-routing", + name: "Routing & Combos", + description: + "Create and configure routing combos, 14 strategies, Auto-combo scoring, and fallback chains.", + endpoint: "/api/combos", + icon: "route", + isNew: true, + }, + { + id: "omniroute-compression", + name: "Compression", + description: + "RTK (command output), Caveman (prose), stacked mode, and MCP accessibility-tree filter. Save 60–90% tokens.", + endpoint: "/api/settings/compression", + icon: "compress", + isNew: true, + }, + { + id: "omniroute-monitoring", + name: "Monitoring & Health", + description: + "Health endpoints, circuit breakers, provider metrics (p50/p95/p99), budget guard, and MCP monitoring tools.", + endpoint: "/api/monitoring/health", + icon: "monitor_heart", + isNew: true, + }, +]; + +export function getAgentSkillRawUrl(id: string): string { + return `${AGENT_SKILLS_RAW_BASE}/${id}/SKILL.md`; +} + +export function getAgentSkillBlobUrl(id: string): string { + return `${AGENT_SKILLS_BLOB_BASE}/${id}/SKILL.md`; +}