> ## Documentation Index
> Fetch the complete documentation index at: https://docs.malbox.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Event hooks

> Complete reference for all plugin event hooks

This page documents all events that plugins can subscribe to through the hook system. For conceptual information about how event hooks work, see [Event Hooks](/plugin-system/event-hooks).

## Task events

Events fired during the task lifecycle. The `id` field carries the `task_id`.

| Event         | Description                                     |
| ------------- | ----------------------------------------------- |
| TaskCreated   | A new analysis task has been created and queued |
| TaskStarting  | A task is about to begin execution              |
| TaskCompleted | A task finished successfully                    |
| TaskFailed    | A task failed during execution                  |
| TaskCanceled  | A task was canceled (timeout or manual)         |

## Plugin events

Events related to plugin process lifecycle and output. The `id` field carries the `plugin_id` (except for `PluginResultAvailable`, which carries `source` and `result_name` instead). The daemon publishes these events on per-plugin event channels that other plugins can subscribe to.

| Event                 | Description                                                                                                                                               |
| --------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
| PluginStarted         | A plugin process has started and is ready                                                                                                                 |
| PluginStopped         | A plugin process has stopped                                                                                                                              |
| PluginResultAvailable | A plugin produced an analysis result. The `source` field identifies the originating plugin and `result_name` identifies the result. Handle via `on_event` |

## Sample events

Events fired during sample processing. The `id` field carries the `sample_id`.

| Event                | Description                           |
| -------------------- | ------------------------------------- |
| SampleStarted        | A sample analysis session has started |
| SampleStopped        | A sample analysis session has stopped |
| SampleResultProduced | A sample produced an analysis result  |

## System events

Events for system-wide occurrences. Broadcast on the shared daemon event channel to all plugins.

| Event          | Description                            |
| -------------- | -------------------------------------- |
| DaemonShutdown | The daemon is shutting down            |
| ConfigReloaded | System configuration has been reloaded |
