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
- Access token
Setup
Install the SDK
Terminal window npm install @scalekit-sdk/node dotenvTerminal window pip install scalekit-sdk-python python-dotenvSet your credentials
Add your Scalekit credentials to your
.envfile. 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>Create the Ecologi connection
In AgentKit > Connections, create an Ecologi connection. The name you give it is the
connection_nameyour code passes. See Configure connections.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.actionsconst connector = 'ecologi'const identifier = 'user_123'// Generate an authorization link for the userconst { 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 callconst result = await actions.executeTool({connector,identifier,toolName: 'ecologi_user_carbon_offset_get',toolInput: { username: 'test' },})console.log(result)Terminal window npx tsx quickstart.mtsquickstart.py import osfrom scalekit import ScalekitClientfrom dotenv import load_dotenvload_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.actionsconnection_name = "ecologi"identifier = "user_123"# Generate an authorization link for the userlink_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 callresult = actions.execute_tool(tool_input={"username":"test"},tool_name="ecologi_user_carbon_offset_get",connection_name=connection_name,identifier=identifier,)print(result)Terminal window python quickstart.pyEach 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 toexecute_toolecologi_user_carbon_offset_getGet the carbon avoided (offset) by an Ecologi profile.Read-onlyGet 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-onlyGet 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-onlyGet 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-onlyGet 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-onlyGet 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.WritePurchase 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.WritePurchase 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.WritePurchase 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.
ecologi_local_trees_purchaseFund tree planting in a specific country (UK, US, Australia or Brazil) with Ecologi.WritePurchase Local Trees
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.
Inputs
countrystringrequired- Country to plant in: UK, US, AU (Australia) or BR (Brazil). Example: UK.one of
UKUSAUBR numberintegerrequired- Number of trees to fund, 1 or more. Example: 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.
ecologi_trees_purchaseFund tree planting with Ecologi; the trees are added to your Ecologi forest as pending until your next monthly invoice is paid.WritePurchase Trees
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.
Inputs
numberintegerrequired- Number of trees to fund, from 1 to 250,000. Example: 3.
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.
No tools match.