Reference
VectorGraph documentation
This page documents the AI-native company context and execution layer: workspace data model, first-party CLI API, MCP server, context bundles, and permission rules used by VectorGraph. It also covers the workspace product surface: worklists, planning, docs, canvases, templates, Feed, Insights, developer access, billing, imports, exports, and GitHub. It is written for engineers, operators, and agent implementers who need exact contracts.
contract firstTables describe request shape, required scopes, returned data, and failure behavior. Operational routing details live in internal operations docs. Agents should start with /llms.txt.- Install the pinned @orintech/cli package, then run vectorgraph auth login. Compare the terminal and browser codes before approving.
- Select one or more workspaces for this computer. VectorGraph returns one separate scoped token per workspace and the CLI keeps one explicit active profile.
- Run vectorgraph auth status before any write. Confirm the exact workspace name, slug, immutable ID, role, and credential-verified result; use workspace list and workspace use <slug> when needed.
- Use the workspace console for worklists, saved views, projects, sprints, initiatives, docs, canvases, templates, Feed, Insights, admin, and billing.
- For agent work, run vectorgraph mcp setup after reviewing its workspace-named server, clients, teams, scopes, tools, expiry, and storage targets. Codex and Claude receive distinct workspace-scoped credentials.
- Start each configured client, discover MCP resources and tools, and run one read-only context-bundle test. The agent should not scrape the browser UI.
- Use NorthGraph before and after local code changes when the packaged CLI is available and an agent needs codebase facts, risk analysis, impacted tests, or verification evidence.
Launch boundary
Use release status before turning docs into promises
The launch product has implemented code paths, beta and hardening work, provider-ready but not provider-live surfaces, and explicit exclusions. The active source of truth is docs/product/PRE_LAUNCH_WORK.md.
| Status | What it includes | Launch rule |
|---|---|---|
| Live in the launch codebase | Browser work management, planning, docs, canvases, CLI /cli/v1, hosted VectorGraph MCP, local NorthGraph CLI/MCP, GitHub integration support, Signals, requester status, outbound email rows, admin, billing, imports, exports, realtime, search, jobs, and graph projection foundations. | A launch claim still needs release SHA, environment proof, provider proof where relevant, and the active checks in docs/product/PRE_LAUNCH_WORK.md. |
| Beta and launch-hardening | Daily worklist polish, broad browser smoke, knowledge workspace hardening, graph operations, Signal provider proof, restore evidence, dashboards, alerts, and packaged CLI release automation. | Usable paths may exist in the repo or staging, but public wording should describe them as hardening or beta until launch evidence is recorded. |
| Provider-ready but not provider-live | Slack, GitLab, Bitbucket, Codex, Claude, Zendesk, Salesforce, Datadog, Sentry, Resend delivery setup, object storage, and the expanded first-class provider catalog. | Repository contracts or provider adapters exist where stated, but customer-live claims wait for credentials, install flows, callback/webhook setup, sandbox or production verification, and runbook evidence. |
| Explicitly excluded from launch | Integration marketplace, arbitrary external MCP tool execution, hosted LLM or model routing, autonomous production-change agents, full code review/diff UI, broad public API/webhook platform, native desktop/mobile, relay, remote terminal/file access, local runtime, and Solr unless evidence and ADR change scope. | Do not present these as available launch product features in public pages, docs, agent instructions, demos, or release notes. |
Get started
Install once then connect Codex and Claude together
Log in through the browser, save separate scoped profiles for the workspaces you choose, verify one explicit active workspace, and let one reviewed command configure hosted VectorGraph MCP plus optional local NorthGraph for Codex, Claude, or both. The same sequence is explicit for humans, LLMs, macOS, Linux, and Windows.
Require the registry lookup to return the current public release, exactly @orintech/[email protected], before installation. The paired CLI/North release is published and registry-verified. Hosted MCP is a remote service, while local NorthGraph ships inside that one CLI package. Normal browser login and automatic setup use https://vectorgraph.app for /cli/v1 and /mcp. There is no separate Vector MCP package. Agents should also read /llms.txt.
From open workspace to two verified clients
- Install the exact @orintech/cli version with npm. The same package provides the VectorGraph CLI, NorthGraph commands, and the local NorthGraph MCP server.
- Run vectorgraph auth login. Compare the terminal and browser codes, sign in, select one or more workspaces, choose the initial active workspace, approve agent setup when wanted, and leave token management off unless it is explicitly required.
- Run vectorgraph auth status. Require the exact workspace name, slug, immutable ID, role, and credential-verified result before continuing. Use vectorgraph workspace list and workspace use <slug> to switch profiles.
- If login detects approved Codex or Claude clients, continue its automatic review. Otherwise select the intended profile with vectorgraph workspace use <workspace-id-or-slug>, then run vectorgraph mcp setup with --client codex,claude, the intended team keys, and --local-north when local repository intelligence is wanted.
- Review the immutable workspace ID, workspace-named MCP server, clients, team grants, scopes, tools, expiry, local NorthGraph setting, and storage targets. Approve only when every field is correct.
- Restart open clients. Verify vectorgraph-<compact-workspace-key> and optional vectorgraph-north with each client's MCP inspection command.
- In every configured client, perform one read-only context-bundle call for a non-sensitive issue and preserve its requestId without recording a credential.
| Surface | Client | Credential | Current status |
|---|---|---|---|
| VectorGraph CLI | npm install --global @orintech/[email protected] | Separate personal CLI profile for every browser-selected workspace | Require npm to return exactly 0.7.0 before installation. This release includes non-mutating workspace selection, saved-profile session routing, and exact team UUID selection. |
| Hosted VectorGraph MCP | Configured through the automatic login review or vectorgraph mcp setup as vectorgraph-<compact-workspace-key> | A separate MCP credential for every selected client | Remote service at https://vectorgraph.app/mcp; there is no hosted MCP package to install. |
| Local NorthGraph MCP | Configured automatically as vectorgraph-north with --local-north | Local process; no hosted credential for local analysis | Included in the CLI package and runs vectorgraph north mcp. |
| Codex and Claude | Must already be installed and on PATH | Their own user-level MCP configuration | VectorGraph configures selected clients but does not install or update them. |
Install once and log in
# Require the current public registry release.
npm view @orintech/[email protected] version
npm install --global @orintech/[email protected]
vectorgraph auth login
vectorgraph auth status
vectorgraph workspace listUse the same package and flow
# PowerShell
npm.cmd view @orintech/[email protected] version
npm.cmd install --global @orintech/[email protected]
vectorgraph.cmd auth login
vectorgraph.cmd auth status
vectorgraph.cmd workspace listConfigure hosted MCP and local NorthGraph
vectorgraph workspace use "<workspace-id-or-slug>"
vectorgraph mcp setup \
--client codex,claude \
--team "ENG" \
--local-north
# Review every field, then answer y.
# Codex and Claude receive separate credentials.
# The hosted server name losslessly encodes the selected workspace UUID.Separate review from approval
vectorgraph workspace use "<workspace-id-or-slug>"
# First call: structured review only; no credential is created.
vectorgraph mcp setup \
--client codex,claude \
--team "ENG" \
--local-north \
--json
# After approval, repeat the identical request with --yes.
vectorgraph mcp setup \
--client codex,claude \
--team "ENG" \
--local-north \
--json \
--yesProve each client can perform a safe read
Use VectorGraph MCP only for this check.
1. Initialize the server and list resources and tools.
2. Read the workspace teams resource and report visible team IDs.
3. Report the server name, workspace resource URI, and allowed tool names.
4. Call read_context_bundle for <ISSUE_IDENTIFIER> in compact mode.
5. Return source IDs, redactions, freshness, and requestId.
6. Do not create, update, or comment on work.
7. Do not reveal credentials or Authorization headers.| Proof | Pass condition |
|---|---|
| Package | npm view returns exactly 0.7.0, install exits 0, and vectorgraph version --json reports 0.7.0 for CLI and NorthGraph. |
| Login | Browser login returns separate scoped profiles; auth status verifies the exact active workspace and token. |
| Consent | The dry-run review matches the intended workspace, clients, team IDs, scopes, tools, expiry, and storage targets. |
| Isolation | Codex and Claude receive different agent-principal and credential IDs; no secret appears in normal output or VectorGraph CLI metadata. |
| Hosted MCP | Setup's direct MCP probe passes and each client retains the workspace-named entry. |
| Client journey | Each selected client reads one allowed issue context bundle, returns a requestId, and exposes no unexpected team or tool. |
| Symptom | Meaning | Next action |
|---|---|---|
| npm E404 | The requested exact package version is not available. | Stop and verify the release status; do not install an unofficial substitute or a different version. |
| Codex or Claude not found | The selected client is not installed or not on PATH. | Install it from official vendor instructions and rerun the same setup command. |
| agent:connect denied | The active browser-login CLI profile was created without agent setup permission. | Rerun browser login and enable agent setup for an owner/admin workspace. |
| Role denied | The current membership cannot manage integrations. | Ask a workspace owner or administrator to run or approve setup. |
| API origin rejected | The remote URL is not an exact HTTPS origin or contains a path, query, fragment, or embedded credential. | Use the CLI API origin shown by VectorGraph; plain HTTP is accepted only for localhost development. |
| Unmanaged workspace MCP entry | The client already has an MCP server with the derived workspace name. | Inspect and remove or rename that entry; setup will not overwrite it. |
| Setup rolls back | A hosted probe or client configuration validation failed. | Fix the reported cause and rerun; investigate immediately if any rollback failure is listed. |
Quickstart
Humans and agents start differently
Humans should use the browser for setup and review. Agents should use the documented contracts from a terminal, verify credentials first, and preserve structured outputs for audit and debugging.
Human quickstart
- Open the workspace in the browser.
- Use the UI for worklists, planning, docs, canvases, workspace setup, teams, private-team visibility, token creation, revocation, and human review.
- Run browser CLI login only on computers that need terminal automation. Select the intended workspace profiles and verify the active one.
- After CLI login, use vectorgraph mcp setup for Codex, Claude, or both; review the workspace-named server plus team and tool grants before approving separate client credentials.
- Keep token values out of screenshots, prompts, issue comments, and shell history.
Agent quickstart
- Read /llms.txt first. It points to the public docs, agent contracts, CLI endpoint rules, schemas, and security boundaries.
- Decide the surface before acting: hosted VectorGraph MCP for workspace records, local NorthGraph MCP for repo facts, CLI for scripts.
- Verify credentials with /cli/v1/me or MCP initialize, resources/list, the workspace teams resource, and tools/list before reading or writing data. In ChatGPT or Codex, start with search and fetch.
- Use tools/list before tool calls. Missing tools mean the agent is not allowed to use them.
- Read a context bundle before planning implementation work.
- Use idempotency keys for mutating retries and preserve requestId values in logs or comments.
| Placeholder | Replace it with |
|---|---|
VECTORGRAPH_API_URL | Advanced/manual override for the HTTPS origin used by /cli/v1. Normal browser login uses https://vectorgraph.app and needs no environment variable. |
VECTORGRAPH_CLI_TOKEN | Advanced/manual override for one workspace-scoped token. Normal browser login stores separate profiles without printing their tokens. |
VECTORGRAPH_MCP_URL | Advanced/manual override for the full hosted MCP endpoint. Normal automatic setup uses https://vectorgraph.app/mcp. |
VECTORGRAPH_MCP_TOKEN_11111111111141118111111111111111 | Example workspace-specific environment variable for one dedicated per-client MCP credential. Replace the full UUID-derived key for each workspace. The official OpenAI plugin uses browser OAuth instead of a pasted token. |
workspaceId | The immutable active workspace ID printed and verified by vectorgraph auth status, not a guessed slug. |
Install and setup
Verify and install one npm package
After Node.js 24.19.0 is available, Windows, macOS, and Linux use the same pinned npm command. Require the exact registry version before installation. The browser UI, direct CLI HTTP API, and hosted MCP remain remote surfaces.
npm install --global @orintech/[email protected]This installs the vectorgraph CLI, NorthGraph, and the local NorthGraph MCP server. Hosted VectorGraph MCP is not downloaded; browser login starts its reviewed setup for approved, detected Codex and Claude clients, and vectorgraph mcp setupremains the explicit setup command.| Surface | Install | Credential | Verify |
|---|---|---|---|
| Workspace UI | No local install. Open the VectorGraph web app and sign in. | Signed browser session. | Create or open the workspace, then use Developer access to create tokens. |
| CLI HTTP API | No SDK install required. Use curl, fetch, or any HTTP client against /cli/v1. | CLI token from Developer access -> Tokens. | Use https://vectorgraph.app, call GET /cli/v1/me, and confirm actor, scopes, and workspaceId. |
| VectorGraph CLI, NorthGraph, and local NorthGraph MCP | One cross-platform-targeted package. The pinned npm install provides vectorgraph commands, vectorgraph north commands, and the vectorgraph north mcp server. Current verified and pending platform targets are listed below. It requires Node.js 24.19.0; Git is also required for local repository analysis. Its baseline parsers are bundled, so Python, a JDK, and Clang are not required. | No VectorGraph token is required for local repo analysis. | First require npm view @orintech/[email protected] version to return 0.7.1. Then run vectorgraph version --json and vectorgraph north doctor --json. Version 0.7.1 includes non-mutating workspace selection, saved-profile session routing, exact team UUID selection, and readiness-aware hosted MCP setup. |
| Hosted VectorGraph MCP, the workspace MCP | No package or local server install. Configure an MCP-capable client to call the hosted VectorGraph /mcp endpoint over HTTP. There is no separate @vectorgraph/mcp package. | For the official OpenAI plugin, approve a browser OAuth grant. Supported terminal clients may use a separate MCP credential created by vectorgraph mcp setup or Integrations/Developer access. | Discover tools, run search and fetch, then complete one permission-filtered context read before allowing writes. |
| Local NorthGraph MCP, the repository MCP | Use the installed VectorGraph CLI and start vectorgraph north mcp from the repository root. | No hosted VectorGraph token is required for local repo facts. | Connect the terminal agent to the local MCP server and run tools/list. |
| Native OS installers | Not available. VectorGraph does not currently publish a desktop app, Homebrew formula, Windows installer, winget package, Linux package, Snap, or Flatpak. | Not applicable. | Use the web app, hosted MCP, /cli/v1, or the pinned npm package after its exact registry version is verified. |
Use cli v1 from any terminal
# CLI HTTP API: no SDK install required.
export VECTORGRAPH_API_URL="https://api.example.com"
# Inject VECTORGRAPH_CLI_TOKEN through a local secret store before running.
: "${VECTORGRAPH_CLI_TOKEN:?VECTORGRAPH_CLI_TOKEN is not set}"
curl -s \
-H "Authorization: Bearer $VECTORGRAPH_CLI_TOKEN" \
"$VECTORGRAPH_API_URL/cli/v1/me"Verify and install the pinned CLI
# macOS or Linux: require the exact registry release.
(
set -eu
test "$(node --version)" = "v24.19.0"
git --version
test "$(npm view @orintech/[email protected] version)" = "0.7.1"
npm install --global @orintech/[email protected]
command -v vectorgraph
vectorgraph version --json
vectorgraph north doctor --json
)Verify and install from PowerShell
# Windows PowerShell: require the exact registry release.
$nodeVersion = node --version
if ($LASTEXITCODE -ne 0 -or $nodeVersion.Trim() -ne "v24.19.0") {
throw "Node.js 24.19.0 is required."
}
git --version
$vectorgraphVersion = npm.cmd view @orintech/[email protected] version
if ($LASTEXITCODE -ne 0 -or $vectorgraphVersion.Trim() -ne "0.7.1") {
throw "VectorGraph CLI 0.7.0 is not available from npm."
}
npm.cmd install --global @orintech/[email protected]
Get-Command vectorgraph.cmd
vectorgraph.cmd version --json
vectorgraph.cmd north doctor --jsonConfigure hosted VectorGraph and local NorthGraph separately
{
"mcpServers": {
"vectorgraph-ERERERERQRGBEREREREREQ": {
"transport": "http",
"url": "${VECTORGRAPH_MCP_URL}",
"headers": {
"Authorization": "Bearer ${VECTORGRAPH_MCP_TOKEN_11111111111141118111111111111111}"
}
},
"vectorgraph-north": {
"command": "vectorgraph",
"args": ["north", "mcp"]
}
}
}| Customer system | Prerequisites | Install | Status |
|---|---|---|---|
| Windows x64 — package verified | Node.js 24.19.0 and npm; Git for NorthGraph | PowerShell: npm.cmd install --global @orintech/[email protected] | Exact public 0.7.0 CLI, NorthGraph, and local-MCP package smoke passed on Windows x64 in protected plugin run 32678619942. Protected run 32666300410 remains the prior 0.6.1 native Codex customer-path proof; exact 0.7.0 native-client UAT is separate. |
| Windows ARM64 — pending | Node.js 24.19.0 and npm; Git for NorthGraph | PowerShell: npm.cmd install --global @orintech/[email protected] | Target only. Exact 0.7.0 Windows ARM64 package smoke is still required before a support claim. |
| macOS Apple silicon — package verified | Node.js 24.19.0 and npm; Git for NorthGraph | Terminal: npm install --global @orintech/[email protected] | Exact public 0.7.0 CLI, NorthGraph, and local-MCP package smoke passed on macOS Apple silicon in protected plugin run 32678619942; a separate installed-machine version and doctor check also passed. |
| macOS Intel — pending | Node.js 24.19.0 and npm; Git for NorthGraph | Terminal: npm install --global @orintech/[email protected] | Target only. Exact 0.7.0 Intel-macOS package smoke is still required before a support claim. |
| Linux x64 — package verified | Node.js 24.19.0 and npm; Git for NorthGraph | Shell: npm install --global @orintech/[email protected] | Exact public 0.7.0 CLI, NorthGraph, and local-MCP package smoke passed on Linux x64 in protected plugin run 32678619942. |
| Linux ARM64 — pending | Node.js 24.19.0 and npm; Git for NorthGraph | Shell: npm install --global @orintech/[email protected] | Target only. Exact 0.7.0 Linux ARM64 package smoke is still required before a support claim. |
| Managed or offline system | Organization-approved runtime and package access | No supported offline bundle or native VectorGraph installer exists today. | Do not bypass execution policy, endpoint protection, package allowlists, or administrator controls. |
Download the exact runtime from the official Node.js 24.19.0 archive. Install Git from the official Git downloads page if it is not already available. These prerequisites do not make the VectorGraph package available; the exact npm registry lookup is still required.
If npm reports UNABLE_TO_GET_ISSUER_CERT_LOCALLY, do not set strict-ssl=false. Check npm config get cafile, then repair the managed CA bundle or remove only a stale personal cafile setting. Do not print the full npm configuration because it can contain registry credentials. NorthGraph's baseline parsers are bundled; Python, a JDK, and Clang are not required.
Choose surface
CLI hosted MCP and NorthGraph are separate surfaces
The CLI HTTP API is for workspace JSON over /cli/v1. Hosted VectorGraph MCP is for agent access to workspace tools. Normal login and setup use https://vectorgraph.app for both routes. NorthGraph is local repo intelligence inside the VectorGraph CLI, and its local MCP server is started with vectorgraph north mcp.
| Choose | Use when | Avoid |
|---|---|---|
| Browser UI | A human is using worklists, saved views, planning, docs, canvases, templates, Feed, Insights, admin, billing, private visibility, tokens, or reviewing agent output. | Do not ask an agent to scrape the UI when a CLI or MCP contract exists. |
| CLI /cli/v1 | A script, CI job, or terminal command needs JSON access to workspaces, teams, issues, comments, context bundles, or linked development metadata. | Do not use CLI tokens as device sessions or broad public API keys. |
| Hosted VectorGraph MCP | A terminal agent needs permission-filtered workspace context, linked artifact metadata, or needs to create, update, comment, or request approval on work. | Do not use hosted VectorGraph MCP for local repository indexing or source-code analysis. |
| NorthGraph CLI or local MCP | A terminal agent needs repository symbols, callers, effects, policies, diff risk, impacted tests, or verification reports. | Do not treat NorthGraph output as permission to bypass VectorGraph, GitHub, CI, review, or human approval. |
| Surface | Runs through | Use when | Credential | Data |
|---|---|---|---|---|
| CLI HTTP API | /cli/v1 over HTTPS. | Any terminal script, curl command, CI job, or packaged VectorGraph CLI that needs workspace JSON. | CLI token. | Typed workflows plus every operation in the committed agent-safe OpenAPI registry. |
| Hosted VectorGraph MCP | /mcp over HTTPS. | Terminal agents that understand MCP and need permission-filtered VectorGraph workspace context or safe work mutations. | Browser OAuth for the official OpenAI plugin, or a dedicated MCP agent credential for supported terminal clients. | Review-ready search and fetch tools, typed workspace tools/resources, and scope-filtered execute_api_operation parity for the committed agent-safe OpenAPI registry. |
| NorthGraph CLI | Local command: vectorgraph north ... | After package publication, humans or scripts that need local codebase facts, policy checks, diff risk, impacted tests, or verification reports. | Local repository access. | Repo facts only. It is part of the VectorGraph CLI, but it is not /cli/v1. |
| NorthGraph MCP | Local command: vectorgraph north mcp. | After package publication, terminal agents that need MCP access to local repo intelligence. | Local repository access. | Same local NorthGraph facts exposed through MCP. It is started by the CLI and is separate from hosted VectorGraph MCP. |
Prerequisites
What must exist before production use
A production integration should begin with explicit workspace access, stable team boundaries, a known base URL, scoped credentials, and a local repository policy when code analysis is involved.
| Requirement | Human check | Technical check |
|---|---|---|
| Workspace access | You can sign in, open the target workspace, and see the teams/issues you expect. | Programmatic calls only work after the human owner has active workspace membership. |
| Team model | Public and private teams are created before importing sensitive work. | Private-team filtering applies to UI, CLI, MCP, search, exports, notifications, and context bundles. |
| Service endpoints | You know the workspace web origin, deployed API service origin, and full hosted MCP endpoint. | The public https://vectorgraph.app origin proxies both /cli/v1 and /mcp. Advanced operators may use approved direct API and MCP origins through VECTORGRAPH_API_URL and VECTORGRAPH_MCP_URL. |
| Credentials | A human creates either a CLI token or an MCP agent credential from Developer access. | Tokens are shown once, stored hashed, workspace scoped, and revocable. |
| Workspace knowledge | Docs, canvases, collections, and artifact links live in the target workspace before agents depend on them. | Use the workspace UI for full docs and canvas editing. CLI/MCP expose linked document excerpts and canvas text plus bounded scene metadata through context bundles. |
| Plan and export expectations | The workspace plan supports the features the rollout will use, such as private teams, exports, Signals, SLAs, or Insights. | Plan-gated failures return stable 402 errors with plan_limit_exceeded or plan_upgrade_required. |
| Local repo | NorthGraph is run from the repository root when local codebase intelligence is needed. | Use vectorgraph.north.json for policy and vectorgraph north commands for local reports. |
Production checklist
Use this checklist before trusting a script or agent
The goal is not only to make the call succeed. The goal is to make it repeatable, auditable, permission-correct, and easy to debug after the fact.
| Moment | Required action |
|---|---|
| Before first script | Create a least-privilege token, store it outside source control, call /cli/v1/me, and record the workspaceId. |
| Before first agent run | Run reviewed vectorgraph mcp setup for each intended Codex/Claude client, inspect the resulting servers, read the workspace teams resource, inspect tools/list, then read a context bundle. |
| Before local code edits | Run NorthGraph index/diff inspection, identify risky effects, and list impacted tests. |
| Before relying on docs or canvas | Link the document or canvas to the relevant issue, project, or initiative and confirm the latest version was loaded. |
| Before using a saved worklist | Confirm the saved view visibility, filters, grouping, sorting, and count/facet behavior from the canonical worklist route. |
| Before a mutating retry | Use an idempotency key and retry only the exact same request body. |
| Before sharing evidence | Remove secrets, local paths, and source snippets unless a human explicitly approved sharing them. |
| Before closing work | Attach request IDs, command outputs, NorthGraph report summary, and verification results to the issue or handoff. |
Token lifecycle
Create verify rotate and revoke credentials deliberately
A production-ready setup treats tokens as operational credentials with ownership, storage, verification, rotation, and revocation. Do not leave token management as tribal knowledge.
| Stage | What to do | Production note |
|---|---|---|
| Create | Use Developer access -> Tokens for CLI and enable the owner/admin agent-client setup scope when needed. Use Integrations or Developer access -> Agents as the manual fallback. | Creation is audited. Token value is shown once. |
| Store | Use a shell secret, CI secret store, password manager, or agent-local config. | Never commit tokens, paste them into prompts, or store them in issue comments. |
| Verify | Call /cli/v1/me for CLI tokens or MCP initialize/tools/list for agent credentials. | Confirm actor type, workspace, scopes, allowed tools, and visible teams. |
| Use | Send Authorization: Bearer <token> on every CLI/MCP request. | Every request still checks workspace membership, private teams, scopes, and object permissions. |
| Rotate | Create a replacement token, update the script/agent config, verify, then revoke the old token. | Do not edit existing leaked credentials in place. |
| Revoke | Use Developer access to revoke tokens or agent identities. | Revoked credentials should fail immediately or within the documented propagation window. |
Token setup
Browser login creates separate scoped workspace profiles
Humans sign in with the browser and choose the workspaces this computer may use. The waiting CLI receives one token per workspace exactly once, stores them privately, and keeps one explicit active profile. Every request still rechecks workspace membership and private-team permissions.
| Credential | Plain English use | Technical shape | Where to create it | What to copy |
|---|---|---|---|---|
| CLI workspace token | Use this when a human runs the packaged VectorGraph CLI or terminal scripts. | kind=cli, principalType=user, workspace-bound with optional team grants, revocable, hashed at rest. | Recommended: vectorgraph auth login. Advanced fallback: Workspace console -> Developer access -> Tokens. | Nothing in normal browser login; every raw workspace token goes directly to the waiting CLI once. Manual creation still reveals a token once. |
| MCP agent credential | Use this when Codex, Claude Code, Cursor, Windsurf, or another terminal agent needs VectorGraph context. | kind=mcp, principalType=agent, owner user required, allowedTeamIds and allowedTools enforced. | Recommended for Codex/Claude: vectorgraph mcp setup after CLI login. Manual fallback: Integrations or Developer access -> Agents. | Nothing in automatic Codex/Claude setup; the CLI stores each dedicated credential without printing it. Manual setup reveals a token once. |
| OpenAI plugin OAuth grant | Use this for the official VectorGraph plugin shared by ChatGPT and Codex after directory publication. | OAuth 2.1 grant bound to the VectorGraph MCP resource, current WorkOS user, organization, workspace membership, and durable agent identity. | Connect the official VectorGraph plugin in ChatGPT or Codex and approve the requested VectorGraph read/write scopes in the browser. | Nothing. ChatGPT or Codex redirects to VectorGraph and returns the authorization result to OpenAI without exposing an access token. |
A token is a password for a program. Normal browser login does not print it: the token goes directly to the waiting CLI. Keep the local config out of prompts, logs, screenshots, backups, and source control, and revoke credentials when the computer no longer needs them.
| Check | Expected result |
|---|---|
| CLI token creation | Browser login returns one token per selected workspace directly to the waiting CLI. Tokens never appear in the browser or normal terminal output; the server stores hashes only. |
| GET /cli/v1/me | Response includes requestId, actor.actorType, token.scopes, token.workspaceId, and accessible workspaces. |
| MCP initialize | JSON-RPC result includes serverInfo.name=vectorgraph, protocolVersion, and advertised resources/tools/prompts capabilities. |
| MCP tools/list | Response lists only tools allowed by token scopes and agent policy. Missing tools are denied, not hidden by accident. |
| MCP workspace teams resource | resources/read for vectorgraph://workspace/{workspaceId}/teams returns only teams allowed by owner access and the agent's team grants. |
| NorthGraph verify | Output includes policy pass/fail, risk, impacted tests, verification command results, and limitations or degraded analyzer warnings. |
CLI login
Sign in once then choose an explicit active workspace
vectorgraph auth login opens a short-lived browser authorization. Select one or more workspaces, then use auth status and workspace use to prove exactly which scoped profile every CLI command will use. No username, password, API URL, or long-lived token is pasted into the terminal.
Log in a terminal session
- Run vectorgraph auth login. Confirm the short browser code exactly matches the terminal before signing in or approving.
- Select one or more workspaces for this computer and choose the initial active workspace. Each selected workspace receives a separate revocable token.
- Return to the waiting CLI; do not copy or paste a long-lived token. The CLI stores every profile in its permission-restricted local config.
- Run vectorgraph auth status and require the exact intended workspace ID plus Credential verified: yes.
- Use vectorgraph workspace list and vectorgraph workspace use <slug> to change the active profile. Run auth status again after every switch.
- Revoke unused CLI credentials from Developer access. Never copy the local config to another computer.
Authenticate a terminal session
vectorgraph auth login
# The browser compares a short code, then lets the human select
# workspace profiles and the initial active workspace.
vectorgraph auth status
vectorgraph workspace list
# When another saved workspace should become active:
vectorgraph workspace use "<workspace-slug>"
vectorgraph auth statusVerify the actor and scopes
curl -s \
-H "Authorization: Bearer $VECTORGRAPH_CLI_TOKEN" \
"$VECTORGRAPH_API_URL/cli/v1/me"
{
"requestId": "req_01H...",
"actor": {
"actorType": "user",
"actorLabel": null,
"userId": "<user-uuid>"
},
"token": {
"scopes": [
"workspace:read",
"team:read",
"issue:read",
"issue:write",
"comment:write"
],
"workspaceId": "<workspace-uuid>"
},
"workspaces": [{ "id": "<workspace-uuid>", "slug": "acme" }]
}Terminal agent
Configure Codex and Claude from one reviewed CLI command
After verified browser login, select Codex, Claude, or both. VectorGraph creates a separate workspace-scoped credential for every client, gives the hosted entry a workspace-specific name, probes MCP, writes user-level client configuration, and rolls back the run if verification fails.
| MCP surface | Runs where | Data it can see | Credential | Use it for |
|---|---|---|---|---|
| VectorGraph MCP | Hosted https://vectorgraph.app/mcp for normal automatic and manual setup | Permission-filtered workspace records including issues, projects, teams, planning, docs, canvases, comments, context bundles, approvals, and audit-backed tool calls. | Browser OAuth for the official OpenAI plugin; dedicated per-client MCP credential for supported terminal setup | Use this when an agent needs product context or needs to create/update/comment on accessible work. |
| NorthGraph CLI + local MCP | Developer machine through vectorgraph north commands or vectorgraph north mcp | Local repository facts: files, symbols, callers, routes, effects, policy, diff risk, impacted tests, and verification reports. | Local terminal process started by the developer | After the packaged CLI is published and installed, use vectorgraph north commands for humans/scripts and vectorgraph north mcp when an agent needs the same local codebase intelligence. |
- CLI login
- Setup review
- Separate credentials
- Client configs
- Verified MCP read
Prepare a terminal coding agent
- Install Codex and/or Claude first, then install the pinned VectorGraph CLI package when npm publication is verified.
- Run vectorgraph auth login, select the intended workspaces, enable agent setup for owner/admin workspaces, and verify the active workspace with vectorgraph auth status.
- Select the intended profile with vectorgraph workspace use <workspace-id-or-slug>, then run vectorgraph mcp setup --client codex,claude --team <team-key> --local-north and review every field before approval.
- Restart each selected client and confirm vectorgraph-<compact-workspace-key> plus optional vectorgraph-north are loaded. Each client and workspace receives a separate credential.
- Run resources/list and tools/list, then tell the agent to read one non-sensitive context bundle without mutating work.
- Use Integrations or Developer access -> Agents as the manual fallback for unsupported clients or special secret-manager workflows. Choose explicit teams and the narrowest required tools.
- For broad approved API parity, use a reviewed policy/API credential that explicitly allows execute_api_operation, grants only the needed domain scopes, and names every team visible to the accountable user; otherwise use narrower typed tools.
- Tell the agent to use VectorGraph MCP for issue/project context and NorthGraph for local codebase facts before editing.
Verify the MCP credential without claiming a live client
# Generate the client setup in the browser:
# Workspace console -> Integrations -> provider -> Connect client
# Manual fallback: Developer access -> Agents -> Create agent
export VECTORGRAPH_MCP_URL="https://app.example.com/mcp"
# Inject the workspace-specific variable through a local secret store.
: "${VECTORGRAPH_MCP_TOKEN_11111111111141118111111111111111:?workspace MCP token is not set}"
curl -s -X POST "$VECTORGRAPH_MCP_URL" \
-H "Authorization: Bearer $VECTORGRAPH_MCP_TOKEN_11111111111141118111111111111111" \
-H "Content-Type: application/json" \
-H "X-VectorGraph-MCP-Purpose: setup_verification" \
-d '{
"jsonrpc": "2.0",
"id": "init-1",
"method": "initialize",
"params": {}
}'Make the agent use the product contracts
# Start your MCP-compatible coding agent from the terminal.
# Keep the token in env/config; do not paste it into the prompt.
export VECTORGRAPH_MCP_URL="https://app.example.com/mcp"
# Inject the workspace-specific variable through a local secret store.
: "${VECTORGRAPH_MCP_TOKEN_11111111111141118111111111111111:?workspace MCP token is not set}"
Prompt for the terminal agent:
Use hosted VectorGraph MCP to read ENG-124 before planning. Use compact mode for the first pass.
If local NorthGraph MCP is installed and tools/list succeeds, use it to inspect affected symbols and impacted tests.
Do not edit auth, billing, email delivery, or private-team code.MCP config
Automatic setup registers the hosted and local servers
vectorgraph mcp setup writes vectorgraph-<compact-workspace-key> for hosted workspace MCP and optional vectorgraph-north for local code intelligence. The compact key losslessly encodes the full workspace UUID and stays within Claude's qualified-name limit. Workspace-specific names and credentials let several workspaces coexist without silently redirecting an agent. The generic examples below document the transport boundary for manual or unsupported-client setup.
Generic VectorGraph MCP client config
{
"mcpServers": {
"vectorgraph-ERERERERQRGBEREREREREQ": {
"transport": "http",
"url": "${VECTORGRAPH_MCP_URL}",
"headers": {
"Authorization": "Bearer ${VECTORGRAPH_MCP_TOKEN_11111111111141118111111111111111}"
}
}
}
}NorthGraph MCP config after CLI publication
{
"mcpServers": {
"vectorgraph-north": {
"command": "vectorgraph",
"args": ["north", "mcp"]
}
}
}MCP initialize response shape
{
"jsonrpc": "2.0",
"id": "init-1",
"result": {
"protocolVersion": "2025-06-18",
"serverInfo": {
"name": "vectorgraph",
"title": "VectorGraph MCP",
"version": "0.1.0"
},
"capabilities": {
"resources": { "listChanged": false },
"tools": { "listChanged": false },
"prompts": { "listChanged": false }
}
}
}OpenAI plugin
Connect VectorGraph to ChatGPT and Codex with browser OAuth
The official universal plugin uses the hosted VectorGraph MCP server and includes VectorGraph skills for supported workflows. Its source repository and release automation remain controlled by OrinTech. Directory installation is release-gated until identity, domain, staging, production, and OpenAI review evidence are complete.
Connect the official VectorGraph plugin
- After the directory listing is published, install VectorGraph from the OpenAI plugin directory shared by ChatGPT and Codex.
- Choose Connect and complete VectorGraph sign-in in the browser. Review the requested vectorgraph:read and vectorgraph:write scopes; no cookie or raw token is copied into chat.
- Select only an approved QA or working workspace. Every call rechecks active membership, private-team access, object permissions, and the current OAuth grant.
- Run search for a known non-sensitive record, then fetch the returned ID. Review tools/list before asking for any mutation.
- Disconnect from the OpenAI client or revoke the authorized application in VectorGraph/WorkOS when access is no longer needed.
ChatGPT and Codex use the browser OAuth flow. CLI token creation and removal remain available through vectorgraph tokens, but a plugin connection never requires a session cookie or a token pasted into chat.
NorthGraph
NorthGraph is the local codebase intelligence part of the VectorGraph CLI
Install the public CLI, then use vectorgraph north commands for human or scripted repo facts and vectorgraph north mcp for the same local facts through an agent. NorthGraph is local code intelligence; /cli/v1 and hosted VectorGraph MCP remain the separate permissioned workspace surfaces.
- Terminal agent
- VectorGraph CLI
- NorthGraph
- Local repo index
- Verification report
- Less guessingAgents can ask for symbols, callers, routes, effects, policies, and impacted tests instead of reading random files until the context feels right.
- Local by defaultRepository indexing, policy checks, and verification reports run on the developer's machine. Source code is not uploaded to VectorGraph by default.
- Risk is explicitNorthGraph calls out database writes, email sends, secret reads, network calls, auth checks, production config changes, and other effects.
- Policy is enforceableA checked-in vectorgraph.north.json policy can mark paths as sensitive, require tests, block effects, or require human review.
- Tests are easier to chooseDiff and symbol analysis can return directly covering tests, likely impacted tests, required policy tests, and missing coverage signals.
- Evidence travels backReports summarize changed files, risk, policy pass/fail, commands run, limitations, and evidence that can later attach to VectorGraph work.
| Command | Use |
|---|---|
vectorgraph north init | Create the local NorthGraph policy/config file for a repository. |
vectorgraph north index --json | Build or refresh the local repo index for agent-readable facts. |
vectorgraph north inspect <symbol> --json | Find a symbol definition, callers, callees, effects, policy, and tests. |
vectorgraph north effects --type secret_read --json | List code locations that perform a sensitive effect. |
vectorgraph north diff analyze --base main --json | Analyze changed files, new effects, policy failures, risk, and impacted tests. |
vectorgraph north verify --base main --json | Run configured verification commands and return a structured result. |
vectorgraph north report pr --base main --out .vectorgraph/north/pr-report.json --json | Generate a PR-ready verification report for review or future VectorGraph evidence sync. |
vectorgraph north mcp | Start the local NorthGraph MCP server for a terminal agent. |
| NorthGraph MCP tool | Use |
|---|---|
inspect_symbol | Return definition, callers, callees, effects, tests, and policy for a symbol. |
find_callers | Return local callers for a symbol or route handler. |
find_effects | Return effect locations by effect type. |
analyze_diff | Analyze the current git diff against a base ref. |
check_policy | Evaluate the repo or current diff against vectorgraph.north.json. |
find_impacted_tests | Return tests likely affected by files, symbols, or the current diff. |
summarize_risk | Return a compact risk summary for an agent planning step. |
report_pr | Generate the PR-ready report payload. |
Map and verify a local code change
vectorgraph north init
vectorgraph north index --json
vectorgraph north inspect scoreJob --json
vectorgraph north effects --type email_send --json
vectorgraph north diff analyze --base main --json
vectorgraph north verify --base main --json
vectorgraph north report pr \
--base main \
--out .vectorgraph/north/pr-report.json \
--jsonExpose repo intelligence to a terminal agent
# Start the local codebase-intelligence MCP server.
vectorgraph north mcp
# Then connect your terminal agent to that local MCP server.
# Use hosted VectorGraph MCP for workspace work data.
# Use local NorthGraph MCP for local repo facts.Product surfaces
The documentation covers the current workspace product not only agents
Use this as the map of implemented VectorGraph surfaces before you choose the UI, CLI, hosted MCP, or NorthGraph. Each row includes the product capability, the contract family, and the guardrail that must stay true.
| Surface | Implemented capability | Contract family | Guardrail |
|---|---|---|---|
| Canonical worklist | My Issues, team issue lists, triage, saved views, facets, grouping, sorting, pagination, bulk updates, hierarchy, estimates, reminders, and issue templates. | Workspace UI plus the documented /cli/v1 issue search and issue mutation operations. | Workspace and private-team filtering happen on the server. Facets and counts are permission-filtered, not global workspace totals. |
| Planning | Sprints, projects, initiatives, milestones, labels, project updates, initiative updates, owner metadata, project spec docs, and issue planning assignment. | Workspace UI plus documented issue/project context reads for scripts and agents. | Planning objects must belong to the same workspace and stay filtered by team/project access. |
| Workspace knowledge | Document collections, workspace docs, comments, review ownership, stale/reviewed state, pinned docs, version history, and version restore. | Workspace UI, issue/project context panels, and approved CLI/MCP document, collection, comment, reminder, version, archive, restore, and link operations. | Docs are workspace-owned records. CLI and MCP reuse the same permission-filtered product handlers as the browser API. |
| Canvas | First-party canvas scenes with frames, text, tables, mind maps, freehand notes, comment elements, artifact links, presence, version history, and version restore. | Workspace UI, issue/project context panels, and approved CLI/MCP canvas create, read, update, presence, link, version, archive, and restore operations. | Canvas scenes are stored in PostgreSQL as VectorGraph-owned JSON and remain tenant scoped by workspace_id. |
| Context and artifact links | Issue/project context fields, context extraction, evidence summaries, expected outcomes, success metrics, and links between docs, canvases, issues, projects, and initiatives. | Documented /cli/v1 context endpoints, hosted MCP context resources/tools, and workspace UI context panels. | Context bundles expose permission-filtered structured facts and linked artifact metadata; compact mode reduces prompt payloads without removing source IDs, redactions, or policy metadata. |
| Customer intake and SLA | Customers, customer requests, public Signal forms, requester status pages, email intake, reply sync, SLA rules, SLA evaluation, and risk/breach notifications. | Workspace UI, public requester pages, and exported customer/request data where enabled. | Requester views never expose internal workspace, private-team, assignee, or project details unless explicitly allowed. |
| Feed, notifications, realtime, search, and insights | Inbox notifications, project/initiative Feed, workspace SSE updates, PostgreSQL search across indexed objects, and issue/customer/project/SLA rollups. | Workspace UI with permission-filtered search, activity, notification, and insight surfaces. | Search, notification payloads, realtime events, and analytics rollups revalidate workspace and private-team access. |
| Developer access and GitHub | Scoped CLI tokens, agent integration identities, allowed teams/tools, credential revocation, GitHub App install, repository enablement, and status automation settings. | Workspace UI for credential and GitHub setup, then documented CLI/MCP surfaces for programmatic use. | GitHub, Slack, GitLab, Bitbucket, Codex, and Claude are first-party launch integration surfaces. Product-facing docs should say agent integration identity, not fake human user. |
| Admin, billing, imports, and exports | Workspace settings, members, roles, billing plan state, plan downgrade checks, import dry-runs, full JSON exports, and CSV exports for issues, projects, initiatives, customers, and requests. | Workspace UI and exported files where the caller's role and plan allow it. | Owner/admin checks apply. Exports are audited and plan-gated where implemented. |
| NorthGraph | Local repo indexing, facts, symbols, callers, effects, policy checks, diff risk, impacted tests, verification commands, PR reports, and local NorthGraph MCP. | Local VectorGraph CLI commands: vectorgraph north init/index/facts/inspect/effects/policy/diff/tests/verify/report/mcp. | NorthGraph is local-first and model-agnostic. It does not upload source code or authorize production changes. |
Document product context before implementation
- Create or update the workspace document in the right collection.
- Link the document to the relevant issue, project, or initiative.
- Set review state or review owner when the document will guide execution.
- Use the issue/project context panel or context bundle so agents see the linked source.
Use canvas as execution context
- Create a canvas for the diagram, table, mind map, or planning board.
- Link it to the issue, project, or initiative it explains.
- Save a version before major edits and use restore when a bad change lands.
- Keep sensitive local paths or source snippets out unless explicitly approved.
Prepare a reliable daily worklist
- Use server filters for status, assignee, priority, team, project, sprint, label, SLA, parent, and query.
- Choose group and sort from the canonical worklist contract.
- Save the view as personal, team, or workspace visibility.
- Use the saved view route to reload counts, facets, groups, and pagination instead of filtering locally.
Workspace knowledge
Docs and canvases are first class product records
Workspace docs, collections, document comments, document versions, canvases, canvas presence, and canvas versions are part of the product contract. They should be linked to work instead of living as untracked side notes.
| Artifact | Capabilities | Links to | Route |
|---|---|---|---|
| Document collection | Hierarchical grouping for workspace docs and canvases, with sort order and archive state. | Documents and canvases through collection_id. | Create and organize from the workspace UI. |
| Workspace document | Markdown body, content_json, pinned state, review owner, reviewed/stale timestamps, artifact links, and archive state. | Issues, projects, and initiatives through context_links. | Create, edit, archive, and link from the workspace UI. |
| Document comment | Threaded product discussion on a document, with author, edit/delete timestamps, and workspace scoping. | One document in the same workspace. | Use document comments from the workspace UI. |
| Document version | Immutable saved title/body/content_json snapshots, version numbers, creator, restore support, and conflict handling. | One document in the same workspace. | View and restore versions from the workspace UI. |
| Canvas scene | VectorGraph-owned scene JSON for frames, text, tables, connectors, mind maps, freehand, comment elements, viewport, and links. | Issues, projects, and initiatives through context_links. | Create, edit, archive, and link from the workspace UI. |
| Canvas version | Immutable scene snapshots with version restore and expected-version conflict behavior. | One canvas in the same workspace. | View and restore versions from the workspace UI. |
| Canvas presence | Ephemeral collaboration signal for selected element IDs and collaborator color on the active canvas. | One canvas in the same workspace. | Shown automatically while collaborators work in the canvas UI. |
| Search document | Search index rows for issues, comments, projects, initiatives, documents, canvases, customers, and views. | Workspace search results and future context discovery. | Use workspace search and documented context surfaces. |
The workspace UI covers the full docs and canvas workflow today. Hosted MCP and CLI expose issue/project context, linked document excerpts, and canvas text plus bounded scene metadata where supported, but broad document/canvas read-write tools are not part of the public CLI catalog today.
Programmatic coverage
Every major workspace surface has a documented contract boundary
This is the product coverage view: issue work, worklists, knowledge, planning, customer intake, operator workflows, and developer access. It also states which work belongs in the workspace UI, the public CLI catalog, hosted MCP, or NorthGraph.
| Area | Coverage | Programmatic status |
|---|---|---|
| Issue operations | Issues, children, comments, attachments, relations, external links, reminders, bulk update, context, and context extraction. | Typed commands cover common issue workflows; the approved-operation CLI/MCP registry covers the full listed issue lifecycle. |
| Worklist operations | Canonical issue list, saved views, view execution, facets, groups, sort, cursor/offset pagination, and URL-backed state. | CLI/MCP support saved-view list/create/read/favorite/archive/execution plus permission-filtered issue search. |
| Knowledge operations | Document collections, docs, comments, document versions, canvas scenes, canvas presence, canvas versions, and artifact links. | CLI/MCP support approved document, collection, comment, version, canvas, presence, archive, and restore reads/writes, plus linked context summaries. |
| Planning operations | Sprints, projects, project context, project issues, milestones, labels, updates, spec docs, initiatives, initiative milestones, updates, labels, and draft updates. | CLI/MCP expose every listed approved planning read/write through the committed operation registry. |
| Customer operations | Customers, contacts, customer requests, public Signal forms, status tokens, email intake, reply sync, and SLA evaluation. | CLI/MCP support scoped customer/contact/request and SLA operations; public requester and provider intake remain separate authenticated transports. |
| Operator operations | Admin settings, members, billing plans, plan downgrade checks, import dry-runs, JSON exports, CSV exports, Insights, Feed, notifications, realtime, and search. | CLI/MCP include safe Insights, Feed, inbox, and search operations. Admin, billing, import/export, credential, and browser realtime transports remain explicit exclusions. |
| Developer operations | CLI tokens, MCP tokens, agent integration identities, allowed tools, allowed teams, GitHub installation, repository settings, and status automation. | Workspace UI manages credentials. CLI, hosted MCP, and NorthGraph handle programmatic execution. |
Access contract
All supported callers resolve to an actor before data access
The server does not authorize by surface. It authorizes by actor, workspace, team policy, object permission, token scope, and tool policy where applicable.
| Surface | Credential | Checks | Failure behavior |
|---|---|---|---|
| Browser UI | Signed web session | user_id, active workspace membership, role, private-team access | 403 permission_denied or object-level not_found |
| CLI /cli/v1 | Bearer access token | token hash, token scopes, workspace scope, actor membership | 401 unauthorized for a missing bearer, 401 invalid_token for a rejected bearer, 403 scope_denied, or workspace_scope_denied |
| MCP server | MCP OAuth grant or dedicated bearer token | current OAuth grant or token scopes, allowedTools, allowedTeamIds, workspace membership, and object permission | 401 invalid_token or insufficient_scope; 403 agent_tool_denied, agent_team_denied, or scope_denied |
| GitHub sync and jobs | Webhook signature or system actor | signature, installation workspace, idempotency, event source | 401/403 for bad source, duplicate event ignored when idempotent |
- Authenticate the request. Browser requests use the signed web session. CLI requests use a scoped bearer token. Official OpenAI MCP connections use OAuth 2.1; supported terminal clients may use a dedicated MCP bearer credential.
- Resolve the actor. The server records whether the caller is a human, agent, integration, or system actor.
- Bind the workspace from the route or host. A token scoped to workspace A cannot read or write workspace B.
- Load workspace membership and role. Disabled, guest, requester, or missing memberships stop here.
- Apply private-team filters before returning lists, search results, notifications, exports, or context bundles.
- Check the endpoint or tool scope. Approved API operations use committed domain scopes; MCP adds mcp:read for reads or mcp:tools for writes.
- Check agent policy when actorType is agent. allowedTools and allowedTeamIds must both permit the operation.
- Write activity or audit records for mutations and sensitive reads, including requestId and actor attribution.
Objects
Core records and the guardrails around them
These records appear in API responses and context bundles. The guard column lists the minimum authorization boundary before the record can be returned.
| Object | Identifiers | Required fields | Use | Guard |
|---|---|---|---|---|
| Workspace | workspace_id, slug | name, slug, membership records | Tenant boundary for all product data. | workspace membership required |
| Team | team_id, identifier | workspace_id, name, identifier, visibility | Owns workflow statuses, issues, labels, sprints, and private visibility. | workspace membership plus private-team access |
| Issue | issue_id, issueIdentifier | workspace_id, team_id, title, status, priority | Smallest durable unit of tracked work. | workspace membership, team access, object permission |
| Comment | comment_id | workspace_id, issue_id, actor, body | Conversation and handoff record attached to an issue. | workspace membership and issue access |
| Project | project_id | workspace_id, title, status/health, owner | Groups issues into a larger delivery outcome. | workspace membership and private-team filtering |
| Sprint | sprint_id | workspace_id, team_id, name, status, start/end dates | Time-boxes team issue planning and progress. | workspace membership and planning permission for writes |
| Initiative | initiative_id | workspace_id, title, status, owner | Connects projects, milestones, updates, labels, and higher-level outcomes. | workspace membership and planning permission for writes |
| Saved view | view_id | workspace_id, owner/visibility, filters, grouping, sorting | Stores canonical worklist filters and layout. | workspace membership plus saved-view visibility |
| Document collection | collection_id | workspace_id, name, hierarchy metadata | Groups workspace docs and canvases for queryable knowledge. | workspace membership and shared-object access |
| Workspace document | document_id | workspace_id, title, body/content_json, version_number | Durable workspace knowledge with review, stale, pinned, and version history state. | workspace membership and linked-object access where applicable |
| Document comment/version | document_comment_id, version_number | workspace_id, document_id, body or snapshot metadata | Captures discussion and recoverable document history. | workspace membership and document access |
| Canvas | canvas_id | workspace_id, title, scene_json, version_number | First-party visual planning and architecture surface with version restore. | workspace membership and linked-object access where applicable |
| Template | template_id | workspace_id, type, title, body/schema | Reusable issue, form, project, and document starting points. | workspace membership and template visibility |
| SLA or recurring rule | sla_rule_id, recurring_issue_id | workspace_id, schedule/threshold, target metadata | Automates service expectations and repeated work creation. | workspace membership and plan/role checks |
| Customer request | customer_id, request_id | workspace_id, source, customer/request metadata | Connects customer signal to issues and projects. | workspace membership and linked-object access |
| Notification or Feed entry | notification_id, feed_entry_id | workspace_id, actor, object, event metadata | Inbox and activity stream records for workspace execution. | workspace membership and channel/object access |
| Developer access record | access_token_id, agent_principal_id | workspace_id, principal, scopes, allowed tools/teams | Creates revocable CLI and MCP credentials without storing raw token values. | owner/admin/member rules plus token/tool policy |
CLI API
cli v1 is the public CLI contract for scripts
Send Authorization: Bearer <token>. Mutations that can duplicate work should include Idempotency-Key. Responses include requestId where useful.
| Method | Path | Scopes | Body / query | Returns |
|---|---|---|---|---|
GET | /cli/v1/me | workspace:read | none | actor, token scopes, scoped workspace, accessible workspaces |
GET | /cli/v1/workspaces | workspace:read | none | workspaces visible to the token |
GET | /cli/v1/workspaces/{workspaceId}/teams | workspace:read, team:read | none | accessible teams only |
GET | /cli/v1/workspaces/{workspaceId}/issues | workspace:read, issue:read | query, teamId, statusId, assigneeUserId, priority, projectId, sprintId, labelId, limit | permission-filtered issue list |
POST | /cli/v1/workspaces/{workspaceId}/issues | workspace:read, team:read, issue:write | teamId, title, description?, priority?, statusId?, assigneeUserId? | created issue and requestId |
GET | /cli/v1/workspaces/{workspaceId}/issues/{issueIdentifier} | workspace:read, issue:read | none | issue detail if accessible |
PATCH | /cli/v1/workspaces/{workspaceId}/issues/{issueIdentifier} | workspace:read, issue:write | title?, description?, priority?, statusId?, assigneeUserId?, sprintId?, projectId? | updated issue |
POST | /cli/v1/workspaces/{workspaceId}/issues/{issueIdentifier}/comments | workspace:read, comment:write | body | created comment |
GET | /cli/v1/workspaces/{workspaceId}/issues/{issueIdentifier}/context | workspace:read, issue:read, context:read | none | issue context bundle JSON; use ?mode=compact for a smaller provider-neutral payload |
GET | /cli/v1/workspaces/{workspaceId}/issues/{issueIdentifier}/github | workspace:read, issue:read | none | linked pull requests, branches, commits visible to the issue |
GET | /cli/v1/workspaces/{workspaceId}/projects/{projectId}/context | workspace:read, context:read | none | project context bundle JSON; use ?mode=compact for a smaller provider-neutral payload |
GET | /cli/v1/workspaces/{workspaceId}/operations | workspace access and a workspace-wide team grant | none | approved operation metadata filtered to the authenticated token scopes |
POST | /cli/v1/workspaces/{workspaceId}/operations/{operationId} | the operation's committed domain scopes | operationId plus pathParameters?, query?, body?, idempotencyKey? | the reused approved product-handler JSON response |
Verify the actor and scopes
curl -s \
-H "Authorization: Bearer $VECTORGRAPH_CLI_TOKEN" \
"$VECTORGRAPH_API_URL/cli/v1/me"
{
"requestId": "req_01H...",
"actor": {
"actorType": "user",
"actorLabel": null,
"userId": "<user-uuid>"
},
"token": {
"scopes": [
"workspace:read",
"team:read",
"issue:read",
"issue:write",
"comment:write"
],
"workspaceId": "<workspace-uuid>"
},
"workspaces": [{ "id": "<workspace-uuid>", "slug": "acme" }]
}Create an issue with retry safety
curl -s -X POST \
-H "Authorization: Bearer $VECTORGRAPH_CLI_TOKEN" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: create-checkout-telemetry-001" \
-d '{
"teamId": "<team-uuid>",
"title": "Add checkout retry telemetry",
"description": "Record retry reason, attempt count, and final result.",
"priority": "high"
}' \
"$VECTORGRAPH_API_URL/cli/v1/workspaces/$VECTORGRAPH_WORKSPACE_ID/issues"
{
"requestId": "req_01H...",
"issue": {
"id": "<issue-uuid>",
"identifier": "ENG-124",
"title": "Add checkout retry telemetry"
}
}CLI operation catalog
The supported CLI operations are listed with API-style detail
This is the supported /cli/v1 contract for terminal scripts, not a broad public API or webhook platform. Every operation here requires a CLI token and the documented scopes.
| Rule | Contract |
|---|---|
| Base URL | Normal CLI browser login uses https://vectorgraph.app, whose stable /cli/v1 proxy forwards to the API without browser cookies. Advanced direct-HTTP examples may set VECTORGRAPH_API_URL to an approved deployed API origin. |
| Authentication | Send Authorization: Bearer $VECTORGRAPH_CLI_TOKEN on every request. |
| JSON | Send Content-Type: application/json on requests with a body. Responses are JSON and include requestId where useful. |
| Workspace binding | Use workspaceId returned by /cli/v1/me. Do not guess it from a slug or UI label. |
| Idempotency | Send Idempotency-Key on retryable POST/PATCH calls that could duplicate work. |
| Errors | Branch on error.code. Do not parse human-readable messages. |
The standard browser-created CLI token currently covers workspace, team, issue, and comment work, but it does not include context:read. Context operations remain part of the protocol catalog for credentials with that scope. Use hosted MCP for the standard first context-bundle workflow.
/cli/v1/meVerify the caller before any other request.
- Auth
- Bearer CLI token
- Scopes
- workspace:read
- Path params
- none
- Query
- none
- Body
- none
- Returns
- requestId, actor, token scopes, scoped workspaceId, accessible workspaces
- Idempotency
- not applicable
- Common errors
- unauthorized, invalid_token, scope_denied
/cli/v1/workspacesList accessible workspaces for the token.
- Auth
- Bearer CLI token
- Scopes
- workspace:read
- Path params
- none
- Query
- none
- Body
- none
- Returns
- workspaces visible to the token owner
- Idempotency
- not applicable
- Common errors
- unauthorized, invalid_token, scope_denied
/cli/v1/workspaces/{workspaceId}/teamsList teams the caller can use.
- Auth
- Bearer CLI token
- Scopes
- workspace:read, team:read
- Path params
- workspaceId
- Query
- none
- Body
- none
- Returns
- teams visible to the caller
- Idempotency
- not applicable
- Common errors
- unauthorized, invalid_token, workspace_scope_denied, scope_denied
/cli/v1/workspaces/{workspaceId}/issuesSearch and filter issues for scripts.
- Auth
- Bearer CLI token
- Scopes
- workspace:read, issue:read
- Path params
- workspaceId
- Query
- query?, teamId?, statusId?, assigneeUserId?, priority?, projectId?, sprintId?, labelId?, limit?
- Body
- none
- Returns
- permission-filtered issue list
- Idempotency
- not applicable
- Common errors
- unauthorized, invalid_token, workspace_scope_denied, scope_denied
/cli/v1/workspaces/{workspaceId}/issuesCreate an issue from a script.
- Auth
- Bearer CLI token
- Scopes
- workspace:read, team:read, issue:write
- Path params
- workspaceId
- Query
- none
- Body
- teamId, title, description?, priority?, statusId?, assigneeUserId?
- Returns
- created issue and requestId
- Idempotency
- recommended
- Common errors
- unauthorized, invalid_token, workspace_scope_denied, scope_denied, permission_denied, idempotency_key_conflict
/cli/v1/workspaces/{workspaceId}/issues/{issueIdentifier}Read one issue by identifier.
- Auth
- Bearer CLI token
- Scopes
- workspace:read, issue:read
- Path params
- workspaceId, issueIdentifier
- Query
- none
- Body
- none
- Returns
- issue detail if accessible
- Idempotency
- not applicable
- Common errors
- unauthorized, invalid_token, workspace_scope_denied, scope_denied, not_found
/cli/v1/workspaces/{workspaceId}/issues/{issueIdentifier}Update supported issue fields.
- Auth
- Bearer CLI token
- Scopes
- workspace:read, issue:write
- Path params
- workspaceId, issueIdentifier
- Query
- none
- Body
- title?, description?, priority?, statusId?, assigneeUserId?, sprintId?, projectId?
- Returns
- updated issue
- Idempotency
- recommended when retrying
- Common errors
- unauthorized, invalid_token, workspace_scope_denied, scope_denied, not_found, idempotency_key_conflict
/cli/v1/workspaces/{workspaceId}/issues/{issueIdentifier}/commentsAdd a comment to an issue.
- Auth
- Bearer CLI token
- Scopes
- workspace:read, comment:write
- Path params
- workspaceId, issueIdentifier
- Query
- none
- Body
- body
- Returns
- created comment
- Idempotency
- recommended
- Common errors
- unauthorized, invalid_token, workspace_scope_denied, scope_denied, not_found, idempotency_key_conflict
/cli/v1/workspaces/{workspaceId}/issues/{issueIdentifier}/contextRead implementation context for one issue.
- Auth
- Bearer CLI token
- Scopes
- workspace:read, issue:read, context:read
- Path params
- workspaceId, issueIdentifier
- Query
- mode=standard|compact
- Body
- none
- Returns
- permission-filtered issue context bundle with tokenEfficiency metadata and linked knowledge summaries
- Idempotency
- not applicable
- Common errors
- unauthorized, invalid_token, workspace_scope_denied, scope_denied, not_found
/cli/v1/workspaces/{workspaceId}/issues/{issueIdentifier}/githubRead linked GitHub development metadata.
- Auth
- Bearer CLI token
- Scopes
- workspace:read, issue:read
- Path params
- workspaceId, issueIdentifier
- Query
- none
- Body
- none
- Returns
- linked pull requests, branches, and commits visible to the issue
- Idempotency
- not applicable
- Common errors
- unauthorized, invalid_token, workspace_scope_denied, scope_denied, not_found
/cli/v1/workspaces/{workspaceId}/projects/{projectId}/contextRead delivery context for one project.
- Auth
- Bearer CLI token
- Scopes
- workspace:read, context:read
- Path params
- workspaceId, projectId
- Query
- mode=standard|compact
- Body
- none
- Returns
- permission-filtered project context bundle with tokenEfficiency metadata and linked knowledge summaries
- Idempotency
- not applicable
- Common errors
- unauthorized, invalid_token, workspace_scope_denied, scope_denied, not_found
CLI workflows
CLI workflows are JSON contracts for scripts
Use the CLI surface for deterministic terminal and CI workflows. Verify identity first, use returned IDs, preserve request IDs, and use idempotency for retryable writes.
| Workflow | Endpoint | Production guidance |
|---|---|---|
| Verify identity | GET /cli/v1/me | Run first in every new environment. Confirms actor, scopes, workspace, and requestId. |
| Discover teams | GET /cli/v1/workspaces/{workspaceId}/teams | Use returned team IDs. Do not guess private-team identifiers from UI labels. |
| Search issues | GET /cli/v1/workspaces/{workspaceId}/issues | Returns permission-filtered results. Missing private issues may appear as not_found elsewhere. |
| Create issue | POST /cli/v1/workspaces/{workspaceId}/issues | Use Idempotency-Key when a retry could create duplicates. |
| Update issue | PATCH /cli/v1/workspaces/{workspaceId}/issues/{issueIdentifier} | Updates allowed fields only. Planning fields must still belong to the accessible team/project. |
| Add comment | POST /cli/v1/workspaces/{workspaceId}/issues/{issueIdentifier}/comments | Use for script or agent handoff notes. Keep secrets and raw local paths out. |
| Read context | GET /cli/v1/workspaces/{workspaceId}/issues/{issueIdentifier}/context | Use before implementation planning. Response is structured, source-linked, and permission filtered. |
| Read linked development metadata | GET /cli/v1/workspaces/{workspaceId}/issues/{issueIdentifier}/github | Use for GitHub-linked PR, branch, and commit metadata visible to that issue. Do not treat it as a source-code API. |
| Read project context | GET /cli/v1/workspaces/{workspaceId}/projects/{projectId}/context | Use for delivery context that spans multiple issues. Project access and private-team filtering still apply. |
Use returned IDs instead of guessing
curl -s \
-H "Authorization: Bearer $VECTORGRAPH_CLI_TOKEN" \
"$VECTORGRAPH_API_URL/cli/v1/workspaces/$VECTORGRAPH_WORKSPACE_ID/teams"
{
"requestId": "req_01H...",
"teams": [
{
"id": "<team-uuid>",
"identifier": "ENG",
"name": "Engineering",
"visibility": "public"
}
]
}Read implementation context through CLI
# Requires context:read. The standard browser-created CLI token does not include it.
curl -s \
-H "Authorization: Bearer $VECTORGRAPH_CLI_TOKEN" \
"$VECTORGRAPH_API_URL/cli/v1/workspaces/$VECTORGRAPH_WORKSPACE_ID/issues/ENG-124/context"
{
"requestId": "req_01H...",
"bundle": {
"issue": { "identifier": "ENG-124" },
"permissionDecisions": [],
"redactions": [],
"freshness": { "generatedAt": "2026-05-15T04:00:00.000Z" }
}
}Leave a verifiable comment
curl -s -X POST \
-H "Authorization: Bearer $VECTORGRAPH_CLI_TOKEN" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: agent-handoff-ENG-124-001" \
-d '{
"body": "Verified with vectorgraph north verify --base main. Request IDs: req_01H..."
}' \
"$VECTORGRAPH_API_URL/cli/v1/workspaces/$VECTORGRAPH_WORKSPACE_ID/issues/ENG-124/comments"MCP workflows
Hosted VectorGraph MCP is for permissioned workspace work
An agent should discover capabilities first, read context before planning, mutate only through allowed tools, and request approval when the task crosses a denied or high-risk boundary.
| Workflow | Method or tool | Production guidance |
|---|---|---|
| Initialize | initialize | Confirms protocol version, server identity, and available capability classes. |
| Discover capabilities | tools/list, resources/templates/list, prompts/list | Capability discovery is permission-filtered. Missing tools are expected when policy denies them. |
| Read context | read_context_bundle or resources/read | Use for issue context before planning, editing, or summarizing work. |
| Search work | search_work | Use for accessible issue discovery. Results are filtered by workspace and team policy. |
| Mutate work | create_issue, update_issue, add_comment | Requires mcp:tools plus the action scope. Use idempotencyKey for retryable writes. |
| Execute an approved API operation | execute_api_operation | Discovery lists only operation IDs allowed by domain scopes. Writes require mcp:tools and idempotency; agent principals also need the tool grant and full visible-team coverage. |
| Request approval | request_approval | Use when a task needs a human decision or reaches a launch-denied action boundary. |
| Respect parity boundaries | committed approved operation IDs and explicit exclusions | Hosted MCP supports approved document/canvas and broader product operations, but never human identity/admin, billing, export/import, credential management, GitHub install, provider callback/secret/effect, public/requester, adapter, or browser SSE operations. |
Create an issue through hosted VectorGraph MCP
{
"jsonrpc": "2.0",
"id": "create-1",
"method": "tools/call",
"params": {
"name": "create_issue",
"arguments": {
"workspaceId": "<workspace-uuid>",
"teamId": "<team-uuid>",
"title": "Add retry telemetry",
"description": "Record retry reason, attempt count, and final result.",
"priority": "high",
"idempotencyKey": "create-retry-telemetry-001"
}
}
}Stop at risky boundaries
{
"jsonrpc": "2.0",
"id": "approval-1",
"method": "tools/call",
"params": {
"name": "request_approval",
"arguments": {
"workspaceId": "<workspace-uuid>",
"action": "Run production-impacting migration",
"reason": "The task touches workspace isolation and requires owner approval.",
"riskLevel": "critical"
}
}
}NorthGraph workflows
Use NorthGraph for local codebase evidence
After installing the public CLI, use NorthGraph before and after code edits to identify affected code, sensitive effects, policy failures, impacted tests, verification output, and limitations.
| Workflow | Command | Production guidance |
|---|---|---|
| Initialize repo policy | vectorgraph north init | Creates or prepares vectorgraph.north.json so the repo can define effect and review rules. |
| Build local index | vectorgraph north index --json | Generates local codebase facts for supported languages and config files. |
| Inspect before editing | vectorgraph north inspect <symbol> --json | Finds definitions, callers, effects, policy, and tests before the agent changes code. |
| Analyze risk | vectorgraph north diff analyze --base main --json | Shows changed files/symbols, new effects, policy failures, risk, and impacted tests. |
| Verify | vectorgraph north verify --base main --json | Runs configured verification commands and reports pass/fail with limitations. |
| Share evidence | vectorgraph north report pr --base main --out .vectorgraph/north/pr-report.json --json | Produces a structured report suitable for review or future VectorGraph evidence sync. |
Example vectorgraph north json policy
{
"version": 1,
"rules": [
{
"name": "recommendations cannot send email",
"paths": ["src/recommendations/**"],
"deniedEffects": ["email_send", "secret_read", "payment_operation"],
"requiredTests": ["ranking.test.ts"]
},
{
"name": "auth requires human review",
"paths": ["src/auth/**", "src/permissions/**"],
"risk": "critical",
"requiresHumanReview": true
}
]
}NorthGraph report shape
{
"reportId": "north_01H...",
"baseRef": "main",
"risk": "medium",
"policy": { "passed": true },
"changedFiles": ["src/recommendations/ranking.ts"],
"newEffects": [],
"impactedTests": ["ranking.test.ts", "email-alert-job-selection.test.ts"],
"verification": [
{ "command": "pnpm test ranking.test.ts", "status": 0 }
],
"limitations": []
}MCP
MCP exposes resources tools and prompts under the same policy model
Agents only see tools allowed by both token scopes and agent policy. Tool calls are audited with actor, workspace, tool, object, and request ID.
| Tool | Required scopes | Arguments |
|---|---|---|
search | vectorgraph:read OAuth grant and permission-filtered workspace access | query |
fetch | vectorgraph:read OAuth grant and access to the returned object | id |
execute_api_operation | mcp:read or mcp:tools, operation domain scopes, and agent allowed-tool grant | workspaceId, operationId, pathParameters?, query?, body?, idempotencyKey? |
search_work | mcp:read or issue:read | workspaceId, query?, teamId?, statusId?, assigneeUserId?, priority?, projectId?, sprintId?, labelId?, limit? |
create_issue | mcp:tools, issue:write, team:read | workspaceId, teamId, title, description?, priority?, statusId?, assigneeUserId?, idempotencyKey? |
update_issue | mcp:tools, issue:write | workspaceId, issueIdentifier, title?, description?, priority?, statusId?, assigneeUserId?, sprintId?, projectId?, idempotencyKey? |
add_comment | mcp:tools, comment:write | workspaceId, issueIdentifier, body, idempotencyKey? |
read_context_bundle | mcp:read, issue:read, context:read | workspaceId, issueIdentifier, mode? |
request_approval | approval:request | workspaceId, action, reason, riskLevel? |
Verify the MCP credential without claiming a live client
# Generate the client setup in the browser:
# Workspace console -> Integrations -> provider -> Connect client
# Manual fallback: Developer access -> Agents -> Create agent
export VECTORGRAPH_MCP_URL="https://app.example.com/mcp"
# Inject the workspace-specific variable through a local secret store.
: "${VECTORGRAPH_MCP_TOKEN_11111111111141118111111111111111:?workspace MCP token is not set}"
curl -s -X POST "$VECTORGRAPH_MCP_URL" \
-H "Authorization: Bearer $VECTORGRAPH_MCP_TOKEN_11111111111141118111111111111111" \
-H "Content-Type: application/json" \
-H "X-VectorGraph-MCP-Purpose: setup_verification" \
-d '{
"jsonrpc": "2.0",
"id": "init-1",
"method": "initialize",
"params": {}
}'Confirm what the agent is allowed to do
curl -s -X POST "$VECTORGRAPH_MCP_URL" \
-H "Authorization: Bearer $VECTORGRAPH_MCP_TOKEN_11111111111141118111111111111111" \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": "tools-1",
"method": "tools/list"
}'
{
"jsonrpc": "2.0",
"id": "tools-1",
"result": {
"tools": [
{ "name": "search_work" },
{ "name": "read_context_bundle" }
]
}
}Read an issue context bundle
curl -s -X POST "$VECTORGRAPH_MCP_URL" \
-H "Authorization: Bearer $VECTORGRAPH_MCP_TOKEN_11111111111141118111111111111111" \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": "ctx-1",
"method": "tools/call",
"params": {
"name": "read_context_bundle",
"arguments": {
"workspaceId": "<workspace-uuid>",
"issueIdentifier": "ENG-124",
"mode": "compact"
}
}
}'
{
"structuredContent": {
"contextBundle": {
"issue": { "identifier": "ENG-124" },
"comments": [],
"activity": [],
"knowledgeArtifacts": {
"documents": [{ "title": "Launch note", "bodyExcerpt": "..." }],
"canvases": [{
"title": "Launch map",
"textIndex": "Onboarding flow...",
"scene": {
"elementCount": 4,
"elements": [{ "type": "text", "text": "Onboarding flow" }]
}
}]
},
"permissionDecisions": [],
"redactions": [],
"requestId": "req_01H...",
"tokenEfficiency": { "mode": "compact" }
}
}
}Context bundles
Context bundles are the agent safe package of issue facts
They are not free-form summaries. They are structured, permission-filtered JSON with source IDs, timestamps, redaction markers, and request metadata.
- issue title, description, identifier, status, priority, assignee, team
- project, sprint, milestone, initiative, customer request, label, SLA, and parent/child planning metadata where accessible
- queryable context fields such as intent, expected outcome, architecture constraint, evidence summary, success metric, guardrail metric, outcome, and learning
- comments and activity/history with actor type
- attachment metadata only, not raw file bytes
- linked document excerpts and canvas text/scene metadata for accessible workspace docs, canvases, issues, projects, and initiatives
- issue relations and accessible external links
- source object IDs, timestamps, requestId, and freshness metadata
- permission decisions and redaction markers
Permissions
A token never gives more access than the actor has in the workspace
Use this table to decide whether a failed request is missing membership, object access, token scope, or agent policy.
| Action | Human rule | Agent rule |
|---|---|---|
| Read issue | workspace membership + team visibility | issue:read + allowed team |
| Create issue | member-or-higher role with team access | issue:write + team:read + create_issue tool |
| Add comment | issue access + comment permission | comment:write + add_comment tool |
| Read context bundle | issue access; exposed through supported surfaces | context:read + read_context_bundle tool; optional compact mode keeps source IDs, policy metadata, and linked doc/canvas summaries |
| Use saved views and canonical worklists | workspace membership + view visibility + team filters | issue:read through search_work subset |
| Read or update workspace docs/canvases | workspace membership + shared-object access; member+ for writes where implemented | artifact:read or artifact:write through an approved CLI/MCP operation, plus workspace and object access |
| Create templates, recurring issues, planning records, or SLA rules | member/admin/owner role plus plan and object checks | the operation's planning, issue, or SLA scope through the approved CLI/MCP registry; role and plan checks still apply |
| Read search, notifications, Feed, Insights, or exports | workspace membership with private-team/object filtering; export is owner/admin | search/fetch or the approved CLI/MCP operation with the required read scope; privileged exports remain excluded |
| Manage CLI tokens, agent identities, GitHub, billing, or members | role-specific owner/admin/member checks | admin, billing, export, security, and github install scopes denied in launch |
| Admin, billing, exports, members, GitHub install management | owner/admin only where implemented | denied in launch |
Runtime contracts
Production clients must handle more than the happy path
Every integration should be written around request IDs, pagination, idempotency, structured errors, permission-filtered not_found responses, and rate-limit backoff.
| Contract | Required behavior |
|---|---|
| Request IDs | Keep requestId from success and failure responses. It is the first debugging handle for support, audit, and incident review. |
| Pagination | List clients must handle pageInfo and server-enforced limits. Do not assume a single response contains all workspace data. |
| Idempotency | Retryable creates and MCP mutations should send an idempotency key. Reusing a key with different input is a conflict. |
| Structured errors | Branch on error.code, not message text. Messages are for humans and may change. |
| 429 handling | Clients must treat rate limits as retryable only after backoff. Do not tight-loop CLI or MCP calls. |
| 404 behavior | not_found can mean missing or intentionally hidden by permissions. Do not infer private object existence. |
| Version conflicts | Document and canvas updates should pass the expected version number. A conflict means reload and reconcile before retrying. |
| Plan enforcement | Billing, issue creation, private teams, exports, Signals, customer requests, Insights, and SLA actions may return 402 when the plan blocks the operation. |
| Programmatic parity | The workspace UI intentionally has broader product controls than CLI/MCP for docs, canvases, admin, billing, exports, and GitHub installation management. |
Handle stable error codes
{
"error": {
"code": "agent_team_denied",
"message": "Agent is not allowed to access this team.",
"requestId": "req_01H..."
}
}
// Client behavior:
// 1. Preserve requestId.
// 2. Branch on error.code.
// 3. Do not retry with a broader token unless a human changes policy.
// 4. Treat not_found as possibly permission-filtered.Security checklist
Keep the same boundaries across humans scripts and agents
Programmatic access should never become a shortcut around workspace membership, private teams, source privacy, or human accountability.
| Control | Required behavior |
|---|---|
| Least privilege | Grant only the scopes, teams, and tools the script or agent needs for the current job. |
| No browser scraping | Use CLI/MCP contracts for programmatic work. Browser UI is for humans and setup/review. |
| No token leakage | Keep tokens out of prompts, source, issue comments, logs, screenshots, and generated reports. |
| Private-team safety | Treat missing data as possibly permission-filtered. Never ask a broader token to work around private-team denials. |
| Source privacy | NorthGraph keeps source local by default. Do not upload source snippets, local paths, or terminal output without approval. |
| Knowledge privacy | Docs, canvases, search results, artifact links, context bundles, exports, Feed, and notifications must be workspace scoped and private-team filtered. |
| Plan and admin boundaries | Do not hand an agent billing, export, member-management, GitHub installation, or security-admin work in launch. |
| Human accountability | Agent credentials are owned by a human. Risky boundaries should request approval instead of proceeding. |
Handoff
A useful agent handoff includes evidence not just prose
Humans need to see what context was read, what changed, what verification ran, what failed, and what still needs approval. Keep request IDs and report IDs attached.
Before marking agent work ready
- Record the VectorGraph context bundle requestId.
- Record the NorthGraph report ID or command output summary.
- List changed files, new effects, and policy results.
- List verification commands and results.
- Call out limitations, skipped checks, and approval-required work.
Production ready agent handoff template
Agent handoff for ENG-124
Context read:
- VectorGraph context bundle: req_01H...
- NorthGraph report: north_01H...
Changes:
- Files changed:
- New effects:
- Risk:
Verification:
- Commands run:
- Results:
- Limitations:
Follow-up:
- Approval required:
- Remaining risks:Troubleshooting
Debug with actor scope workspace and request ID first
Most production failures are credential, scope, workspace, private-team, idempotency, or missing-context problems. These cases should be diagnosable without exposing secrets.
| Symptom | Likely cause | Fix |
|---|---|---|
| Token works locally but fails in CI | CI secret has whitespace, wrong token, expired token, or a different VECTORGRAPH_API_URL. | Print only token prefix, call /cli/v1/me, compare workspaceId and scopes, then rotate if exposed. |
| MCP tools/list is missing a tool | The agent credential lacks scope, allowedTools entry, team access, or owner membership. | Inspect the integration and agent policy. Reissue the client credential or sync an approved policy; do not assume the standard form has a tool picker. |
| Issue exists in UI but API returns not_found | The issue is in a private team, another workspace, or the token owner lacks access. | Use workspaceId from /cli/v1/me and verify team access. Do not infer private issue existence. |
| Create request duplicated work | Retry happened without an idempotency key or with different input. | Use a stable Idempotency-Key for the exact request body and handle idempotency_key_conflict. |
| NorthGraph reports unexpected risk | The diff introduced or touched a sensitive effect, protected path, policy rule, or required test. | Inspect the report limitation/policy fields, then either change the code or ask a human to approve the risk. |
| Agent gives generic plans | The agent did not read a context bundle or local NorthGraph facts before planning. | Require read_context_bundle and relevant north inspect/diff commands before accepting a plan. |
| Document or canvas save shows conflict | Another client saved a newer version after the current editor loaded. | Reload the latest artifact version, compare the changes, and retry with the current expectedVersionNumber. |
| Feature returns 402 | The workspace plan has reached a limit or the feature requires a higher plan. | Check Admin -> Billing and current usage before retrying the action or downgrade. |
| Search misses a document or canvas | The artifact is archived, not linked as expected, not indexed yet, or permission-filtered for the caller. | Check collection/archive state, linked objects, workspace membership, private-team access, and search indexing health. |
Glossary
Terms used across the docs
Use these exact meanings in prompts, scripts, issue comments, handoffs, and support reports.
| Term | Meaning |
|---|---|
| workspace_id | Tenant boundary for workspace-owned data. |
| team_id | Execution group inside a workspace. Private teams require explicit membership. |
| issueIdentifier | Human-facing issue key such as ENG-124. |
| requestId | Stable request/debug identifier returned by API, CLI, and MCP surfaces. |
| context bundle | Permission-filtered structured JSON package of issue/project facts for humans and agents. |
| saved view | Stored worklist query, grouping, sorting, filters, and visibility for a workspace or user. |
| workspace document | Versioned, reviewable workspace knowledge record that can link to work and planning artifacts. |
| canvas | First-party visual workspace artifact stored as VectorGraph-owned scene JSON with version history. |
| artifact link | Permission-checked link between docs, canvases, issues, projects, and initiatives. |
| template | Reusable issue, form, project, or document starting point. |
| SLA rule | Workspace rule that evaluates customer/request timing risk. |
| Feed entry | Workspace activity item for project and initiative execution updates. |
| NorthGraph report | Local verification report summarizing changed files, risk, policy, tests, limitations, and evidence. |
| agent identity | Non-human actor with accountable owner, scoped credential, allowed tools, and allowed teams. |
| hosted VectorGraph MCP | The /mcp endpoint for workspace records and work-management tools. |
| local NorthGraph MCP | The local MCP server started by the VectorGraph CLI with vectorgraph north mcp. |
Recipes
Use these sequences as implementation templates
The examples show the intended order of operations. Verify actor state first, then read context, then mutate with idempotency when retries are possible.
Create an issue from a script
- GET /cli/v1/me and confirm workspaceId and scopes.
- GET /cli/v1/workspaces/{workspaceId}/teams and choose an accessible team.
- POST /cli/v1/workspaces/{workspaceId}/issues with Idempotency-Key.
- Store the returned issueIdentifier for branch naming or follow-up comments.
Let an agent prepare implementation context
- Create an MCP credential with mcp:read, issue:read, context:read.
- Allow the read_context_bundle tool and only the teams it should see.
- Call tools/list to confirm the tool is discoverable.
- Call read_context_bundle and pass the returned JSON to the agent.
Errors
Handle errors by code not by prose message
HTTP and CLI responses use a stable error object. MCP returns JSON-RPC errors with a stable data.code and data.status.
| Code | Status | Meaning |
|---|---|---|
| unauthorized | 401 | The bearer token is missing. |
| invalid_token | 401 | The token is expired, revoked, or malformed. |
| scope_denied | 403 | The token does not include a required scope. |
| workspace_scope_denied | 403 | The token is scoped to another workspace. |
| agent_tool_denied | 403 | The agent identity is not allowed to use that MCP tool. |
| agent_team_denied | 403 | The agent identity is not allowed to access that team. |
| permission_denied | 403 | The actor is authenticated but cannot access the object. |
| not_found | 404 | The object is missing or intentionally hidden. |
| idempotency_key_conflict | 409 | The same idempotency key was reused with different input. |
| document_version_conflict | 409 | The document changed since the client version being updated or restored. |
| canvas_version_conflict | 409 | The canvas changed since the client version being updated or restored. |
| plan_limit_exceeded | 402 | The workspace has reached a limit for its current plan. |
| plan_upgrade_required | 402 | The requested capability requires a higher workspace plan. |
Troubleshooting
Common failure modes
Most failures are scope, workspace, team-policy, or credential issues. Always keep the requestId from failed calls.
| Symptom | Likely cause | Fix |
|---|---|---|
| CLI calls return unauthorized, invalid_token, or scope_denied. | The bearer is missing, expired, revoked, malformed, or lacks workspace:read. | Call GET /cli/v1/me with the same Authorization header and inspect error.code and requestId. |
| MCP tool is missing or returns agent_tool_denied. | The agent is missing a tool grant, team grant, or scope. | Compare tools/list output with the intended tool, then check allowed tools, allowed teams, and token scopes. |
| An issue exists in the UI but API/MCP returns not_found. | The issue belongs to a private team or another workspace. | Use the exact workspaceId from /cli/v1/me and verify team access before treating it as missing data. |
| Saving a document or canvas returns document_version_conflict or canvas_version_conflict. | Another browser tab or collaborator saved a newer document or canvas version. | Reload the artifact, compare the latest version, and retry with the current expectedVersionNumber. |
| Billing, issue creation, private teams, exports, Signals, customer requests, Insights, or SLA actions return 402. | The workspace plan blocks the requested action or downgrade. | Open Admin -> Billing, check current usage, then upgrade or reduce usage before retrying. |