Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Connect AI agents to Readwise

Scalekit connector
Open markdown

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

Tools
27
What they doRead · write · destructive
11 · 12 · 411 read12 write4 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 Readwise connection

    In AgentKit > Connections, create a Readwise 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 = 'readwise'
    const identifier = 'user_123'
    // Generate an authorization link for the user
    const { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })
    console.log('Authorize Readwise:', 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: 'readwise_check_auth',
    toolInput: {},
    })
    console.log(result)
    Terminal window
    npx tsx quickstart.mts

    Each user opens the link once and enters their Readwise 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
  • readwise_check_authVerify that the connected Readwise access token is valid.Read-only

    Check Authentication

    Verify that the connected Readwise access token is valid. Returns an empty response with HTTP 204 when the token is valid and an auth error otherwise. Use it to diagnose authentication failures before calling other tools.

    Inputs

    This tool takes no inputs.

  • readwise_export_highlightsExport the user's books, articles and podcasts with all of their highlights nested inside.Read-only

    Export Highlights

    Export the user's books, articles and podcasts with all of their highlights nested inside. Returns count, nextPageCursor and results; each result has user_book_id, title, author, category, source, tags and a highlights array with text, note, location, color and tags. Use it to pull everything in one pass or only what changed since updatedAfter. Use list_highlights for a flat, filterable list of highlights and list_books for sources without highlights.

    Inputs

    idsstring
    Comma-separated list of user_book_ids; returns all highlights for only these books. Example: 123,456.
    includeDeletedboolean
    Set true to include deleted highlights so you can sync deletions. Omit to exclude them.
    pageCursorstring
    The nextPageCursor value from a previous response, used to fetch the next page. Omit on the first request.
    updatedAfterstring
    Only return highlights updated after this ISO 8601 datetime (UTC). Use the time of your last sync for incremental pulls. Example: 2024-01-01T00:00:00Z.
  • readwise_get_bookRetrieve one book, article, tweet or podcast by id.Read-only

    Get Book

    Retrieve one book, article, tweet or podcast by id. Returns id, title, author, category, source, num_highlights, last_highlight_at, updated, cover_image_url, highlights_url, source_url, asin, tags and document_note. Use it when you already have a book id. Use list_books to find ids.

    Inputs

    book_idintegerrequired
    ID of the book, article or podcast, as returned by list_books. Example: 1776.
  • readwise_get_daily_reviewFetch the highlights in the user's latest Readwise daily review.Read-only

    Get Daily Review

    Fetch the highlights in the user's latest Readwise daily review. Returns review_id, review_url, review_completed and a highlights array with text, title, author, note, location and id. Responds 404 with detail Review not found when no daily review exists. Use it to surface today's resurfaced highlights. Use complete_daily_review to mark the review done.

    Inputs

    This tool takes no inputs.

  • readwise_get_highlightRetrieve one highlight by id.Read-only

    Get Highlight

    Retrieve one highlight by id. Returns id, text, note, location, location_type, highlighted_at, created_at, url, color, updated, book_id, external_id, tags, end_location and readwise_url. Use it when you already have a highlight id. Use list_highlights to find ids.

    Inputs

    highlight_idintegerrequired
    ID of the highlight, as returned by list_highlights or export_highlights. Example: 59758950.
  • readwise_list_book_tagsList the tags attached to one book, article or podcast.Read-only

    List Book Tags

    List the tags attached to one book, article or podcast. Returns count, next, previous and results; each result has the tag id and name. Use it to see a book's tags or to get a tag id for update or delete. Use list_highlight_tags for a highlight's tags.

    Inputs

    book_idintegerrequired
    ID of the book, article or podcast, as returned by list_books. Example: 1776.
    pageinteger
    Page number to fetch, starting at 1. Increase it to walk through paginated tags; the response's next field links to the following page. Example: 2.
    page_sizeinteger
    Number of tags to return per page. Defaults to 100 when omitted, maximum 1000. Example: 50.
  • readwise_list_booksList the user's sources (books, articles, tweets, podcasts and supplementals) with highlight counts.Read-only

    List Books

    List the user's sources (books, articles, tweets, podcasts and supplementals) with highlight counts. Returns count, next, previous and results; each result has id, title, author, category, source, num_highlights, last_highlight_at, updated, cover_image_url, highlights_url, source_url, asin and tags. Use it to browse sources or find a book id. Use list_highlights with book_id for the highlights themselves. This endpoint is limited to 20 requests per minute.

    Inputs

    categorystring
    Return only sources in this category. One of books, articles, tweets, supplementals or podcasts.one of booksarticlestweetssupplementalspodcasts
    last_highlight_at__gtstring
    Only sources whose last highlight was taken after this ISO 8601 datetime. Some sources have no value. Example: 2024-01-01T00:00:00Z.
    last_highlight_at__ltstring
    Only sources whose last highlight was taken before this ISO 8601 datetime. Some sources have no value. Example: 2024-06-01T00:00:00Z.
    pageinteger
    Page number to fetch, starting at 1. Increase it to walk through paginated books; the response's next field links to the following page. Example: 2.
    page_sizeinteger
    Number of books to return per page. Defaults to 100 when omitted, maximum 1000. Example: 50.
    sourcestring
    Return only sources imported from this origin. Example: kindle.
    updated__gtstring
    Only sources last updated after this ISO 8601 datetime. Example: 2024-01-01T00:00:00Z.
    updated__ltstring
    Only sources last updated before this ISO 8601 datetime. Example: 2024-06-01T00:00:00Z.
  • readwise_list_highlight_tagsList the tags attached to one highlight.Read-only

    List Highlight Tags

    List the tags attached to one highlight. Returns count, next, previous and results; each result has the tag id and name. Use it to see a highlight's tags or to get a tag id for update or delete. Use list_book_tags for a book's tags.

    Inputs

    highlight_idintegerrequired
    ID of the highlight, as returned by list_highlights or export_highlights. Example: 59758950.
    pageinteger
    Page number to fetch, starting at 1. Increase it to walk through paginated tags; the response's next field links to the following page. Example: 2.
    page_sizeinteger
    Number of tags to return per page. Defaults to 100 when omitted, maximum 1000. Example: 50.