# MessageBus

**Kind:** Class

**Source:** [`atloria-monorepo/libs/agent-core/src/tools/send-message.tool.ts`](https://github.com/sherkety/atloria/blob/main/atloria-monorepo/libs/agent-core/src/tools/send-message.tool.ts#L23)

## Methods

| Method | Signature | Returns |
|---|---|---|
| `registerAgent` | `registerAgent(name: string, hook: InjectionTurnHook<any>)` | `void` |
| `unregisterAgent` | `unregisterAgent(name: string)` | `void` |
| `getHook` | `getHook(name: string)` | `InjectionTurnHook<any> | undefined` |
| `listAgents` | `listAgents()` | `string[]` |
| `enqueue` | `enqueue(name: string, message: string)` | `boolean` |

## Where it refuses work

- `MessageBus` stops the work with an early return when `!hook`.
