agentskit.js

createRouter

Auto-generated API reference for createRouter.

Function: createRouter()

createRouter(options): AdapterFactory

Defined in: router.ts:80

Build an AdapterFactory that picks one of N candidates per request.

Resolution order:

  1. classify(request) returns a candidate id → use it
  2. classify(request) returns tag(s) → filter by tags, then policy
  3. Fall back to policy over all capability-matched candidates

#Parameters

#options

RouterOptions

#Returns

AdapterFactory

Explore nearby

✎ Edit this page on GitHub·Found a problem? Open an issue →·How to contribute →

On this page