docs: add Scalekit integration page#2570
Conversation
- Update description to use 'Learn how to...' pattern (140-160 chars) - Format prerequisites with italic item names per style guide
marcel-rbro
left a comment
There was a problem hiding this comment.
@saif-at-scalekit Thank you for the contribution, there are some issue in the PR that need to be resolved before we can merge it.
|
|
||
| import ThirdPartyDisclaimer from '@site/sources/_partials/_third-party-integration.mdx'; | ||
|
|
||
| ## What is Scalekit |
There was a problem hiding this comment.
Redundant heading. We're slowly removing these "What is XYZ" headings from our docs.
| - _A configured connection_ in the Scalekit dashboard - go to **Agent Auth > Connections > + Create Connection** and select the service, for example Notion | ||
| - _Node.js 18+_ | ||
|
|
||
| Install the Scalekit SDK in your Actor project: |
There was a problem hiding this comment.
The installation should be the Step 1, initialization of the client should be the 2nd step.
| }); | ||
| ``` | ||
|
|
||
| Both approaches use the same connected account and the same token vault. Use `executeTool` when a pre-built tool exists for your use case. Use `actions.request` for full control over the API call or to reach endpoints without a pre-built tool. |
There was a problem hiding this comment.
Good info, but this should be in the intro to the entire Step 4 section. That way you decide which approach to use before learning about both.
| | Service | `connectionName` | | ||
| | --- | --- | | ||
| | Gmail | `gmail` | | ||
| | Google Calendar | `googlecalendar` | | ||
| | Google Drive | `googledrive` | | ||
| | Slack | `slack` | | ||
| | Notion | `notion` | | ||
| | GitHub | `github` | | ||
| | HubSpot | `hubspot` | | ||
| | Jira | `jira` | | ||
| | Salesforce | `salesforce` | | ||
| | Linear | `linear` | | ||
| | Outlook | `outlook` | | ||
| | Zoom | `zoom` | | ||
| | Gong | `gong` | | ||
| | Airtable | `airtable` | |
There was a problem hiding this comment.
No need to list as many examples with their identifiers. For an exhaustive list, users would go to the linked documentation either way. We can just list examples of available services and navigate users to your docs for the identifiers.
| - [Agentic tool calling](https://docs.scalekit.com/agentkit/tools/overview) | ||
| - [Notion + YouTube Agent example](https://github.com/scalekit-developers/agentkit-apify-actor-example) | ||
| - [Apify Actor per-user OAuth cookbook](https://docs.scalekit.com/cookbooks/apify-actor-per-user-oauth/) | ||
| - [Apify Actor documentation](/platform/actors) No newline at end of file |
There was a problem hiding this comment.
Missing newline at the end of the file
|
|
||
| ## What is Scalekit | ||
|
|
||
| [Scalekit](https://scalekit.com) is auth infrastructure for AI agents. It provides a token vault and connector layer that handles OAuth 2.0 flows, token storage, automatic refresh, and API proxying for 100+ third-party services including Notion, Gmail, Slack, Google Calendar, GitHub, and more. |
There was a problem hiding this comment.
Suggestion from automated review:
100+ third-party services (and 100+ connectors on line 266) is the vague-qualifier pattern our style guide flags. Prefer more than 100, or use the actual count if it's stable.
| If the account is not active, generate an authorization link and surface it in the Actor's status message. The user completes OAuth in their browser, and the Actor polls until the connection is active. | ||
|
|
||
| ```javascript | ||
| import { ConnectorStatus } from '@scalekit-sdk/node/lib/pkg/grpc/scalekit/v1/connected_accounts/connected_accounts_pb'; |
There was a problem hiding this comment.
Suggestion from automated review:
The deep import path '@scalekit-sdk/node/lib/pkg/grpc/scalekit/v1/connected_accounts/connected_accounts_pb' reaches into the SDK's internals and is brittle if the package layout changes. Is ConnectorStatus available from a top-level export? If not, consider comparing against the string 'ACTIVE' shown in the status table on lines 82-86.
| identifier: userId, | ||
| }); | ||
|
|
||
| let account = resp.connectedAccount ?? resp; |
There was a problem hiding this comment.
Suggestion from automated review:
resp.connectedAccount ?? resp defensively unwraps two possible response shapes (same pattern repeats on lines 112, 191, 214). If the SDK really returns both shapes, a one-line comment explaining why would help. If it consistently returns one shape, this is dead code - simplify to either resp.connectedAccount or resp.
|
|
||
| try { | ||
| const input = await Actor.getInput(); | ||
| const { task } = input; |
There was a problem hiding this comment.
Suggestion from automated review:
const { task } = input; assumes input is non-null, but Actor.getInput() can return null when the Actor runs without input. Either add a guard (if (!input) throw new Error('Input is required.')) or note in prose that input is required.
|
|
||
| Change `connectionName` in `getOrCreateConnectedAccount` and `getAuthorizationLink` to connect to a different service. The rest of the code stays the same. | ||
|
|
||
| [Browse all connectors](https://docs.scalekit.com/agentkit/connectors) |
There was a problem hiding this comment.
Suggestion from automated review:
The orphan [Browse all connectors](...) link standing alone after the table reads like a CTA. Consider folding it into the preceding sentence: ...The rest of the code stays the same - [browse all connectors](https://docs.scalekit.com/agentkit/connectors).
Summary
Adds a Scalekit integration page to the platform documentation. Scalekit is auth infrastructure for AI agents that provides a token vault and connector layer for OAuth 2.0 flows, token storage, automatic refresh, and API proxying for 100+ third-party services.
New page contents
getOrCreateConnectedAccountexecuteTool(pre-built tools) oractions.request(direct)executeToolin an LLM tool-calling loopconnectionNamevaluesStyle guide alignment
descriptionuses the "Learn how to..." pattern (140-160 chars)docs:prefix)Related