> ## 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 log

> Query the audit trail

`plog log` lists events from the audit trail.

## Usage

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

## Flags

| Flag         | Default                  | Description                                     |
| ------------ | ------------------------ | ----------------------------------------------- |
| `--last`     | —                        | Show last N events                              |
| `--agent-id` | —                        | Filter by agent ID                              |
| `--server`   | —                        | Query a remote server instead of local database |
| `--api-key`  | —                        | API key for server authentication               |
| `--db`       | `~/.provenlog/events.db` | Local SQLite database path                      |

## Examples

```bash theme={null}
# Recent events from local database
plog log --last 50

# Filter by agent
plog log --agent-id payment-agent

# Query a remote server
plog log --server http://localhost:7600 --agent-id my-agent
```
