-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Christian Pojoni edited this page May 2, 2026
·
2 revisions
Reusable subagent routing and execution helpers for TanStack AI apps.
This package is built around one production opinion: finite subagent routing should be deterministic by default. If the possible outputs are known — answer directly, use tools, write a plan, spawn one specialist, spawn multiple specialists, or refuse/escalate — routing is classification, not a task that needs another LLM call.
- Score-based intent routing with
routeSubagentRequest(...) - App-configurable routing policies with
createSubagentRouter(...) - TanStack AI tool factories for
route_subagentsandrun_subagents - Bounded worker validation and fanout
- App-defined tools, profiles, models, prompts, tracing, persistence, and UI
- Lifecycle callbacks and background run handles
npm install @5queezer/tanstack-ai-subagents @tanstack/ai zod@tanstack/ai and zod are peer dependencies.
Verified on commit 7cf49a3:
npm test
# 12 tests, 12 pass
npm pack --dry-run
# includes dist/, README.md, LICENSE, and demo/routing-in-action.cast