agentskit.js

createRouter

Auto-generated API reference for createRouter.

Function: createRouter()

createRouter(options): AdapterFactory

Defined in: adapters/src/router.ts:125

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