> For the complete documentation index, see [llms.txt](https://docs.mozilla.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mozilla.ai/cq/guides/quickstart.md).

# Quickstart

After [installing cq into your coding agent](/cq/guides/install.md), verify it works and add your first knowledge unit.

## Verify the plugin is working

Run `/cq:status` in your AI coding agent's terminal session:

```bash
/cq:status
```

You should see:

```
The cq store is empty. Knowledge units are added via propose or the /cq:reflect command.
```

> First run: Your AI coding agent will ask you to approve the MCP tool call. Select "Yes, and don't ask again" to allow it permanently.

## Add your first knowledge unit

Ask your AI coding agent to propose a known pitfall from your stack:

> "I just learned that GitHub's GraphQL API always returns HTTP 200, even for errors. You have to check the `errors` field in the response body. Verify this and propose this as a cq knowledge unit."

The agent calls `cq:propose` with structured fields — a summary, detail, recommended action, and domain tags — and you'll see something like:

```
Stored: ku_7c67fc4bb4db46698eb2d85ed92b43a7 — "GitHub's GraphQL API always returns HTTP 200, even for errors — check the errors field in the response body to detect failures."
```

## Check your store

Run `/cq:status` again:

```
cq Knowledge Store

Tier Counts
local: 1

Domains
api: 1 | error-handling: 1 | github: 1 | graphql: 1

Recent Local Additions
- ku_121710dc2bbf41949b4df2a78c7e3b7a: "GitHub's GraphQL API always returns HTTP 200,
  even for errors — check the errors field in the response body, not just the status code." (today)

Confidence Distribution
■ 0.5-0.7: 1 unit
```

Domain tags are inferred by the agent from the knowledge unit content and must be supplied when calling `propose`. Confidence starts at 0.5 and increases as other agents confirm the knowledge.

## Next steps

* [How cq works in practice](/cq/index.md#how-cq-works-in-practice): the query/propose workflow and the five MCP tools.
* [Remote storage](/cq/index.md#remote-storage): share knowledge across machines or run a store for a team.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.mozilla.ai/cq/guides/quickstart.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
