Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Connect AI agents to Splitwise

Scalekit connector
Open markdown

The Splitwise connector lets your AI agent act in each user's Splitwise account. Each user signs in to Splitwise once, and Scalekit stores and refreshes their tokens, so your agent never handles credentials. It comes with 27 tools.

Tools
27
What they doRead · write · destructive
12 · 10 · 512 read10 write5 destructive
Users sign in with
OAuth app
Your own Splitwise app

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 Splitwise connection

    In AgentKit > Connections, create a Splitwise connection and copy its redirect URI. The name you give it is the connection_name your code passes. See Configure connections.

  4. Register an OAuth app

    Splitwise connections use your own OAuth app. Register one with Splitwise and add the redirect URI you copied.

    Then enter the app's Client ID and Client Secret on the Splitwise connection.

  5. 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 = 'splitwise'
    const identifier = 'user_123'
    // Generate an authorization link for the user
    const { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })
    console.log('Authorize Splitwise:', 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: 'splitwise_get_current_user',
    toolInput: {},
    })
    console.log(result)
    Terminal window
    npx tsx quickstart.mts

    Each user signs in once. See Authorize a user for the full flow and statuses.

Tools

Pass the exact name to execute_tool
Try in PlaygroundRequest a tool
  • splitwise_get_categoriesList the expense categories Splitwise supports.Read-only

    List Categories

    List the expense categories Splitwise supports. Returns parent categories, each with its subcategories and their IDs. Use before create_expense to pick a subcategory ID for category_id; parent categories cannot be used directly.

    Inputs

    This tool takes no inputs.

  • splitwise_get_commentsList the comments on a Splitwise expense.Read-only

    List Expense Comments

    List the comments on a Splitwise expense. Returns each comment's id, content, type, author, and created and deleted timestamps. Use create_comment to add one.

    Inputs

    expense_idintegerrequired
    Numeric Splitwise ID of the expense.
  • splitwise_get_currenciesList the currency codes Splitwise accepts.Read-only

    List Currencies

    List the currency codes Splitwise accepts. Returns each currency's code and unit symbol. Use before create_expense or update_user to pick a valid currency_code.

    Inputs

    This tool takes no inputs.

  • splitwise_get_current_userGet the profile of the authenticated Splitwise user.Read-only

    Get Current User

    Get the profile of the authenticated Splitwise user. Returns id, name, email, registration status, picture, default currency, locale and notification settings. Use get_user to look up another user by ID. Call this first to learn the user's own ID.

    Inputs

    This tool takes no inputs.

  • splitwise_get_expenseGet one Splitwise expense by ID.Read-only

    Get Expense

    Get one Splitwise expense by ID. Returns the expense with description, cost, currency, date, category, repayments, and each user's paid and owed share. Use get_expenses to find expense IDs.

    Inputs

    idintegerrequired
    Numeric Splitwise ID of the expense.
  • splitwise_get_expensesList expenses visible to the authenticated user, optionally filtered by group, friend or date.Read-only

    List Expenses

    List expenses visible to the authenticated user, optionally filtered by group, friend or date. Returns each expense's id, description, cost, currency, date, category, and per-user paid and owed shares. Use get_expense for one expense by ID. group_id takes precedence over friend_id.

    Inputs

    dated_afterstring
    Only return expenses dated after this ISO 8601 date-time.
    dated_beforestring
    Only return expenses dated before this ISO 8601 date-time.
    friend_idinteger
    Only return expenses between the authenticated user and this other user.
    group_idinteger
    Only return expenses in this group. When set, friend_id is ignored.
    limitinteger
    Maximum number of expenses to return. Splitwise defaults to 20.default 20
    offsetinteger
    Number of expenses to skip, for paging. Splitwise defaults to 0.default 0
    updated_afterstring
    Only return expenses updated after this ISO 8601 date-time.
    updated_beforestring
    Only return expenses updated before this ISO 8601 date-time.
  • splitwise_get_friendGet one Splitwise friend by user ID.Read-only

    Get Friend

    Get one Splitwise friend by user ID. Returns the friend's profile, balances per currency, and per-group balances. Use get_friends to find friend IDs.

    Inputs

    idintegerrequired
    Numeric Splitwise ID of the friend.
  • splitwise_get_friendsList the authenticated user's Splitwise friends.Read-only

    List Friends

    List the authenticated user's Splitwise friends. Returns each friend's id, name, email, balances per currency, and the groups shared with that friend. Use get_friend for one friend by ID.

    Inputs

    This tool takes no inputs.