> **Building with AI coding agents?** Install the authstack plugin with one command. This equips your agent with accurate Scalekit implementation patterns.
>
> **Recommended** (the `-y` flags skip prompts, so the command runs without an interactive terminal):
> ```bash
> npx -y @scalekit-inc/cli setup -y
> ```
>
> Global:
> ```bash
> npm install -g @scalekit-inc/cli
> scalekit setup -y
> ```
>
> Supports Claude Code, Cursor, GitHub Copilot, Codex + skills for other Agent Skills-compatible agents in `~/.agents/skills`.
> Skills: integrate-agentkit, implement-saaskit, add-mcp-oauth, implement-sso, implement-scim.
> [Full setup guide](https://docs.scalekit.com/dev-kit/build-with-ai/)

---

# Connect AI agents to Cody

The Cody connector lets your AI agent act in each user's Cody account. Each user connects their own Cody access token once, and Scalekit sends it with every call, so your agent never handles credentials. It comes with 18 tools.

**Authentication:** Bearer Token
**Categories:** AI, Customer Support
**Tools:** 18: 9 read, 7 write, 2 destructive
**Users sign in with:** Access token
**Built by:** Scalekit connector
**Try it:** [Playground in the Scalekit dashboard](https://app.scalekit.com/ws/signup?sk_intent=playground&provider=CODY)

## Setup

1. ### Install the SDK

   **Node.js**

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

   **Python**

   ```bash
   pip install scalekit-sdk-python python-dotenv
   ```

2. ### Set your credentials

   Add your Scalekit credentials to your `.env` file. Find values in **[app.scalekit.com](https://app.scalekit.com)** > **Developers** > **API Credentials**.

   ```sh title=".env"
   SCALEKIT_ENVIRONMENT_URL=<your-environment-url>
   SCALEKIT_CLIENT_ID=<your-client-id>
   SCALEKIT_CLIENT_SECRET=<your-client-secret>
   ```

3. ### Create the Cody connection

   In **AgentKit > Connections**, create a Cody connection. The name you give it is the `connection_name` your code passes. See [Configure connections](/agentkit/connections/).

4. ### Authorize a user and make your first call

   **Node.js** (`quickstart.mts`)

   ```typescript
   import { ScalekitClient } from '@scalekit-sdk/node'
   import 'dotenv/config'
   import { createInterface } from 'node:readline/promises'

   const scalekit = new ScalekitClient(
     process.env.SCALEKIT_ENVIRONMENT_URL,
     process.env.SCALEKIT_CLIENT_ID,
     process.env.SCALEKIT_CLIENT_SECRET,
   )
   const actions = scalekit.actions

   const connector = 'cody'
   const identifier = 'user_123'

   // Generate an authorization link for the user
   const { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })
   console.log('Authorize Cody:', link)
   const rl = createInterface({ input: process.stdin, output: process.stdout })
   await rl.question('Press Enter after authorizing...')
   rl.close()

   // Make your first call
   const result = await actions.executeTool({
     connector,
     identifier,
     toolName: 'cody_bots_list',
     toolInput: {},
   })
   console.log(result)
   ```

   ```bash
   npx tsx quickstart.mts
   ```

   **Python** (`quickstart.py`)

   ```python
   import os
   from scalekit import ScalekitClient
   from dotenv import load_dotenv
   load_dotenv()

   scalekit_client = ScalekitClient(
       env_url=os.getenv("SCALEKIT_ENVIRONMENT_URL"),
       client_id=os.getenv("SCALEKIT_CLIENT_ID"),
       client_secret=os.getenv("SCALEKIT_CLIENT_SECRET"),
   )
   actions = scalekit_client.actions

   connection_name = "cody"
   identifier = "user_123"

   # Generate an authorization link for the user
   link_response = actions.get_authorization_link(
       connection_name=connection_name,
       identifier=identifier,
   )
   print("Authorize Cody:", link_response.link)
   input("Press Enter after authorizing...")

   # Make your first call
   result = actions.execute_tool(
       tool_input={},
       tool_name="cody_bots_list",
       connection_name=connection_name,
       identifier=identifier,
   )
   print(result)
   ```

   ```bash
   python quickstart.py
   ```

   Each user opens the link once and enters their Cody credentials there. See [Authorize a user](/agentkit/tools/authorize/) for the full flow and statuses.

## Tools

Pass the exact name to `execute_tool`, with an input like each tool's example. To ask for a tool that's missing, use the [request form](https://scalekitsupport.portal.usepylon.com/forms/request-a-connector-tool).

**Node.js**

```typescript
const result = await actions.executeTool({
  toolName: 'cody_bots_list',
  toolInput: {},
  connector: 'cody',
  identifier: 'user_123',
})
```

**Python**

```python
result = actions.execute_tool(
    tool_name="cody_bots_list",
    tool_input={},
    connection_name="cody",
    identifier="user_123",
)
```

`result.data` is the app's response as JSON, and `result.execution_id` (`executionId` in Node.js) is the ID of the call.

### `cody_bots_list`

List Bots · Read-only

List the AI bots in the Cody account, optionally filtered by name.
Returns each bot's id, name, model and created_at.
Use this to find a bot ID for Create Conversation. Bots are created in the Cody dashboard, not through the API.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `keyword` (`string`, optional): Only return items whose name at least partially matches this text. Example: support.

Example input: `{}`

### `cody_conversation_get`

Get Conversation · Read-only

Get one Cody conversation by ID.
Returns its id, name, bot_id and created_at, plus focused document IDs when requested.
Use List Messages for its messages.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `conversation_id` (`string`, required): ID of the conversation. Find it with List Conversations. Example: Cv7Mn2Bq8Tz4.
- `includes` (`string`, optional): Set to document_ids to include the IDs of the documents the conversation is focused on. Example: document_ids. One of: `document_ids`.

Example input: `{"conversation_id":"<conversation_id>"}`

### `cody_conversations_list`

List Conversations · Read-only

List conversations in the Cody account, optionally filtered by bot or name.
Returns each conversation's id, name, bot_id and created_at, plus focused document IDs when requested.
Use this to find a conversation. Use List Messages for the messages in one conversation.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `bot_id` (`string`, optional): Only return conversations that use this bot ID, from List Bots. Example: Xb8Lq3mN5pRw.
- `includes` (`string`, optional): Set to document_ids to include the IDs of the documents each conversation is focused on. Example: document_ids. One of: `document_ids`.
- `keyword` (`string`, optional): Only return items whose name at least partially matches this text. Example: support.

Example input: `{}`

### `cody_document_get`

Get Document · Read-only

Get one document from the Cody knowledge base by ID.
Returns its id, name, status, folder_id, content_url and created_at.
Use List Documents to find the ID.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `document_id` (`string`, required): ID of the document. Find it with List Documents. Example: Dc4Kp8Wn2Qx6.

Example input: `{"document_id":"<document_id>"}`

### `cody_documents_list`

List Documents · Read-only

List documents in the Cody knowledge base, filtered by folder, conversation focus or name.
Returns each document's id, name, status, folder_id and content_url.
Use this to find a document ID. Use Get Document for one document.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `conversation_id` (`string`, optional): Only return documents the given conversation is focused on. Example: Cv7Mn2Bq8Tz4.
- `folder_id` (`string`, optional): Only return documents in this folder ID, from List Folders. Example: Fk2Lm9Qp4Xs7.
- `keyword` (`string`, optional): Only return documents whose name at least partially matches this text. Example: support.

Example input: `{}`

### `cody_folder_get`

Get Folder · Read-only

Get one Cody knowledge-base folder by ID.
Returns its id, name and created_at.
Use List Documents with the folder ID to see its documents.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `folder_id` (`string`, required): ID of the folder. Find it with List Folders. Example: Fk2Lm9Qp4Xs7.

Example input: `{"folder_id":"<folder_id>"}`

### `cody_folders_list`

List Folders · Read-only

List the folders of the Cody knowledge base, optionally filtered by name.
Returns each folder's id, name and created_at.
Use this to find a folder ID for Create Document or List Documents.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `keyword` (`string`, optional): Only return items whose name at least partially matches this text. Example: support.

Example input: `{}`

### `cody_message_get`

Get Message · Read-only

Get one Cody message by ID.
Returns its id, content, machine flag, conversation_id and created_at, plus sources or token usage when requested.
Use List Messages to find the ID.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `message_id` (`string`, required): ID of the message. Find it with List Messages. Example: Ms3Jk7Lp1Vb9.
- `includes` (`string`, optional): Extra attributes to include: sources (knowledge-base documents used for the answer) or usage (tokens and credits used). Example: sources. One of: `sources`, `usage`.

Example input: `{"message_id":"<message_id>"}`

### `cody_messages_list`

List Messages · Read-only

List messages, optionally only those in one Cody conversation.
Returns each message's id, content, machine (true for bot replies), conversation_id and created_at, plus sources or token usage when requested.
Use Get Message for one message.

Read only: yes. Destructive: no. Idempotent (safe to retry): yes.

Inputs:

- `conversation_id` (`string`, optional): Only return messages in this conversation ID, from List Conversations. Example: Cv7Mn2Bq8Tz4.
- `includes` (`string`, optional): Extra attributes to include: sources (knowledge-base documents used for the answer) or usage (tokens and credits used). Example: sources. One of: `sources`, `usage`.

Example input: `{}`

### `cody_conversation_create`

Create Conversation · Write

Start a new conversation with a Cody bot, optionally focused on specific documents.
Returns the new conversation's id, name and bot_id.
Use Send Message next to ask the bot a question in it.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `bot_id` (`string`, required): ID of the bot that answers in this conversation, from List Bots. Example: Xb8Lq3mN5pRw.
- `name` (`string`, required): Name of the conversation. Example: Customer onboarding questions.
- `document_ids` (`array`, optional): Document IDs to focus the conversation on, so the bot answers only from them (Focus Mode). Omit to use the bot's whole knowledge base. Example: ["Dc4Kp8Wn2Qx6"].

Example input: `{"bot_id":"<bot_id>","name":"<name>"}`

### `cody_conversation_update`

Update Conversation · Write

Rename a Cody conversation, change its bot or change the documents it is focused on.
Returns the updated conversation.
Send name and bot_id every time, even when unchanged.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `bot_id` (`string`, required): Bot ID for the conversation, from List Bots; send the current bot ID to keep it. Example: Xb8Lq3mN5pRw.
- `conversation_id` (`string`, required): ID of the conversation. Find it with List Conversations. Example: Cv7Mn2Bq8Tz4.
- `name` (`string`, required): New name of the conversation; send the current name to keep it. Example: Onboarding questions (resolved).
- `document_ids` (`array`, optional): Document IDs to focus the conversation on. Omit to keep using the bot's whole knowledge base. Example: ["Dc4Kp8Wn2Qx6"].

Example input: `{"bot_id":"<bot_id>","conversation_id":"<conversation_id>","name":"<name>"}`

### `cody_document_create`

Create Document · Write

Add a text or HTML document to the Cody knowledge base in a folder.
Returns the new document's id, name, status and folder_id; it is indexed in the background.
Use Create Document From Webpage to import a public URL instead.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `content` (`string`, required): Document content as plain text or HTML, up to 768 KB. HTML headings with paragraphs give the best answers. Example: <h2>Refunds</h2>We refund within 30 days of purchase.
.
- `folder_id` (`string`, required): Folder ID to add the document to, from List Folders. Example: Fk2Lm9Qp4Xs7.
- `name` (`string`, required): Name of the document. Example: Refund policy.

Example input: `{"content":"<content>","folder_id":"<folder_id>","name":"<name>"}`

### `cody_document_create_from_webpage`

Create Document From Webpage · Write

Import a public webpage into the Cody knowledge base as a document.
Returns the new document's id, name and status; the page is fetched and indexed in the background.
The page must be reachable without a login. Use Create Document to add your own text.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `folder_id` (`string`, required): Folder ID to add the document to, from List Folders. Example: Fk2Lm9Qp4Xs7.
- `url` (`string`, required): Public URL of the webpage to import. Example: https://example.com/help/refunds.

Example input: `{"folder_id":"<folder_id>","url":"<url>"}`

### `cody_folder_create`

Create Folder · Write

Create a folder in the Cody knowledge base.
Returns the new folder's id and name.
Add documents to it with Create Document or Create Document From Webpage.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `name` (`string`, required): Name of the folder. Example: Policies.

Example input: `{"name":"<name>"}`

### `cody_folder_update`

Rename Folder · Write

Rename a Cody knowledge-base folder.
Returns the updated folder.
Use List Folders to find the folder ID.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `folder_id` (`string`, required): ID of the folder. Find it with List Folders. Example: Fk2Lm9Qp4Xs7.
- `name` (`string`, required): New name of the folder. Example: Company policies.

Example input: `{"folder_id":"<folder_id>","name":"<name>"}`

### `cody_message_send`

Send Message · Write

Send a message to a Cody conversation and wait for the bot's answer.
Returns the bot's reply message with its id, content and created_at.
Use Create Conversation first. Each answer uses Cody message credits; a 402 means the account is out of credits.

Read only: no. Destructive: no. Idempotent (safe to retry): no.

Inputs:

- `content` (`string`, required): The question or message to send to the bot, up to 2000 characters. Example: What is the refund policy?.
- `conversation_id` (`string`, required): Conversation ID to send the message in, from Create Conversation or List Conversations. Example: Cv7Mn2Bq8Tz4.

Example input: `{"content":"<content>","conversation_id":"<conversation_id>"}`

### `cody_conversation_delete`

Delete Conversation · Destructive

Delete a Cody conversation and its messages.
Returns an empty success response.
This cannot be undone.

Read only: no. Destructive: yes. Idempotent (safe to retry): yes.

Inputs:

- `conversation_id` (`string`, required): ID of the conversation. Find it with List Conversations. Example: Cv7Mn2Bq8Tz4.

Example input: `{"conversation_id":"<conversation_id>"}`

### `cody_document_delete`

Delete Document · Destructive

Delete a document from the Cody knowledge base.
Returns an empty success response.
Bots stop using the document's content in answers.

Read only: no. Destructive: yes. Idempotent (safe to retry): yes.

Inputs:

- `document_id` (`string`, required): ID of the document. Find it with List Documents. Example: Dc4Kp8Wn2Qx6.

Example input: `{"document_id":"<document_id>"}`

## Related

Other AI connectors ([all 216](/agentkit/connectors/?category=ai)):

- [Chorus](/agentkit/connectors/chorus/): Scalekit connector, Username and password, 9 tools
- [Gong](/agentkit/connectors/gong/): Scalekit connector, OAuth, 69 tools
- [Jiminny](/agentkit/connectors/jiminny/): Scalekit connector, Access token, 27 tools


---

## 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 |
