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

# Add / Remove Commands

> This page discusses how to register that commands are loaded/unloaded in a callback

## Example Agent Response

```json theme={"system"}
{
    "task_id": "task uuid here",
    "user_output": "some user output here",
    "commands": [
        {
            "action": "add",
            "cmd": "shell"
        },
        {
            "action": "add",
            "cmd": "jsimport"
        }
    ]
}
```

## Walkthrough

It's a common feature for agents to be able to load new functionality. Even within Mythic, you can create agents that only start off with a base set of commands and more are loaded in later. Using the `commands` keyword, agents can report back that commands are added (`"action": "add"`) or removed (`"action": "remove"`).

This is easily visible when interacting with an agent. When you load a new command and register it back with mythic in this way, that new command will also appear in that autocomplete list.

This only allows you to register commands that Mythic already knows about. You can't use this to register an entirely new command in Mythic (i.e. one that doesn't have a backing python/go definition file).
