Duyệt miễn phí mỗi ngày. Lên Pro để cài đặt và dùng Airsc MCP không giới hạn.

Xem gói Pro
PluginAn toànQuy trình & bộ nhớ agentCần cài đặt chút

cq

mozilla-ai · mozilla-ai/cq

Một lớp kiến thức chia sẻ cho các AI agent để lưu trữ và truy vấn các bài học chung nhằm tránh lặp lại sai lầm.

An open standard for shared agent learning. Agents persist, share, and query collective knowledge so they stop rediscovering the same failures independently.

1.3k sao68Giấy phép: Apache-2.0Cập nhật Hôm kia0 lượt mở

Xem trước

▍

Bạn có thể làm gì với nó

  • Chia sẻ các bản sửa lỗi và các bước thiết lập giữa các coding agent khác nhau như Claude và Cursor
  • Ngăn chặn các agent lặp lại cùng một thất bại trên các dự án khác nhau
  • Truy vấn cơ sở kiến thức tập thể về các giải pháp mà agent đã học được cho các tác vụ cụ thể

Kiểm tra an toàn

An toàn

Không thấy dấu hiệu rủi ro trong các file đã quét.

Quét tự động các file trong repo. Luôn xem lại code trước khi chạy.

Trích từ README

cq

Status: 0.x — expect breaking changes. See DEVELOPMENT.md for migration guides.

An open standard for shared agent learning — structured knowledge that prevents AI agents from repeating each other's mistakes.

The term cq is derived from two sources: colloquy (/ˈkɒl.ə.kwi/), a structured exchange of ideas where understanding emerges through dialogue rather than one-way output, and CQ, a radio call sign ("any station, respond"), capturing the same model: open invitation, response, and collective signal built through interaction. Both capture the same idea: agents broadcasting what they've learned and listening for what others already know.

For the full documentation, visit docs.mozilla.ai/cq.

Installation

Install the cq CLI (via Homebrew, Scoop, or GitHub Releases), then install into your coding agent:

cq install --target <host>
AgentTarget
Claudeclaude
Codexcodex
Copilotcopilot
Cursorcursor
Devin Desktopdevin-desktop
OpenCodeopencode
Pipi

Install into multiple hosts at once by repeating --target.

For per-host config paths, flags, remote-server setup, and Windows locations, see the installation guide.

Once installed, follow the Quickstart to verify it works and add your first knowledge unit.

How cq works in practice

You typically do not propose knowledge units manually. cq works through two agent workflows:

Skill-guided query/propose workflow

When your agent starts a task or encounters an error, the cq skill directs the agent to query the knowledge store before the agent retries.

If another agent has already solved this problem, your agent gets the relevant guidance immediately, instead of debugging from scratch.

If your agent discovers something that would save another agent time, for example:

  • Undocumented API behavior
  • Non-obvious workaround for a known issue
  • Solution to an error that required multiple failed attempts to resolve

Then it will propose that learning as a knowledge unit.

Session reflection (optional)

/cq:reflect is a catch-all for the end of a session, useful if you suspect the agent missed proposing something in-flow. It scans the session for learnings worth sharing (debugging breakthroughs, undocumented API behavior, workarounds), presents them for approval, and queries the store before submitting each one to avoid duplicates.

The five MCP tools underneath:

ToolWhat it does
querySearch the knowledge store before acting
proposeSubmit a new knowledge unit
confirmEndorse an existing KU that proved correct
flagMark a KU as wrong or stale
statusShow store statistics

Remote storage

With no remote configured, knowledge stays local on the machine running the plugin. If you want your KUs available across multiple machines, to read from a shared knowledge pool, or to run a shared store for a team, you have two options.

Option 1: Use the hosted service

Mozilla.ai runs a hosted cq service at cq.exchange. Sign in with GitHub or Google, and you get:

  • A private namespace: your KUs stored centrally, accessible from any machine via a time-limited API key.
  • Read access to the Global Commons: a shared public pool of KUs, currently seeded by Mozilla.ai.

Community-nominated KUs and org namespaces for teams are on the roadmap; see the launch announcement for more.

Option 2: Run your own server

Deploy the server component yourself: on a VM, in a container in your cloud, on Kubernetes, or anywhere else you can run the published image (ghcr.io/mozilla-ai/cq/server or mzdotai/cq-server). You control auth, tenancy, and access, so you can run a shared store for a team or organization.

For a quick local setup using docker compose:

make compose-up
make seed-users USER=demo PASS=demo123

Configure your agent

Whichever option you use, set these environment variables for your AI coding assistant:

VariableDescription
CQ_ADDRRemote API URL. Use https://cq.exchange for the hosted service, or your server's URL if self-hosting.
CQ_API_KEYAPI key for authenticated write operations (propose, confirm, flag); optional for read-only use (query, status). Generated in the server's UI dashboard.

For how to set these in each host (Claude, Codex, Copilot, Cursor, Devin Desktop, OpenCode, Pi), see Installation → Connect to a remote cq server.

Knowledge proposed locally will be automatically drained to the remote store when the plugin starts, and available to agents once graduated via human review.

Architecture

How the pieces fit together cq runs across three runtime boundaries:

  1. Agent process — the plugin loads SKILL.md, which guides when and how the agent uses cq tools.
  2. Local MCP server — spawned via stdio, runs the Go based CLI, exposes the five tools above, owns the local SQLite store which defaults to ~/.local/share/cq/local.db.
  3. Remote API (optional) — runs in
Xem mã nguồn trên GitHub