Zervice LogoZervice
User Guide

API Keys & Connecting Coding Agents

Learn how workspace owners issue scoped Personal Access Tokens (PATs) so coding agents and automation scripts can safely inspect, simulate, and configure your chatbot workspace.

Connecting Coding Agents to Your Workspace

With API Keys & Coding Agents, you can let external coding assistants (such as Claude Code, Cursor, Antigravity, or Codex) help maintain your Knowledge Base, audit unanswered questions, and draft new Dialog Flows—all under strict workspace permission boundaries.

How Safe Staging Works

Rather than sharing your personal sign-in credentials, you generate a dedicated workspace Personal Access Token (PAT) prefixed with zrv_pat_. You choose a preset tailored to what the agent is allowed to do:

  • Draft Builder Agent (Safe Mode — Recommended): Lets your agent inspect bots, read Quality Gap diagnostics, draft new Dialog Flows, add review-queued Hot Questions, and run dry-run simulations without altering what live website visitors see.
  • Observer / Analytics Agent: Strictly read-only access for auditing logs, identifying Knowledge Base gaps, and reviewing workflow configs.
  • Full Workspace Builder Agent: Allows publishing live Knowledge Collections, syncing website sources, updating bots, and publishing Dialog Flows directly.

Creating and Sharing a Key in 3 Steps

  1. Open Workspace → API Keys & Agents (/admin/api-keys) in the left sidebar.
  2. Click Create API Key, name the token (for example, "Docs CI Sync" or "Claude Safe Mode"), pick a permission preset, and select an expiration window.
  3. Copy the token right away (the full key is shown once for security) and pick a connection snippet:
    • Agent Prompt (1-Link): Copy the single prompt pointing your agent to Zervice's canonical public documentation on chat.zervice.us (https://chat.zervice.us/api/v1/admin/llms.txt) plus your scoped token. The agent reads Zervice concepts and tool schemas automatically.
    • Claude Code / Cursor / Antigravity MCP: Paste the MCP server snippet so the agent gets native workspace tools filtered strictly to your key's scopes.

Works Identically for Cloud and Self-Hosted Workspaces

Whether your chatbot runs on Zervice Cloud (https://chat.zervice.us) or a self-hosted BYOC custom domain (https://chat.yourcompany.com), the concepts, workflows, and APIs are 100% identical. https://chat.zervice.us serves as the universal source of truth for agent documentation—for self-hosted workspaces, your agent simply sends API/MCP calls to your custom domain (which also mirrors /docs locally).

Reviewing Agent Work & Revoking Keys

When an agent works in Draft Builder mode:

  • New Dialog Flows appear with Build (Draft) status in your Flow Canvas so you can inspect and test them visually before publishing live.
  • New Hot Questions appear in your Review Queue so you can approve exact wording before visitors see them.

You can see every key's prefix, granted scopes, and last-used timestamp on API Keys & Agents, and click Revoke anytime to disable an active token immediately.