Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Saif

15 posts by Saif

Build a multi-agent email triage crew with CrewAI

CrewAI lets you split complex workflows across specialized agents, but each agent still needs authenticated access to user tools like Gmail. This cookbook shows how to wire Scalekit OAuth into a CrewAI crew via MCP, then build a three-agent pipeline that scans, classifies, and drafts replies to a user’s unread emails.

Sync B2B billing with Scalekit and Chargebee

B2B billing breaks when your auth org model and Chargebee customer records drift apart. This cookbook shows how to use the Scalekit organization ID as the billing reference, provision Chargebee customers on org creation, run hosted checkout, and reconcile subscription state from Chargebee webhooks.

FastRouter + Scalekit tool calling

Connect FastRouter’s OpenAI-compatible API to per-user OAuth tools via Scalekit. The agent discovers available tools, runs an agentic loop through FastRouter, and executes each tool call via Scalekit — no per-integration OAuth code required.

Build a Mastra agent with Scalekit AgentKit tools

Mastra agents need tools. Each third-party API — Gmail, Slack, Calendar — means another OAuth flow, another token store, another refresh cycle. This recipe connects a Mastra agent to Scalekit AgentKit tools using the Node SDK, with automatic authorization and token refresh.

Trace AgentKit tool calls in LangSmith

Scalekit AgentKit returns native LangChain StructuredTool objects. Enable LangSmith tracing and every tool call — Gmail fetches, Slack messages, GitHub searches — appears as a traced span automatically. This recipe walks through setup, a working agent, and verifying traces in the LangSmith dashboard.

Apify Actor with per-user OAuth via Scalekit

Apify Actors run in isolated containers with no persistent session — there is no concept of “who is logged in.” This recipe shows how to use Apify’s built-in user identity as the key into Scalekit’s OAuth token vault, so each user who runs your Actor connects their own third-party accounts, and tokens survive across runs without any user-managed input fields.

M2M JWT verification with JWKS and OAuth scopes

Machine-to-machine access tokens are JWTs signed by Scalekit. Your API verifies signatures using the published JWKS at /keys, then authorizes requests using the scopes embedded in each token. This cookbook ties those ideas together end to end.

Enforce seat limits with SCIM provisioning

When your customer’s identity provider pushes more users than your plan allows, SCIM won’t stop it. This cookbook shows how to track provisioned users per organization, block creation when the quota is hit, and notify admins — using two webhook events and a counter in your database.

Build a multi-user GitHub PR summarizer agent

Build a GitHub PR summarizer that ranks the most-discussed pull requests in a repository and writes plain-language summaries. The secure version of this recipe binds each GitHub connection to a server-side session and never accepts a user ID from the browser.

Build a daily briefing agent with Vercel AI SDK and Scalekit Agent Auth

Connecting an agent to two external APIs means handling two separate OAuth tokens, two authorization flows, and two different error surfaces. This recipe shows how Scalekit manages the OAuth lifecycle for both connectors, then demonstrates two patterns for calling those APIs: fetching a token and calling the REST API directly, versus letting Scalekit execute the call through a built-in action.

Search Scalekit docs with ref.tools

Switching to a browser to look up Scalekit docs breaks your coding flow. This cookbook shows you how to configure the ref.tools MCP server so your AI coding assistant can search Scalekit documentation inline — in Cursor, Claude Code, Windsurf, or any MCP-compatible client.

Add Enterprise SSO to Next.js with Auth.js

Every enterprise customer wants their own IdP — Okta, Azure AD, Google Workspace. Handling SAML handshakes and per-tenant routing before you’ve shipped a feature is exhausting. This cookbook shows how to delegate that complexity to Scalekit and use Auth.js to own the session layer, so enterprise SSO is an afternoon, not a sprint.

Build an agent that books meetings and drafts emails

Building a scheduling agent means coordinating authentication to two separate tools — Google Calendar and Gmail — then chaining their outputs in one workflow. Without managed OAuth, each connector requires its own token lifecycle and error-handling logic. This recipe shows how Scalekit handles auth per connector so your agent can focus on finding a free slot, creating the event, and drafting the confirmation.