Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/images/providers/dark/scalekit.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/images/providers/light/scalekit.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions src/images/providers/scalekit-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions src/oss/python/integrations/tools/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ The following platforms provide access to multiple tools and services through a
| Tool/Toolkit | Number of Integrations | Pricing | Key Features |
|-------------|----------------------|---------|--------------|
| [Composio](/oss/integrations/tools/composio) | 500+ | Free tier available | OAuth handling, event-driven workflows, multi-user support |
| [Scalekit](/oss/integrations/tools/scalekit) | 80+ | Free tier available | Delegated OAuth, token vault, multi-user support, LangSmith tracing |

## All tools and toolkits

Expand Down Expand Up @@ -236,6 +237,7 @@ The following platforms provide access to multiple tools and services through a
<Card title="Riza Code Interpreter" icon="link" href="/oss/integrations/tools/riza" arrow="true" cta="View guide" />
<Card title="Robocorp Toolkit" icon="link" href="/oss/integrations/tools/robocorp" arrow="true" cta="View guide" />
<Card title="Salesforce" icon="link" href="/oss/integrations/tools/salesforce" arrow="true" cta="View guide" />
<Card title="Scalekit" icon="/images/providers/scalekit-icon.svg" href="/oss/integrations/tools/scalekit" arrow="true" cta="View guide" />
<Card title="SceneXplain" icon="link" href="/oss/integrations/tools/sceneXplain" arrow="true" cta="View guide" />
<Card title="ScrapeGraph" icon="link" href="/oss/integrations/tools/scrapegraph" arrow="true" cta="View guide" />
<Card title="Scrapeless Crawl" icon="link" href="/oss/integrations/tools/scrapeless_crawl" arrow="true" cta="View guide" />
Expand Down
228 changes: 228 additions & 0 deletions src/oss/python/integrations/tools/scalekit.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,228 @@
---
title: "Scalekit integration"
description: "Integrate with 80+ prebuilt OAuth connectors through Scalekit AgentKit using LangChain Python."
---

[Scalekit](https://scalekit.com) AgentKit is an integration platform that provides 80+ prebuilt OAuth connectors for services like Gmail, Slack, GitHub, Salesforce, and more. It gives AI agents authenticated access to external tools through delegated OAuth, a managed token vault, and a native LangChain adapter that returns `StructuredTool` objects.

## Overview

### Integration details

| Class | Package | Serializable | JS support | Version |
|:---|:---|:---:|:---:|:---:|
| ScalekitClient | [`scalekit-sdk-python`](https://pypi.org/project/scalekit-sdk-python/) | ❌ | ❌ | ![PyPI - Version](https://img.shields.io/pypi/v/scalekit-sdk-python?style=flat-square&label=%20) |

### Tool features

- **80+ prebuilt connectors**: Gmail, Slack, GitHub, Salesforce, Jira, HubSpot, Linear, Notion, and more
- **Delegated OAuth**: Scalekit manages the full OAuth flow, token refresh, and credential storage
- **Multi-user support**: Scope tools per user via the `identifier` parameter
- **Connector filtering**: Load tools by `connection_names`, `tool_names`, or `providers`
- **LangSmith compatible**: Works with [LangSmith](/langsmith/home) tracing out of the box

## Setup

The integration lives in the `scalekit-sdk-python` package. The LangChain adapter is included and lazy-loaded when you access `actions.langchain`.

<CodeGroup>
```python pip
pip install -U scalekit-sdk-python langchain
```
```python uv
uv add scalekit-sdk-python langchain
```
</CodeGroup>

### Credentials

You need Scalekit API credentials. Sign up at [app.scalekit.com](https://app.scalekit.com) and find your credentials under **Settings** and **API Credentials**.

```python Set credentials icon="key"
import getpass
import os

if not os.environ.get("SCALEKIT_ENVIRONMENT_URL"):
os.environ["SCALEKIT_ENVIRONMENT_URL"] = getpass.getpass("Enter your Scalekit environment URL: ")

if not os.environ.get("SCALEKIT_CLIENT_ID"):
os.environ["SCALEKIT_CLIENT_ID"] = getpass.getpass("Enter your Scalekit client ID: ")

if not os.environ.get("SCALEKIT_CLIENT_SECRET"):
os.environ["SCALEKIT_CLIENT_SECRET"] = getpass.getpass("Enter your Scalekit client secret: ")
```

It's also helpful to set up [LangSmith](/langsmith/home) for tracing:

```python Enable tracing icon="flask"
# os.environ["LANGSMITH_API_KEY"] = getpass.getpass("Enter your LangSmith API key: ")
# os.environ["LANGSMITH_TRACING"] = "true"
```

## Instantiation

Initialize `ScalekitClient` and load tools via `actions.langchain.get_tools()`. Each tool is a native LangChain `StructuredTool` with name, description, and input schema populated from the connector definition.

```python Initialize Scalekit icon="robot"
import scalekit.client

client = scalekit.client.ScalekitClient(
env_url=os.environ["SCALEKIT_ENVIRONMENT_URL"],
client_id=os.environ["SCALEKIT_CLIENT_ID"],
client_secret=os.environ["SCALEKIT_CLIENT_SECRET"],
)

# Load Gmail tools for a specific user
tools = client.actions.langchain.get_tools(
identifier="user_123",
connection_names=["gmail"],
)

print(f"Loaded {len(tools)} tools")
```

### Filter tools

You can filter tools by connector, tool name, or provider:

```python Filter tools icon="filter"
# Load tools from multiple connectors
tools = client.actions.langchain.get_tools(
identifier="user_123",
connection_names=["gmail", "slack"],
)

# Load specific tools by name
tools = client.actions.langchain.get_tools(
identifier="user_123",
tool_names=["gmail_fetch_mails", "gmail_send_email"],
)

# Load all tools for a user (across all active connectors)
all_tools = client.actions.langchain.get_tools(
identifier="user_123",
)
```

## Invocation

### Directly

```python Call tool icon="rocket"
tool = tools[0]
tool.invoke({"max_results": 5})
```

### As a ToolCall

Invoke the tool with a model-generated `ToolCall`, in which case a @[`ToolMessage`] will be returned:

```python ToolCall icon="briefcase"
# This is usually generated by a model, but we'll create a tool call directly for demo purposes.
model_generated_tool_call = {
"args": {"max_results": 5},
"id": "1",
"name": tool.name,
"type": "tool_call",
}
tool.invoke(model_generated_tool_call)
```

### Within an agent

Use Scalekit tools in an agent. For this you need a model with tool-calling capabilities.

```python Agent with Scalekit tools icon="robot"
# pip install -qU "langchain[openai]" to call the model
from langchain.agents import create_agent

agent = create_agent(
model="claude-sonnet-4-6",
tools=tools,
)

# Run the agent
agent.invoke(
{"messages": [{"role": "user", "content": "Fetch my last 5 unread emails and summarize them"}]}
)
```

## Authentication setup

Before loading tools, users must connect their accounts through OAuth. Scalekit manages the full OAuth flow:

```python Connect a user account icon="key"
# Check if user already has an active Gmail connection
response = client.actions.get_or_create_connected_account(
connection_name="gmail",
identifier="user_123",
)

if response.connected_account.status != "ACTIVE":
# Get an authorization link for the user to complete OAuth
link = client.actions.get_authorization_link(
connection_name="gmail",
identifier="user_123",
)
print(f"Authorize Gmail: {link.link}")
```

See [Authorize a user](https://docs.scalekit.com/agentkit/tools/authorize/) for production authorization handling.

## Multi-user scenarios

Scalekit supports multi-user applications. Each user authenticates their own accounts, and tools are scoped per user via the `identifier` parameter:

```python Multi-user tools icon="users"
# Each user gets tools scoped to their own connected accounts
tools_user_1 = client.actions.langchain.get_tools(
identifier="user_1",
connection_names=["gmail"],
)

tools_user_2 = client.actions.langchain.get_tools(
identifier="user_2",
connection_names=["gmail"],
)

# User 1's agent acts on User 1's Gmail account
agent_1 = create_agent(model="claude-sonnet-4-6", tools=tools_user_1)

# User 2's agent acts on User 2's Gmail account
agent_2 = create_agent(model="claude-sonnet-4-6", tools=tools_user_2)
```

## Use MCP instead

LangChain also supports Scalekit via MCP using `langchain-mcp-adapters`. Scalekit can generate per-user MCP URLs that provide authenticated tool access through the Model Context Protocol.

See [Generate user MCP URLs](https://docs.scalekit.com/agentkit/mcp/generate-user-urls/) for details.

## Available connectors

Scalekit provides 80+ prebuilt OAuth connectors:

**Productivity**: Gmail, Google Calendar, Google Drive, Google Docs, Google Sheets, Notion, Confluence, Trello, Asana, ClickUp, Monday, Airtable

**Communication**: Slack, Microsoft Teams, Discord, Zoom, Outlook

**Development**: GitHub, GitLab, Bitbucket, Linear, Jira, Vercel, PagerDuty

**CRM and Sales**: Salesforce, HubSpot, Pipedrive, Close, Outreach, Apollo, Attio, Affinity

**Finance**: QuickBooks, Xero

**Analytics and Data**: BigQuery, Snowflake, Datadog, Tableau, PostHog

**Support**: Zendesk, Freshdesk, Intercom, ServiceNow

**And more...**

See the [full connector catalog](https://docs.scalekit.com/agentkit/connectors/) for the complete list.

## API reference

For detailed documentation of all Scalekit AgentKit features and configurations, visit:
- [AgentKit overview](https://docs.scalekit.com/agentkit/overview/)
- [LangChain example](https://docs.scalekit.com/agentkit/examples/langchain/)
- [Connectors reference](https://docs.scalekit.com/agentkit/connectors/)
Loading