asRouter
Return the underlying Hono app for this service. This is
a Python-compat alias for getApp() — use either name
interchangeably. Pick asRouter() when porting code from the Python SDK that
called as_router() for a FastAPI APIRouter.
Use this to mount the service into an existing Hono application rather than
running a standalone server with run() or
serve().
Use asRouter() for production deployments where you want to control the
HTTP server lifecycle, or when hosting multiple services on the same Hono
instance via AgentServer.
Returns
Hono — the configured Hono app with all routes registered (SWML document
endpoint plus any routing-callback paths).