> ## Documentation Index
> Fetch the complete documentation index at: https://botmesh.afaya.com.co/llms.txt
> Use this file to discover all available pages before exploring further.

# defineBot()

> Function exported by @botmesh/core.

```ts theme={null}
function defineBot<F>(factory): F;
```

Defined in: [dev/defineBot.ts:67](https://github.com/andresayac/botmesh/blob/main/packages/core/src/dev/defineBot.ts#L67)

Declare a bot factory. Returns the SAME function (typed and branded), so it
can be default-exported for `botmesh dev` and called directly with a real
provider for production.

## Type Parameters

| Type Parameter |
| - |
|  `F` *extends* [`BotFactory`](https://botmesh.afaya.com.co/api/core/type-aliases/BotFactory) |

## Parameters

| Parameter | Type | Description |
| - | - | - |
| `factory` | `F` | `(provider) => Bot` — build your bot around the given provider. |

## Returns

`F`

## Throws

when `factory` is not a function.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.