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

# nullclaw agent

> Run the AI agent in interactive or single-message mode

The `nullclaw agent` command starts the AI agent for interactive conversations or executes single messages.

## Usage

```bash theme={null}
# Interactive mode
nullclaw agent

# Single message mode
nullclaw agent -m "Your message here"
nullclaw agent --message "Your message here"
```

## Modes

### Interactive Mode

Start an interactive chat session:

```bash theme={null}
nullclaw agent
```

In interactive mode:

* Type your messages and press Enter
* The agent responds using the configured primary model
* Type `exit` or press Ctrl+C to quit
* Full conversation history is maintained
* Memory tools are available (memory\_store, memory\_recall)

### Single Message Mode

Execute a single message and exit:

```bash theme={null}
nullclaw agent -m "What is the meaning of life?"
```

Useful for:

* Scripting and automation
* Quick queries
* Integration with other tools

## Options

<ParamField path="-m, --message" type="string">
  Execute a single message and exit (non-interactive)
</ParamField>

## Configuration

The agent uses the default model from `~/.nullclaw/config.json`:

```json theme={null}
{
  "agents": {
    "defaults": {
      "model": {
        "primary": "openrouter/anthropic/claude-sonnet-4"
      }
    }
  }
}
```

## Examples

### Basic Interactive Session

```bash theme={null}
$ nullclaw agent
You: Hello!
Assistant: Hello! How can I help you today?
You: What tools do you have access to?
Assistant: I have access to:
- file_read, file_write, file_edit for file operations
- shell for executing commands
- memory_store, memory_recall for persistent memory
- browser, browser_open for web interactions
- And many more!
You: exit
```

### Single Message

```bash theme={null}
$ nullclaw agent -m "Write a haiku about AI"
Silicon neurons
Thinking faster than lightning
Wisdom without sleep
```

### With Memory

```bash theme={null}
$ nullclaw agent -m "Remember that my favorite color is blue"
I'll store that information for you.

$ nullclaw agent -m "What is my favorite color?"
Your favorite color is blue.
```

## Tool Access

The agent has access to all configured tools by default:

* **File operations**: file\_read, file\_write, file\_edit, file\_append
* **Shell**: shell command execution (with allowlist)
* **Memory**: memory\_store, memory\_recall, memory\_forget
* **Browser**: browser, browser\_open, screenshot
* **Git**: git\_operations
* **Hardware**: hardware\_info, hardware\_memory

Tool availability depends on your security configuration (`autonomy` and `workspace_only` settings).

## Security

<Warning>
  The agent respects security boundaries configured in `config.json`:

  * `workspace_only`: Restricts file access to workspace
  * `allowed_commands`: Shell command allowlist
  * `max_actions_per_hour`: Rate limiting
</Warning>

## See Also

* [Gateway](/cli/gateway) - Long-running gateway mode
* [Onboard](/cli/onboard) - Initial setup wizard
* [Configuration](/configuration/overview) - Config file reference
