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

# Log search

> How to ask questions about your logs in plain language, what search needs, and where to go for queries, threads, and the API.

Log search answers questions about the logs stored in your project. Ask in plain language, such as "how many errors did checkout log yesterday?", and you get a short answer, the results it was written from, the time window it covered, and a query ID. The query ID reruns the same query later without asking again.

You can search from a thread with the Sazabi agent, from the CLI, from your own AI agents over MCP, and from the API. Every surface reads the same logs and the same saved queries.

## What it needs

A project that receives your logs. Anyone who can open the project can search it. You can search the logs your project still keeps, which depends on your plan.

## Set it up

**Step 1**

### Send your logs

Hand setup to your coding agent or run one command. See [Quickstart](https://docs.sazabi.com/get-started/quickstart.md). To add more of your stack, see [Send data](https://docs.sazabi.com/send-data.md).

**Step 2**

### Ask a question

Open a thread in the web app and describe what you want to know, or run `sazabi logs ask "errors per service in the last 6 hours"` from the CLI. See [Threads](https://docs.sazabi.com/ask/threads.md).

**Step 3**

### Rerun or refine

Rerun an answer's query ID over the same window or a new one, or write the query yourself. See [Query syntax](https://docs.sazabi.com/explore/query-syntax.md).

## Go deeper

* [Search logs](https://docs.sazabi.com/explore/search.md): the full guide to asking, rerunning, paging through results, and limits.
* [Query syntax](https://docs.sazabi.com/explore/query-syntax.md): the query spec with predicates, measures, and time windows.
* [How asking Sazabi works](https://docs.sazabi.com/ask.md): threads, the agent's tools, and project memory.
* [Get better answers](https://docs.sazabi.com/ask/better-answers.md): how to steer the agent during an investigation.
* [Agent tools](https://docs.sazabi.com/ask/agent-tools.md): the tools the agent uses, including log search.
* [`sazabi logs`](https://docs.sazabi.com/reference/cli/logs): the CLI reference for `ask` and `query`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.