Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Connect AI agents to Ecologi

Scalekit connector
Open markdown

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.

Tools
10
What they doRead · write · destructive
5 · 5 · 05 read5 write0 destructive
Users sign in with

Setup

  1. Install the SDK

    Terminal window
    npm install @scalekit-sdk/node dotenv
  2. Set your credentials

    Add your Scalekit credentials to your .env file. Find values in app.scalekit.com > Developers > API Credentials.

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

  4. Authorize a user and make your first call

    quickstart.mts
    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)
    Terminal window
    npx tsx quickstart.mts

    Each user opens the link once and enters their Ecologi credentials there. See Authorize a user for the full flow and statuses.

Tools

Pass the exact name to execute_tool
Try in PlaygroundRequest a tool
  • ecologi_user_carbon_offset_getGet the carbon avoided (offset) by an Ecologi profile.Read-only

    Get User Carbon Offset

    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.

    Inputs

    usernamestringrequired
    Ecologi profile username, as in https://ecologi.com/<username>. Example: test.
  • ecologi_user_carbon_removal_getGet the carbon removed by an Ecologi profile.Read-only

    Get User Carbon Removal

    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.

    Inputs

    usernamestringrequired
    Ecologi profile username, as in https://ecologi.com/<username>. Example: test.
  • ecologi_user_habitat_restoration_getGet the habitat area an Ecologi profile has restored.Read-only

    Get User Habitat Restoration

    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.

    Inputs

    usernamestringrequired
    Ecologi profile username, as in https://ecologi.com/<username>. Example: test.
  • ecologi_user_impact_getGet the total impact of an Ecologi profile across all impact types.Read-only

    Get User Total Impact

    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.

    Inputs

    usernamestringrequired
    Ecologi profile username, as in https://ecologi.com/<username>. Example: test.
  • ecologi_user_trees_getGet the number of trees an Ecologi profile has funded.Read-only

    Get User Trees

    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.

    Inputs

    usernamestringrequired
    Ecologi profile username, as in https://ecologi.com/<username>. Example: test.
  • ecologi_carbon_avoidance_purchaseFund carbon avoidance projects (such as rainforest protection or clean energy) with Ecologi.Write

    Purchase Carbon Avoidance

    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.

    Inputs

    numbernumberrequired
    Amount of CO2e to avoid, in the units you choose. Example: 1.5.
    unitsstringrequired
    Units for number: KG or Tonnes. Example: Tonnes.one of KGTonnes
    namestring
    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_emailstring
    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.
    testboolean
    Set true to get the expected response without being charged; test purchases do not appear on your profile. Use true while testing. Example: true.
  • ecologi_carbon_removal_purchaseFund certified carbon removal projects (such as biochar or enhanced rock weathering) with Ecologi.Write

    Purchase Carbon Removal

    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.

    Inputs

    numbernumberrequired
    Kilograms of CO2e to remove, 1 or more. Example: 10.
    namestring
    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_emailstring
    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.
    testboolean
    Set true to get the expected response without being charged; test purchases do not appear on your profile. Use true while testing. Example: true.
  • ecologi_habitat_restoration_purchaseFund habitat restoration (such as wildflower or seagrass restoration) with Ecologi.Write

    Purchase Habitat Restoration

    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.

    Inputs

    numbernumberrequired
    Square metres of habitat to restore, at least 0.1 with one decimal place. Example: 2.5.
    namestring
    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_emailstring
    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.
    testboolean
    Set true to get the expected response without being charged; test purchases do not appear on your profile. Use true while testing. Example: true.