DL

deyna256/langchain-skill-router

Code review

Эта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал

6 stars Качество 63 Тренд 22MIT

Per-turn skill selection for LangChain and deepagents agents: a fast judge picks the few skills a turn needs, so a catalog of hundreds stays out of the prompt.

Обзор

Per-turn skill routing for LangChain deepagents A drop-in replacement for the deepagents SkillsMiddleware : on each user turn a fast judge decides which SKILL.md skills are needed, and only those are loaded, so a catalog of hundreds stays out of the prompt. Bring any judge: a hosted model, a self-hosted one, or plain rules. An adapter for Jev is included. 113.0k → 25.8k input tokens per turn on a 236-skill catalog, and the agent answered 90% of questions correctly against 88% with the whole catalog in the prompt. See the benchmark → deepagents lists every skill's name and description in the system prompt on every model call. With a handful of skills that is fine. With hundreds, the list takes tens of thousands of tokens per call, and the model has to pick the right procedure from a crowd of similar ones. Skill Router replaces the built-in SkillsMiddleware with one that decides : - A confident pick is loaded with its instructions.

README

Показан фрагмент оригинального README. Открыть оригинал.


Why Skill Router

deepagents lists every skill’s name and description in the system prompt on every model call. With a handful of skills that is fine. With hundreds, the list takes tens of thousands of tokens per call, and the model has to pick the right procedure from a crowd of similar ones.

Skill Router replaces the built-in SkillsMiddleware with one that decides per user turn:

  • Only what the turn needs. A confident pick is loaded with its instructions. When the pick is unsure,
Открыть полный README на GitHub

Рекомендуемые инструменты

Попробуйте другой запрос или уберите фильтр.

Установка

npx skillfish add deyna256/langchain-skill-router
Новичок в MCP? Начните с руководства на mcpskill.org →