Client Referencerouters
semantic_router.routers.indexed
a router that scores by similarity between the query and stored example utterances.
IndexedRouter Objects
class IndexedRouter(BaseRouter)routes
@property
def routes() -> list[Route]the routes in the index, as last read from it.
the index is the only place routes are written, and this view is only ever filled from it: on build, after this router's add / remove, on refresh(), and per call once the cache is older than refresh_interval. a route another router wrote shows up here after a refresh, but a query finds it in the index straight away.
refresh
def refresh() -> Nonere-read the routes from the index, picking up other writers' changes.
arefresh
async def arefresh() -> Nonere-read the routes from the index, picking up other writers' changes.