> For a complete index of all SignalWire documentation pages, fetch https://signalwire.com/docs/llms.txt

# run

> Start the multi-agent HTTP server.

Start the HTTP server and begin listening for requests. Uses `@hono/node-server`
to serve the Hono application with all registered agents. Handles server mode only —
for serverless deployments (AWS Lambda, Google Cloud Functions, Azure Functions),
use `ServerlessAdapter` instead.

## **Parameters**

**`host`** `string`

Override the configured hostname.

---

**`port`** `number`

Override the configured port.

---

## **Returns**

`Promise<void>` -- Resolves after starting the HTTP server.

For custom server setups — such as embedding the agents into an existing Hono application —
use `getApp()` to retrieve the underlying Hono app and pass its `fetch` handler to
your own `@hono/node-server` `serve()` call instead of using `run()`.

When the environment variable `SWAIG_CLI_MODE=true` is set (used by the `swaig-test`
CLI tool), `run()` returns immediately without starting the server so only the agent
configuration is loaded.

## **Example**

```typescript {8}
import { AgentBase, AgentServer } from '@signalwire/sdk';

const agent = new AgentBase({ name: 'my-agent', route: '/agent' });
agent.setPromptText('You are a helpful assistant.');

const server = new AgentServer({ host: '0.0.0.0', port: 3000 });
server.register(agent);
await server.run();
```