Skip to content

Build a tool with an AI agent

This guide shows how to build a tool on SweatStack Tools by describing it to an AI coding agent, from installing the CLI to sharing the tool's link.

Beta

SweatStack Tools is in beta and is subject to breaking changes. If you plan to use it in production, email [email protected] before you integrate, so we can tell you about changes in advance and help you migrate.

You don't write the code yourself. You tell the agent what the tool should show and do, and the agent writes, runs and deploys it with the SweatStack CLI. You need a terminal and an AI coding agent that reads Agent Skills, such as Claude Code, Codex or Cursor.

What it costs

Your first tool is free to create. Creating another one needs a Toolbox. Every tool works on your data for 14 days from the first time you open it. After that, it needs a Toolbox. This applies to your own tools too. See pricing.

Prepare your computer

  1. Install the SweatStack CLI:

    curl -LsSf sweatstack.no/install-cli | sh
    
    powershell -ExecutionPolicy ByPass -c "irm sweatstack.no/install-cli-windows | iex"
    
  2. Check that the version is 0.18.0 or later:

    sweatstack --version
    

    If it's older, run uv tool upgrade sweatstack-cli.

  3. Sign in with your SweatStack account:

    sweatstack login
    
  4. Install the SweatStack skill in your agent. This needs Node.js:

    npx skills add SweatStack/sweatstack-skills
    

Describe the tool

  1. Make an empty folder for the tool, and open your agent in it.
  2. Tell the agent what the tool should show, which data it reads and what it calculates. For example:

    Build a SweatStack tool that shows my best power at every duration over the last 90 days of cycling, fresh and after 1,000 kJ of work, with a table of my best efforts at 5 seconds, 1 minute, 5 minutes and 20 minutes.

The agent runs sweatstack tool create, which creates a private tool and a working starting point, and then changes it to do what you asked. On your first tool, the CLI asks for a handle and a public name. Your handle is part of every tool's address, and you can't change it later.

If a command says that it needs your passkey, run sweatstack login, and ask the agent to run the command again.

Check the tool on your computer

  1. Ask the agent to run the tool with sweatstack tool serve.
  2. Open the address it prints in Chrome or Firefox. Safari doesn't keep the sign-in on your computer.
  3. Sign in, and let the tool read the data it asks for.
  4. Tell the agent what to change, and reload the page to see the result.

The tool reads your real data from SweatStack. If you connected an account just now, your history may still be arriving, and a tool shows only data that is already in SweatStack.

Deploy the tool

Ask the agent to deploy it:

sweatstack tool deploy

The tool is now live at https://{name}-{handle}.sweatstack.tools, and it's private: only you can open it, after you sign in. Every later deploy replaces it. sweatstack tool rollback serves the previous version again.

Share the tool

Publish it to the library:

sweatstack tool publish

Or share it only with people who have the link:

sweatstack tool publish --unlisted

tool publish asks you to accept the developer terms and the Data Processing Agreement first. sweatstack tool unpublish makes the tool private again. Anyone who opens the tool runs it on their own data.

Write in the tool's description which method it uses and where it comes from: the model, the paper, the assumptions. People decide whether to trust a tool's numbers from that, and from who built it.

Next steps

  • SweatStack Tools: what a tool can and can't reach, and what SweatStack does to its files.
  • Dependencies: how to ship libraries such as DuckDB-WASM and Pyodide inside a tool.
  • Sign-in: how a tool calls the SweatStack API.