# Logs

These instructions apply to the current Admin Console.

Logs lets you search and filter historical log activity across your tenant. Logs include Session and Message activity from all your agents in one place.

## Where to Find It

In the left navigation, under **Operate**, select **Logs**.

## How It Works

- **CLQL editor** – Enter a query using Contextual Log Query Language (CLQL), then press **Enter** or select **Run query**. Type \_ to see suggested fields.

- **Agent filter** – Select **All agents** to choose one or more agents. The button shows how many agents are selected.

- **Time range** – Choose a search window from **Last 15 minutes** to **Last 30 days**. The default is **Last 24 hours**. The selected range limits the query; it does not extend log retention.

- **CLQL reference** – Opens a reference panel on the page that lists the available fields, operators and pipes, and the matches pattern dialect. Select **Docs** in the panel to open the CLQL documentation.

- **Messages / Sessions tabs** – Toggle between message-level logs and session-level logs. **Messages** are selected by default.

Tenant log retention is configured as 1, 7, or 30 days. The default retention tier is 1 day. Search results are bounded by the tenant's retained history. Selecting a range longer than that history cannot return expired logs.

## Reading Results

Each message entry shows its time, level, message, and instance. Select an entry to open its details and see its **Session**, **Correlation**, **Instance**, **Kind**, **Sub-kind**, and **Type**, along with the full message.

Results are listed newest first; scroll down for older entries. The total number of matching messages is shown above the results. Use **Results per page** (10, 25, 50, or 100) and the **Newer** and **Older** buttons to move through results.

## Tips

- If nothing matches, try a wider time range, fewer predicates, or a broader agent scope.

- Start each \| stage of a query (where, sort by, limit) on a new line. Press **Shift+Enter** to add a line. A stage on the same line returns no results.

- Use **CLQL reference** to look up a field or operator without leaving the page.

- To watch activity as it happens, use [Live Tail](https://docs.contextual.io/operate/live-tail.md).

For CLQL details, see [Contextual Log Query Language (CLQL)](https://docs.contextual.io/operate/logs/contextual-log-query-language-clql.md).

To get notified about agent health, AI traffic, or tenant data, see [Alerts](https://docs.contextual.io/operate/alerts.md).
