Set up AgentKit with your coding agent
Add Scalekit Agent Auth to your codebase using Claude Code, Codex, GitHub Copilot CLI, Cursor, or any of 40+ coding agents.
Install the authstack plugin into your coding agent and paste one prompt. The agent generates client initialization, connected account management, OAuth authorization, and token handling — no boilerplate required.
Before you start
Section titled “Before you start”- A Scalekit account at app.scalekit.com
- A connector configured under AgentKit > Connections (for example,
gmail) - Your API credentials from Developers → API Credentials
Pick your coding agent
Section titled “Pick your coding agent”npx @scalekit-inc/cli setupFor repeated use: npm install -g @scalekit-inc/cli then scalekit setup.
The CLI installs the authstack plugin (including Agent Auth skills) for your editor. Complete any browser OAuth prompt for the Scalekit MCP server.
Then paste the implementation prompt (or describe your goal naturally).
After the CLI (or if you prefer tool-native flows):
- Claude Code / Copilot: marketplace + plugin install is handled by the CLI.
- Cursor / Codex: plugins are installed locally by the CLI.
- 40+ agents: use the skills option in the CLI or
npx skills add scalekit-inc/authstack --skill integrating-agentkit.
Use the prompt below.
Verify the setup
Section titled “Verify the setup”- Set environment variables — copy
SCALEKIT_CLIENT_ID,SCALEKIT_CLIENT_SECRET, andSCALEKIT_ENV_URLfrom the dashboard → API Credentials. - Trigger the authorization flow — run the generated example and confirm the browser redirects to the connector’s consent page.
- Fetch a token — after consent, call the token-fetch function and confirm you receive a valid response.
Troubleshooting
Section titled “Troubleshooting”The agent generated code for a connector I haven’t configured yet
The plugin uses the connector name you provide in the prompt. If that connector isn’t configured in your Scalekit Dashboard, the OAuth flow will fail at runtime with a “connector not found” error.
Fix: in the Scalekit Dashboard, go to AgentKit > Connections > Create Connection, finish the connection, then re-run the agent prompt with the exact connection name from the dashboard.
I want to swap connectors after the initial generation
Re-run the implementation prompt with the new connector name. The agent updates the connector reference in the client initialization and regenerates the token-fetch call. Existing connected accounts for the old connector are not affected.
The scaffolded code references an SDK version that doesn’t match my lockfile
The plugin targets the latest stable Scalekit SDK. If your lockfile pins an older version, either upgrade the SDK (npm install @scalekit-sdk/node@latest or equivalent) or ask the agent to regenerate using your pinned version by adding “use SDK version X.Y.Z” to the prompt.