asRouter
Get a router that embeds this agent’s routes in a host Hono application. The
routes are relative to the agent’s root (/, /swaig, /post_prompt, plus any
routing callbacks), so mount it under the agent’s route:
app.route(agent.route, agent.asRouter()). AgentServer mounts it
the same way. getApp() serves the same routes under the agent’s route instead.
The routes also answer with a trailing slash (/swaig/, /post_prompt/), for a host
app with strict routing.
Parameters
None.
Returns
HostAppRouter — A Hono sub-app carrying the agent’s routes, relative to its
root. HostAppRouter is a type alias for Hono, named for the host-app
mounting contract it fulfills.