Zvec Logo

Connect AI Agents

Connect a supported AI agent and understand when it uses Zvec-Grep.

zg --install connects supported AI agents to Zvec-Grep. Agents receive compact, source-linked evidence from the same workspace index used by the CLI.

Install

Use the guided installer, or configure one or more targets directly:

zg --install
zg --install --target codex --yes
zg --install --target claude --target cursor --yes

Supported targets are codex, claude, qwen, qoder, opencode, cursor, copilot, vscode, grok, pi, all, and auto. The installer preserves configuration outside Zvec-Grep-managed blocks. Restart the agent or open a new session afterward.

The default stdio connection manages the local service automatically; no Server setup is required.

Upgrade Existing Integrations

To migrate existing 0.2.x launchers to the native CLI without adding integrations:

zg --install --upgrade-installed --dry-run
zg --install --upgrade-installed

Changed configuration files receive adjacent .zg-upgrade-*.bak backups. Reconnect agents afterward; HTTP users can run zg --server on to replace an old daemon.

Available MCP Tool

The default Agent integration exposes one Zvec-Grep tool:

ToolUse it for
zvec_grep_searchIndexed discovery when wording or location is unknown, or when the answer requires semantic or cross-file understanding

Exact words, filenames, paths, and regular expressions use the Agent's native grep or rg tools with the default toolset. --mcp-toolset full also exposes Zvec-Grep's rg, index-management, and status tools; see Local Server.

Retrieval Routing

Zvec-Grep adds semantic workspace discovery without replacing exact-search tools:

IntentRoute
Exact word, quotation, identifier, filename, path, or regex is sufficientNative grep or rg
Wording or location is unknown, or cross-file synthesis is requiredzvec_grep_search
Exact anchors are known but broader context is requiredzvec_grep_search, then focused grep or rg
Current external facts or unrelated open-world knowledgeAn external source, not Zvec-Grep

The default Agent toolset exposes indexed search only. When an index is missing, a client that supports interactive setup can ask the user to select a model and approve a background build. Search resumes on retry after indexing completes. Otherwise, create the index with zg --index; rebuilding and deletion remain explicit operations.

Remove

zg --uninstall --target codex --yes
zg --uninstall --target all --yes

This removes only Zvec-Grep-managed Agent configuration. It does not delete the npm package or workspace indexes. If installation or connection fails, see Troubleshooting.

On this page