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

# plog verify

> Verify hash chain integrity

`plog verify` walks an agent's hash chain and checks that every event's hash is correct and all links are contiguous.

## Usage

```bash theme={null}
plog verify --agent-id my-agent
plog verify --agent-id my-agent --server http://localhost:7600
```

## Flags

| Flag         | Default                  | Description                       |
| ------------ | ------------------------ | --------------------------------- |
| `--agent-id` | —                        | **Required.** Agent ID to verify  |
| `--server`   | —                        | Verify against a remote server    |
| `--api-key`  | —                        | API key for server authentication |
| `--db`       | `~/.provenlog/events.db` | Local SQLite database path        |

## Output

On success:

```
Chain valid for agent "my-agent" (150 events verified)
```

On failure:

```
Chain INVALID for agent "my-agent": hash mismatch at sequence 42
```

## What it checks

1. **Hash correctness** — recomputes each event's hash and compares
2. **Chain continuity** — verifies each event's `prev_hash` matches the previous event's `hash`
3. **Sequence integrity** — checks for gaps in the sequence
