integrating-agentkit
AgentKit Integration
Scalekit handles the full OAuth lifecycle — authorization, token storage, and refresh — so agents can act on behalf of users in Gmail, Slack, Notion, Calendar, and other connectors.
Required env vars: SCALEKIT_CLIENT_ID, SCALEKIT_CLIENT_SECRET, SCALEKIT_ENVIRONMENT_URL
→ Get from app.scalekit.com: Developers → Settings → API Credentials
→ Some docs/samples use SCALEKIT_ENV_URL for the same URL value; in this skill use SCALEKIT_ENVIRONMENT_URL.
Key concept — connection name: Every connector has a dashboard Connection Name — the exact string set when creating the connection. Pass it in every SDK call: Python connection_name=..., Node connectionName: '...'. It may differ from the connector slug (e.g. slug "gmail" but name "MY_GMAIL_PROD"). Always use the dashboard value, never invent a slug.
Guardrails
- MUST pass the exact dashboard Connection Name in every SDK call (
connection_namein Python,connectionNamein Node) — never guess it from the connector slug, and never use aconnectorfield for that value. - MUST read credentials from
SCALEKIT_CLIENT_ID/SCALEKIT_CLIENT_SECRET/SCALEKIT_ENVIRONMENT_URLenv vars; MUST NOT hardcode secrets in source. - MUST NOT create authorization links for any non-Gmail connector before it is configured in the dashboard — the call will fail.
Setup
Install the SDK and initialize the client: