> Fetch clean Markdown by appending `.md` to any page URL under https://signalwire.com/docs or requesting it with the HTTP header `Accept: text/markdown`. The root index at https://signalwire.com/docs/llms.txt lists the available documentation indexes. # getApp > Get or lazily create the Hono HTTP application with all routes and middleware. Get the fully initialized Hono application instance. If the app has not been created yet, this method initializes it with all routes, middleware, health checks, and security headers -- the same configuration that `serve()` would create. This is primarily used when embedding the agent in a larger Hono application or when deploying to serverless platforms. ## **Parameters** None. ## **Returns** `Hono` -- The configured Hono application instance with all agent endpoints registered. ## **Examples** ### Embed in existing Hono app ```typescript {8} import { Hono } from 'hono'; import { AgentBase } from '@signalwire/sdk'; const mainApp = new Hono(); const agent = new AgentBase({ name: 'assistant', route: '/agent' }); agent.setPromptText('You are a helpful assistant.'); mainApp.route('/ai', agent.getApp()); ``` ### Use with a custom server ```typescript {7} import { serve } from '@hono/node-server'; import { AgentBase } from '@signalwire/sdk'; const agent = new AgentBase({ name: 'assistant', route: '/assistant' }); agent.setPromptText('You are a helpful assistant.'); const app = agent.getApp(); serve({ fetch: app.fetch, port: 8080 }); ``` > Get or lazily create the Hono HTTP application with all routes and middleware.