Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Connect AI agents to Habitica

Scalekit connector
Open markdown

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

Tools
51
What they doRead · write · destructive
16 · 29 · 616 read29 write6 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 Habitica connection

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

    Each user opens the link once and enters their Habitica 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
  • habitica_challenge_getGet one challenge.Read-only

    Get Challenge

    Get one challenge. Returns its name, description, group, prize, member count, leader and task IDs.

    Inputs

    challenge_idstringrequired
    ID (UUID) of the challenge, from habitica_challenges_list. Example: f23c12f2-5830-4f15-9c36-e17fd729a812.
  • habitica_challenges_listList challenges you can see, 10 per page, optionally only ones you joined or own, by search text or categories.Read-only

    List Challenges

    List challenges you can see, 10 per page, optionally only ones you joined or own, by search text or categories. Returns per challenge its ID, name, summary, group, prize, member count and leader.

    Inputs

    pageintegerrequired
    Page number, starting at 0. Example: 0.
    categoriesstring
    Comma-separated category slugs, e.g. self_improvement,health_fitness. Example: self_improvement.
    memberstring
    Set to true for only challenges you joined. Example: true.
    ownedstring
    owned for only challenges you own, not_owned for the rest. Example: owned.one of ownednot_owned
    searchstring
    Text to search challenge names for. Example: reading.
  • habitica_group_chat_listGet recent chat messages of a group, your party or the Tavern.Read-only

    List Group Chat

    Get recent chat messages of a group, your party or the Tavern. Returns messages with ID, sender, text, timestamp and likes.

    Inputs

    group_idstringrequired
    ID (UUID) of the group, or party for your party, or habitrpg for the Tavern. Example: party.
    beforestring
    Only messages older than this message ID. Example: 6a7b8c9d-0e1f-4a2b-8c3d-4e5f6a7b8c9d.
    limitinteger
    Number of messages (up to 400, default 50). Example: 50.
  • habitica_group_getGet one group, or your party with party.Read-only

    Get Group

    Get one group, or your party with party. Returns its name, description, leader, member count, quest and chat summary.

    Inputs

    group_idstringrequired
    ID (UUID) of the group, or party for your party, or habitrpg for the Tavern. Example: party.
  • habitica_group_members_listList members of a group or your party, 30 per page by default.Read-only

    List Group Members

    List members of a group or your party, 30 per page by default. Returns per member the ID, profile name and optionally all public fields or tasks.

    Inputs

    group_idstringrequired
    ID (UUID) of the group, or party for your party, or habitrpg for the Tavern. Example: party.
    include_all_public_fieldsboolean
    Set to true for full public profiles. Example: false.
    last_idstring
    Member ID to start after, for paging. Example: 4c35f4e5-0a50-4f45-8d2e-1b7c3c6a1f7a.
    limitinteger
    Members per page (up to 60). Example: 30.
  • habitica_groups_listList groups of a type you can see: your party, your guilds, private guilds, public guilds or the Tavern.Read-only

    List Groups

    List groups of a type you can see: your party, your guilds, private guilds, public guilds or the Tavern. Returns per group its ID, name, type, summary and member count.

    Inputs

    typestringrequired
    Comma-separated group types: party, guilds, privateGuilds, publicGuilds, tavern. Example: party,guilds.
    pageinteger
    Page number (from 0) when paginating public guilds. Example: 0.
    paginateboolean
    Set to true to page public guilds. Example: true.
  • habitica_inbox_messages_listList your private messages, 10 per page, optionally one conversation.Read-only

    List Private Messages

    List your private messages, 10 per page, optionally one conversation. Returns messages with sender, text and timestamp.

    Inputs

    conversationstring
    User ID of the other person, to show only that conversation. Example: 4c35f4e5-0a50-4f45-8d2e-1b7c3c6a1f7a.
    pageinteger
    Page number (from 0), 10 messages per page. Example: 0.
  • habitica_member_getGet the public profile of another Habitica user.Read-only

    Get Member Profile

    Get the public profile of another Habitica user. Returns name, stats, class, level, achievements and appearance.

    Inputs

    member_idstringrequired
    Habitica user ID (UUID) of the member. Example: 4c35f4e5-0a50-4f45-8d2e-1b7c3c6a1f7a.