Three things, one per question:
Its slug is what kortix connectors call <slug> <action> takes. An app is
installed once per way.
workspace or private to one member. One profile holds several.
tool rules, given to an agent in agents.<name>.policy_sets.
Every call is decided in this order. The first layer with a matching rule
decides:
policies: (nothing overrides them);policies:;sensitive: true → approval;policy.default_mode.The gateway holds every credential, applies these rules, runs the call, and
audits it. The sandbox carries only KORTIX_TOKEN.
kortix connectors ls: slugs, status, and anACCOUNTS column.
```sh
kortix connectors catalog installed as <slug> = it is already here
kortix connectors catalog install
kortix connectors connect
```
Install prints the next step. Ready means no sign-in is needed: call it.
Exit 3 means the app is already installed: use that slug. When the human
finishes signing in, Kortix tells you; do not mint a second link.
For an account the whole workspace uses, connect <slug> --owner workspace.
A trigger or automation runs only on that shared account: for one, mint
the --owner workspace link (tool: for_trigger=true) and only that one.
Never post a private link first and a shared one after it.
Every member may connect their own account. A shared one
(--owner workspace) needs workspace.connector.connections.manage: a
declared agent holds it through its kortix_permissions, My Kortix through
its person's role (an owner, admin or manager). A refusal names the missing
permission and who holds it.
<accounts>). With 2 or more accounts, pass--account "<label>".
kortix connectors show <slug>.<action>prints its input schema. The description says which filters run on the
server.
```sh
kortix connectors call
jq expression for a lookup. For grouping,date windows or several metrics, write one bun -e or python3 script.
Other reads: kortix connectors discover "<intent>" searches actions;kortix connectors policy <slug> effective shows what each tool does for you
and which layer decided.
Never assume one profile means one account. Never infer accounts from aget_profile/whoami call: it answers only for the account it ran as.
Every time you call a profile you have not listed accounts for:
kortix connectors accounts <slug> lists them, default first.--account <label|id|me|project>(me = your own private default, project = the shared default).
pinned the call is refused (account_required). A human pins a default
with kortix connectors accounts <slug> --default <label>.
Report which account ran when it could matter: read the result's account.
$ kortix connectors accounts gmail
LABEL CONNECTED AS OWNER DEFAULT CONNECTION ID
personal@example.com personal@example.com private no 11111111-…
work@example.com work@example.com private no 22222222-…
Asked "check my gmail" here, ask which mailbox. Told "the work one", call
with --account "work@example.com" and say "Checked work@example.com — …".
Another account ("connect my other Gmail"): mint a link with a label,kortix connectors connect <slug> --label "Personal Gmail". The human names
the account and chooses who can use it; you are told its name. Never install
a second profile to get a second account.
Email inboxes are accounts of kortix_email. Kortix fills in inbox_id:
kortix connectors accounts kortix_email
kortix connectors call kortix_email reply_message \
'{"thread_id":"<thread-id>","message_id":"<message-id>","text":"Reply text"}' \
--account "<inbox address>"
A rule may hold a call for a human. Pass --reason "<what this does>" on
every write whose args are only ids (send_draft: who it goes to, the
subject, the body; a delete: what goes). The approver sees it next to the
args.
A held call returns approval_url: share it, then stop the turn. Approve
runs the call once, as you, and your next prompt carries the result. Do not
repeat the call: a repeat while it waits returns the same execution_id. A
deny, and any message with it, also arrives as your next prompt. A deny with
a message is an instruction. kortix review show call:<execution_id> shows
the decision and detail.run (the run state and a redacted result).
Read approval_instructions every time. When the response has noruns_on_approval (an older or unscoped token), approval alone does not run
the call: when the prompt says approved, repeat the exact same call (same
arguments and --account) within 15 minutes, and that call runs once. In a Slack or Teams session Kortix posts the
approval card in the thread (approval_instructions says so): do not repost
the link.
Search the catalog first:
kortix connectors catalog gmail # one row per app
kortix connectors catalog crm --kind mcp,composio # kortix, mcp, composio, openapi, graphql
kortix connectors catalog notes --one-click # apps the human connects by signing in
kortix connectors catalog show kortix:gmail # every way to connect it + its tools
Ways to connect, best first (the first is marked recommended):
kind: kortix): the channels Slack, Microsoft Teams,Email, Telegram and Discord, and Computer. They are never installed. The
human sets them up: kortix channels connect (Slack; --platform teams),kortix channels email inboxes add, Telegram and Discord on their web
pages, Computer
with npx --yes @kortix/agent-tunnel@latest connect on that machine or
the desktop app;
Google Calendar, Drive, Docs and Sheets (kortix:gmail,kortix:google_calendar, …: Composio's tool names and arguments, so a
Composio skill or rule works unchanged); the human only signs in;
(OpenAPI) and GraphQL APIs: they need a key or token after install.
kortix connectors catalog install kortix:linear
kortix connectors catalog install kortix:gmail --name "Support inbox"
kortix connectors catalog install <id> --way <way-id>
Install is idempotent: the same app the same way exits 3 and names the slug
it already has. --new-profile makes a second profile; use it only for a
human who asks for one. Another way of connecting (Stripe over MCP and over
REST) is its own profile: different tools, different sign-in.
The catalog is an index, not a list of what may be connected. Prefer the
vendor's own MCP server over Composio whenever it exists. A way markedcatalogue has no URL installs with the server URL: get it from the human or
the vendor's docs, thenkortix connectors catalog install <id> --way <way-id> --url <url>.
The catalog is large, not complete. When it lacks the app, search the web for
the vendor's MCP server (its developer docs, registry.modelcontextprotocol.io)
or OpenAPI spec, then add it:
kortix connectors add acme --provider mcp --url https://mcp.acme.com/mcp --transport http --apply
kortix connectors add acme --provider openapi --spec https://acme.com/openapi.json --apply
Without --apply, add edits the kortix.yaml of the clone you are in
(kortix workspaces clone; /workspace has none at boot), landed through a change request. A
server URL that neither the catalog publishes nor the workspace already has
needs a one-time approval of that exact URL: the answer iscustom_connector_needs_human with a setup_url. Hand the human the link;
it opens the server prefilled, and adding it is the approval. Do not retry.
Credentials:
kortix secrets set NAME=- --scope connector,then kortix connectors secret <slug> NAME;
kortix secrets request NAME --scope connector;secret): `kortix connectors credential
--token-url
secret on stdin. Kortix fetches and refreshes the tokens.
Pipedream exists only for rollback compatibility with already-declared
connectors. Never add one. If the
catalog and the web have nothing, stop, explain the gap, and ask the human.
A rule set is a named rule list on one profile (connectors[].policy_sets).
Give an agent one with agents.<name>.policy_sets: { <slug>: <set> }. A
caller with no set (a person's token, a script, a trigger poll) gets the base
rules. A subagent in your session (agent tool, session: "same") runs
under your set; a named subagent in its own session runs under its own
agent's set.
connectors:
- slug: gmail
provider: mcp
url: https://google.mcp.kortix.com/gmail
policy_sets:
read_only:
description: Read and search, never send
policies:
- match: send_*
action: block
agents:
support:
tools: "*"
connectors: [gmail]
policy_sets:
gmail: read_only
Each command commits kortix.yaml on the default branch and syncs:
kortix connectors policy-sets gmail ls # sets + the agents that use each
kortix connectors policy-sets gmail create read_only --template read-only # or ask-before-writes
kortix connectors policy gmail --policy-set read_only set "send_*" block # ls, set, rm, clear
kortix connectors policy gmail effective --policy-set read_only # what each tool does now
kortix connectors policy-sets gmail rename read_only readonly # agents move with it
kortix connectors policy-sets gmail rm readonly # refused while an agent uses it
kortix agents scope support --policy-set gmail=read_only # gmail=base removes the entry
kortix connectors agents gmail # who calls gmail, with which set
kortix connectors rules # every agent × every profile
--template read-only blocks every tool that is not a read;ask-before-writes asks for them. Unknown-risk tools count as writes.
Check the result with policy <slug> effective.
[a-z0-9][a-z0-9_-]{0,63}; base is reserved. Channel profilesand computer hold no sets.
policy_sets needs workspace.agent.write ANDworkspace.connector.write. Without both in your own grant you cannot change
any entry, your own included (403 agent_grant_escalation): ask the human.
list_connectors (MCP) shows policy_set per profile: the set YOUR agentruns under, null for base rules.
Use @kortix/sdk for dependent calls, pagination, branching, retries, or
reusable scripts. references/sdk.md has the full pattern.
import { createKortix } from '@kortix/sdk';
const kortix = createKortix({
backendUrl: process.env.KORTIX_API_URL!,
getToken: async () => process.env.KORTIX_TOKEN ?? null,
});
const connectors = process.env.KORTIX_PROJECT_ID
? kortix.project(process.env.KORTIX_PROJECT_ID).connectors
: kortix.connectors;
const result = await connectors.call(
'kortix_email.reply_message',
{ thread_id: '<thread-id>', message_id: '<message-id>', text: 'Reply text' },
{ account: '<inbox address>' },
);
if (!result.ok) throw new Error(`Call failed: ${result.reason ?? result.status ?? 'unknown'}`);
Run scripts with bun run path/to/script.ts. Keep provider credentials out
of code and repository files.
App, Convex backend and external-program code calls connectors through@kortix/sdk too. Never give that code a provider key when a connector
exists: a raw key skips rules, approvals and audit. The Kortix credential
decides which accounts a call reaches:
| Where the code runs | Credential | Reaches |
|---|---|---|
| App, browser | backendUrl: '/_kortix/api/v1' + kortixAppViewerToken() (App set to --viewer api) | the viewer's shared and private accounts |
| App, server | createAppViewerKortix(request, { backendUrl }) | the same, per request |
| Convex action, App job with no viewer | a service account bearer (kortix_sa_…) in an env var | shared accounts nobody narrowed; never a private one |
| External program, CI | a personal access token, kortix tokens new <name> --workspace <id> | the token owner's shared and private accounts |
A service account is a human step: ask the person to runkortix tokens service-accounts new <name> andkortix access grant --service-account <id> --role member --workspace <id>,
and to store the bearer (npx convex env set KORTIX_API_KEY … for Convex; a
workspace secret under apps.<slug>.secrets for an App, not named KORTIX_*).
Build the rest while you wait. Recipes: references/sdk.md.
default mode. A policy_block (with policy_set when your set decided)
or policy_set_missing is final: tell the human which set blocked which
action. Never route around it through another profile, account, or raw key.
them with kortix connectors accounts <slug>.
connect --label. Otherrules for one agent → a rule set. Never a duplicate profile.
denied, not_shared, needs_auth, account_required,tool_error and ok: false as real outcomes. call exits 1 on them. Do
not retry blind.
@kortix/sdk for durable workflows andfor App, backend and program code. Never use raw provider tokens.
rm --apply, add --apply, catalog install and the policy andpolicy-sets commands change kortix.yaml on the default branch at once,
with no change request. Run them only for what the human asked. To propose
a change for review, edit kortix.yaml in your clone and open a change
request; merging one that changes connectors, policies or policy
needs workspace.connector.write.
kortix.yaml(headers: included) or .env. Store it with kortix secrets set orkortix secrets request (Credentials above). A change request whose commits
add one does not merge (409 CR_SECRET_DETECTED).