Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Connect AI agents to FreeAgent

Scalekit connector
Open markdown

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

Tools
117
What they doRead · write · destructive
57 · 46 · 1457 read46 write14 destructive
Users sign in with
OAuth app
Your own FreeAgent 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 FreeAgent connection

    In AgentKit > Connections, create a FreeAgent 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

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

    Then enter the app's Client ID and Client Secret on the FreeAgent 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 = 'freeagent'
    const identifier = 'user_123'
    // Generate an authorization link for the user
    const { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })
    console.log('Authorize FreeAgent:', 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: 'freeagent_accounting_transactions_list',
    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
  • freeagent_accounting_transaction_getGet one FreeAgent accounting transaction by ID.Read-only

    Get Accounting Transaction

    Get one FreeAgent accounting transaction by ID. Returns its date, description, category, nominal code, debit value, source item and foreign currency data. Use freeagent_accounting_transactions_list to find the ID.

    Inputs

    transaction_idstringrequired
    Numeric ID of the accounting transaction: the number at the end of its FreeAgent `url` (for https://api.freeagent.com/v2/accounting/transactions/123 the ID is 123). Get it from freeagent_accounting_transactions_list.
  • freeagent_accounting_transactions_listList FreeAgent's underlying accounting (ledger) transactions for a period, optionally for one nominal code.Read-only

    List Accounting Transactions

    List FreeAgent's underlying accounting (ledger) transactions for a period, optionally for one nominal code. Returns each transaction's url, date, description, category, nominal code, debit value and source item. The period must be 12 months or less, or within one accounting year; with no dates it covers the current accounting year to date.

    Inputs

    from_datestring
    Start of the date range (inclusive) in YYYY-MM-DD format. Example: 2026-01-01.
    nominal_codestring
    Only return transactions for this category nominal code. Example: 285.
    pageinteger
    Page number of results to return, starting at 1. FreeAgent returns 25 items per page by default; the response's Link header points to the next page.
    per_pageinteger
    Number of items per page, from 1 to 100. Defaults to 25.
    to_datestring
    End of the date range (inclusive) in YYYY-MM-DD format. Example: 2026-03-31.
  • freeagent_attachment_getGet one FreeAgent attachment (for example a receipt) by ID.Read-only

    Get Attachment

    Get one FreeAgent attachment (for example a receipt) by ID. Returns its file name, content type, size, description and temporary content_src download URLs with their expiry. Find attachment URLs on expenses, bills and bank transaction explanations.

    Inputs

    attachment_idstringrequired
    Numeric ID of the attachment: the number at the end of its FreeAgent `url` (for https://api.freeagent.com/v2/attachments/123 the ID is 123). Get it from the attachment field of an expense, bill or bank transaction explanation.
  • freeagent_balance_sheet_getGet the FreeAgent balance sheet as at a date.Read-only

    Get Balance Sheet

    Get the FreeAgent balance sheet as at a date. Returns capital assets, current assets and liabilities, net current assets, total assets and owner's equity. With no date it is as at today from the start of the current accounting period.

    Inputs

    as_at_datestring
    Date to report the balance sheet as at in YYYY-MM-DD format. Example: 2026-03-31.
  • freeagent_bank_account_getGet one FreeAgent bank account by ID.Read-only

    Get Bank Account

    Get one FreeAgent bank account by ID. Returns the account's type, name, currency, balances, bank details and status. Use freeagent_bank_accounts_list to find the ID.

    Inputs

    bank_account_idstringrequired
    Numeric ID of the bank account: the number at the end of its FreeAgent `url` (for https://api.freeagent.com/v2/bank_accounts/123 the ID is 123). Get it from freeagent_bank_accounts_list.
  • freeagent_bank_accounts_listList the company's FreeAgent bank, credit card and PayPal accounts.Read-only

    List Bank Accounts

    List the company's FreeAgent bank, credit card and PayPal accounts. Returns each account's url, type, name, currency, current balance and latest activity date. Use this to find a bank account URL before listing transactions or creating explanations.

    Inputs

    pageinteger
    Page number of results to return, starting at 1. FreeAgent returns 25 items per page by default; the response's Link header points to the next page.
    per_pageinteger
    Number of items per page, from 1 to 100. Defaults to 25.
    viewstring
    Filter by view. One of: standard_bank_accounts, credit_card_accounts, paypal_accounts.one of standard_bank_accountscredit_card_accountspaypal_accounts
  • freeagent_bank_transaction_explanation_getGet one FreeAgent bank transaction explanation by ID.Read-only

    Get Bank Transaction Explanation

    Get one FreeAgent bank transaction explanation by ID. Returns its type, date, amount, category, sales tax, description, lock state and linked records. Use freeagent_bank_transaction_explanations_list to find the ID.

    Inputs

    bank_transaction_explanation_idstringrequired
    Numeric ID of the bank transaction explanation: the number at the end of its FreeAgent `url` (for https://api.freeagent.com/v2/bank_transaction_explanations/123 the ID is 123). Get it from freeagent_bank_transaction_explanations_list.
  • freeagent_bank_transaction_explanations_listList the explanations recorded against transactions in one FreeAgent bank account, filtered by date range or update time.Read-only

    List Bank Transaction Explanations

    List the explanations recorded against transactions in one FreeAgent bank account, filtered by date range or update time. Returns each explanation's url, type, date, amount, category, description and linked invoice, bill or user. Use freeagent_bank_transactions_list to see transactions and how much is still unexplained. Requires a bank account URL from freeagent_bank_accounts_list.

    Inputs

    bank_accountstringrequired
    FreeAgent URL of the bank account, as returned in the `url` field by freeagent_bank_accounts_list. Example: https://api.freeagent.com/v2/bank_accounts/123.
    from_datestring
    Start of the date range (inclusive) in YYYY-MM-DD format. Example: 2026-01-01.
    pageinteger
    Page number of results to return, starting at 1. FreeAgent returns 25 items per page by default; the response's Link header points to the next page.
    per_pageinteger
    Number of items per page, from 1 to 100. Defaults to 25.
    to_datestring
    End of the date range (inclusive) in YYYY-MM-DD format. Example: 2026-03-31.
    updated_sincestring
    Only return records updated on or after this ISO 8601 timestamp. Example: 2026-01-01T00:00:00.000Z.