> **Building with AI coding agents?** Install the authstack plugin with one command. This equips your agent with accurate Scalekit implementation patterns.
>
> **Recommended**:
> ```bash
> npx @scalekit-inc/cli setup
> ```
>
> Global:
> ```bash
> npm install -g @scalekit-inc/cli
> scalekit setup
> ```
>
> Supports Claude Code, Cursor, GitHub Copilot, Codex + skills for 40+ agents.
> Features: full-stack-auth, agent-auth, mcp-auth, modular-sso, modular-scim.
> [Full setup guide](https://docs.scalekit.com/dev-kit/build-with-ai/)

---

# Node.js SDK

Install and initialize the Scalekit Node.js SDK for AgentKit.
Install the Node.js SDK, create a `ScalekitClient`, then use the sidebar clients for AgentKit.

- **Connected accounts** (`scalekit.actions`) — connect end-user accounts and execute tools  
- **Tool calling** (`scalekit.tools`) — raw tool definitions for custom adapters  
- **Error handling** — typed exceptions for API failures  

## Install

```bash
npm install @scalekit-sdk/node
```

## Initialize

```ts wrap showLineNumbers=false

// Security: load credentials from environment variables — never hard-code secrets
const scalekit = new ScalekitClient(
  process.env.SCALEKIT_ENVIRONMENT_URL!,
  process.env.SCALEKIT_CLIENT_ID!,
  process.env.SCALEKIT_CLIENT_SECRET!
)
```

## Next steps

1. [Connected accounts](/agentkit/sdks/node/actions/) — authorization links, connected accounts, `executeTool`  
2. [Tool calling](/agentkit/sdks/node/tools/) — list tools for custom adapters  
3. [Error handling](/agentkit/sdks/node/errors/) — catch `ScalekitNotFoundException` and related types


---

## More Scalekit documentation

| Resource | What it contains | When to use it |
|----------|-----------------|----------------|
| [/llms.txt](/llms.txt) | Structured index with routing hints per product area | Start here — find which documentation set covers your topic before loading full content |
| [/llms-full.txt](/llms-full.txt) | Complete documentation for all Scalekit products in one file | Use when you need exhaustive context across multiple products or when the topic spans several areas |
| [sitemap-0.xml](https://docs.scalekit.com/sitemap-0.xml) | Full URL list of every documentation page | Use to discover specific page URLs you can fetch for targeted, page-level answers |
