> **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 Ecologi

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

**Authentication:** Bearer Token
**Categories:** Marketing
**Tools:** 10: 5 read, 5 write, 0 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=ECOLOGI)

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

   In **AgentKit > Connections**, create an Ecologi 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 = 'ecologi'
   const identifier = 'user_123'

   // Generate an authorization link for the user
   const { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })
   console.log('Authorize Ecologi:', 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: 'ecologi_user_carbon_offset_get',
     toolInput: { username: 'test' },
   })
   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 = "ecologi"
   identifier = "user_123"

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

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

   ```bash
   python quickstart.py
   ```

   Each user opens the link once and enters their Ecologi 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: 'ecologi_user_carbon_offset_get',
  toolInput: {
    username: '<username>',
  },
  connector: 'ecologi',
  identifier: 'user_123',
})
```

**Python**

```python
result = actions.execute_tool(
    tool_name="ecologi_user_carbon_offset_get",
    tool_input={
        "username": "<username>",
    },
    connection_name="ecologi",
    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.

### `ecologi_user_carbon_offset_get`

Get User Carbon Offset · Read-only

Get the carbon avoided (offset) by an Ecologi profile.
Returns the total tonnes of CO2e avoided.
Use this for avoidance only. Use ecologi_user_carbon_removal_get for removals.

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

Inputs:

- `username` (`string`, required): Ecologi profile username, as in https://ecologi.com/<username>. Example: test.

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

### `ecologi_user_carbon_removal_get`

Get User Carbon Removal · Read-only

Get the carbon removed by an Ecologi profile.
Returns the total CO2e removed.
Use this for removals only. Use ecologi_user_carbon_offset_get for avoidance.

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

Inputs:

- `username` (`string`, required): Ecologi profile username, as in https://ecologi.com/<username>. Example: test.

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

### `ecologi_user_habitat_restoration_get`

Get User Habitat Restoration · Read-only

Get the habitat area an Ecologi profile has restored.
Returns the total square metres restored.
Use this for habitat only. Use ecologi_user_impact_get for all impact types.

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

Inputs:

- `username` (`string`, required): Ecologi profile username, as in https://ecologi.com/<username>. Example: test.

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

### `ecologi_user_impact_get`

Get User Total Impact · Read-only

Get the total impact of an Ecologi profile across all impact types.
Returns the totals of trees, carbon offset, carbon removal and habitat restored.
Use this for a full summary. Use the ecologi_user_*_get tools for one impact type.

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

Inputs:

- `username` (`string`, required): Ecologi profile username, as in https://ecologi.com/<username>. Example: test.

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

### `ecologi_user_trees_get`

Get User Trees · Read-only

Get the number of trees an Ecologi profile has funded.
Returns the total trees.
Use this for tree counts only. Use ecologi_user_impact_get for all impact types.

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

Inputs:

- `username` (`string`, required): Ecologi profile username, as in https://ecologi.com/<username>. Example: test.

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

### `ecologi_carbon_avoidance_purchase`

Purchase Carbon Avoidance · Write

Fund carbon avoidance projects (such as rainforest protection or clean energy) with Ecologi.
Returns the amount and currency charged, the number and units funded, the tile URL and the project details.
Use this to offset emissions. Use ecologi_carbon_removal_purchase for certified permanent CO2e removal.

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

Inputs:

- `number` (`number`, required): Amount of CO2e to avoid, in the units you choose. Example: 1.5.
- `units` (`string`, required): Units for number: KG or Tonnes. Example: Tonnes. One of: `KG`, `Tonnes`.
- `name` (`string`, optional): Funded-by name shown with the impact on your Ecologi profile. Requests with the same name within 24 hours share one tile. If your profile is public this name is public too, so do not send personal data without permission. Example: Order 10423 from Acme Ltd.
- `recipient_email` (`string`, optional): Email address of a third party to notify about this purchase with Ecologi's templated email, for example a customer you are gifting the impact to. Example: customer@example.com.
- `test` (`boolean`, optional): Set true to get the expected response without being charged; test purchases do not appear on your profile. Use true while testing. Example: true.

Example input: `{"number":1.5,"units":"KG"}`

### `ecologi_carbon_removal_purchase`

Purchase Carbon Removal · Write

Fund certified carbon removal projects (such as biochar or enhanced rock weathering) with Ecologi.
Returns the amount and currency charged, the kilograms funded, the tile URL and the project details.
Use this for permanent removal. Use ecologi_carbon_avoidance_purchase for cheaper avoidance offsets.

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

Inputs:

- `number` (`number`, required): Kilograms of CO2e to remove, 1 or more. Example: 10.
- `name` (`string`, optional): Funded-by name shown with the impact on your Ecologi profile. Requests with the same name within 24 hours share one tile. If your profile is public this name is public too, so do not send personal data without permission. Example: Order 10423 from Acme Ltd.
- `recipient_email` (`string`, optional): Email address of a third party to notify about this purchase with Ecologi's templated email, for example a customer you are gifting the impact to. Example: customer@example.com.
- `test` (`boolean`, optional): Set true to get the expected response without being charged; test purchases do not appear on your profile. Use true while testing. Example: true.

Example input: `{"number":10}`

### `ecologi_habitat_restoration_purchase`

Purchase Habitat Restoration · Write

Fund habitat restoration (such as wildflower or seagrass restoration) with Ecologi.
Returns the amount and currency charged, the square metres funded, the tile URL and the project details.
Use this to fund nature restoration by area.

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

Inputs:

- `number` (`number`, required): Square metres of habitat to restore, at least 0.1 with one decimal place. Example: 2.5.
- `name` (`string`, optional): Funded-by name shown with the impact on your Ecologi profile. Requests with the same name within 24 hours share one tile. If your profile is public this name is public too, so do not send personal data without permission. Example: Order 10423 from Acme Ltd.
- `recipient_email` (`string`, optional): Email address of a third party to notify about this purchase with Ecologi's templated email, for example a customer you are gifting the impact to. Example: customer@example.com.
- `test` (`boolean`, optional): Set true to get the expected response without being charged; test purchases do not appear on your profile. Use true while testing. Example: true.

Example input: `{"number":2.5}`

### `ecologi_local_trees_purchase`

Purchase Local Trees · Write

Fund tree planting in a specific country (UK, US, Australia or Brazil) with Ecologi.
Returns the amount and currency charged, the tile URL, the funded-by name and the project details.
Use this when the trees must be planted in one country. Use ecologi_trees_purchase for lower-cost global planting.

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

Inputs:

- `country` (`string`, required): Country to plant in: UK, US, AU (Australia) or BR (Brazil). Example: UK. One of: `UK`, `US`, `AU`, `BR`.
- `number` (`integer`, required): Number of trees to fund, 1 or more. Example: 5.
- `name` (`string`, optional): Funded-by name shown with the impact on your Ecologi profile. Requests with the same name within 24 hours share one tile. If your profile is public this name is public too, so do not send personal data without permission. Example: Order 10423 from Acme Ltd.
- `recipient_email` (`string`, optional): Email address of a third party to notify about this purchase with Ecologi's templated email, for example a customer you are gifting the impact to. Example: customer@example.com.
- `test` (`boolean`, optional): Set true to get the expected response without being charged; test purchases do not appear on your profile. Use true while testing. Example: true.

Example input: `{"country":"UK","number":5}`

### `ecologi_trees_purchase`

Purchase Trees · Write

Fund tree planting with Ecologi; the trees are added to your Ecologi forest as pending until your next monthly invoice is paid.
Returns the amount and currency charged, the tree tile URL, the funded-by name and the projects the trees were split across.
Use this for global tree planting. Use ecologi_local_trees_purchase to plant in a chosen country. Set test to true to try it without being charged.

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

Inputs:

- `number` (`integer`, required): Number of trees to fund, from 1 to 250,000. Example: 3.
- `name` (`string`, optional): Funded-by name shown with the impact on your Ecologi profile. Requests with the same name within 24 hours share one tile. If your profile is public this name is public too, so do not send personal data without permission. Example: Order 10423 from Acme Ltd.
- `recipient_email` (`string`, optional): Email address of a third party to notify about this purchase with Ecologi's templated email, for example a customer you are gifting the impact to. Example: customer@example.com.
- `test` (`boolean`, optional): Set true to get the expected response without being charged; test purchases do not appear on your profile. Use true while testing. Example: true.

Example input: `{"number":3}`

## Related

Other Marketing connectors ([all 190](/agentkit/connectors/?category=marketing)):

- [HubSpot](/agentkit/connectors/hubspot/): Scalekit connector, OAuth, 457 tools
- [Mailchimp](/agentkit/connectors/mailchimp/): Scalekit connector, OAuth, 73 tools
- [Twitter / X](/agentkit/connectors/twitteroauth/): Scalekit connector, OAuth, 92 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 |
