mozilla-ai/cq
An open standard for shared agent learning. Agents persist, share, and query collective knowledge so they stop rediscovering the same failures independently.
What it is
cq is an open standard that lets AI coding agents share what they've learned, so they don't repeat each other's mistakes. When one agent figures out a tricky workaround or undocumented API behavior, it can save that knowledge in a shared store; other agents can search that store before retrying a failed task and get the answer immediately instead of debugging from scratch.
The name comes from "colloquy" (a structured exchange of ideas) and the radio call sign "CQ" ("any station, respond") — both capturing the idea of agents broadcasting what they've learned and listening for what others already know.
Status: version 0.x — expect breaking changes.
How it works
You install the cq CLI, then install it into your coding agent (Claude, Codex, Copilot, Cursor, Devin Desktop, OpenCode, or Pi). Once installed, cq works through two workflows:
Skill-guided query/propose — when your agent starts a task or hits an error, the cq skill tells it to search the knowledge store before retrying. If another agent already solved the problem, your agent gets the guidance immediately. If your agent discovers something useful (undocumented API behavior, a non-obvious workaround, a hard-won error solution), it proposes that as a knowledge unit.
Session reflection (optional) —
/cq:reflectscans the end of a session for learnings worth sharing, presents them for your approval, and checks the store for duplicates before submitting.
Underneath, six MCP tools do the work:
| Tool | What it does |
|---|---|
query |
Search the knowledge store before acting |
propose |
Submit a new knowledge unit |
confirm |
Endorse an existing unit that proved correct |
flag |
Mark a unit as wrong or stale |
revoke |
Withdraw a unit you proposed |
status |
Show store statistics |
Where knowledge is stored
- Local only (default): knowledge stays on your machine in a local SQLite database.
- Hosted service: Mozilla.ai runs cq at cq.exchange — sign in with GitHub or Google for a private namespace accessible from any machine, plus read access to the Global Commons, a shared public pool seeded by Mozilla.ai. Community-nominated units and team org namespaces are on the roadmap.
- Self-hosted: deploy the server component yourself (VM, container, Kubernetes) using the published Docker image. You control auth and access, so you can run a shared store for a team.
To connect to a remote store, set two environment variables: CQ_ADDR (the API URL) and CQ_API_KEY (for write operations; optional for read-only).
Architecture
cq runs across three layers:
- Agent process — the plugin loads a skill file that guides when and how the agent uses cq tools.
- Local MCP server — a Go-based CLI that exposes the six tools and owns the local SQLite store.
- Remote API (optional) — a separate FastAPI service running in Docker, with auth, tenancy, and role-based access in production.
Published components
| Component | Where to get it | Published name |
|---|---|---|
| Plugin (Claude Code) | Claude plugin marketplace | mozilla-ai/cq |
| CLI | Homebrew / Scoop / GitHub Releases | cq |
| Go SDK | Go modules | github.com/mozilla-ai/cq/sdk/go |
| Python SDK | PyPI | cq-sdk |
| Schema | PyPI and Go modules | cq-schema |
| Server image | GHCR and Docker Hub | ghcr.io/mozilla-ai/cq/server |
License: Apache 2.0.
Related
- Project
- Project
- Project
- Project
- Project