Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.constants.io/llms.txt

Use this file to discover all available pages before exploring further.

What We’re Building

We’ll create a tool that filters a CSV file by a column value and outputs the filtered result — with a UI, API endpoint, and Slack access, all in about 10 minutes.

Prerequisites

  • A Constants account (sign up here)
  • A script, GitHub repo, or idea for a tool

Step 1: Create Your Tool

From the dashboard, click Create new Tool. You have three options:

Option A: Import from GitHub

Paste a URL pointing to your script:
https://github.com/your-org/analytics/blob/main/scripts/generate_report.py
Constants fetches the repo, analyzes the script, and generates the tool automatically.

Option B: Upload Directly

Drag and drop your script files into the composer, or click the upload button. Multi-file projects are supported.

Option C: Describe What You Need

Create a tool that takes a CSV file, filters rows where status = 'active',
and outputs a new CSV with only those rows plus a count of filtered records.
Option C is the easiest way to get started. For production use, importing from GitHub gives you provenance tracking.

Step 2: Review the Generated Interface

Constants defines an interface for your tool — the inputs it accepts and the outputs it produces. For our CSV filter example: Inputs:
  • input_file — CSV file to process (file upload)
  • filter_column — Column name to filter on (text)
  • filter_value — Value to match (text)
Outputs:
  • filtered_count — Number of matching rows (number)
  • output_file — Filtered CSV (downloadable file)
This interface drives the web UI form, the API contract, and the MCP tool definition — so they’re always in sync.

Step 3: Watch It Build

Constants generates your tool in parallel:
  1. Frontend — A form-based UI with file upload, validation, and result display
  2. Backend — Python code that runs in a secure sandbox
You’ll see real-time progress as each part completes.

Step 4: Configure Settings

Choose the right resources for your tool:
TierBest For
SmallLight operations, simple filtering, API calls
MediumData processing, moderate computation (default)
LargeHeavy computation, video processing, large datasets
GPUML inference, image generation
If your tool needs API keys or cloud credentials, add them in the Credentials section. They’re encrypted and injected securely at runtime — tool users never see the actual values.
The runtime includes pandas, numpy, scipy, cloud SDKs, ffmpeg, and more out of the box. Additional Python packages are added automatically based on your tool’s needs.

Step 5: Run Your Tool

  1. Upload your input CSV file
  2. Fill in the filter column and value
  3. Click Run
Watch the execution in real time — streaming logs show progress, and artifacts appear when complete.

Step 6: Access Results

After the run completes:
  • Download output files (the filtered CSV)
  • View structured output data (row counts, summaries)
  • Inspect full execution logs
  • Replay the run with the same inputs
Every run is recorded with full context for debugging and auditing.

Step 7: Share Your Tool

Click Share to get a link. Recipients can view the tool, enter their own parameters, and run it — no setup required.

Share with Your Team

Add the tool to a team workspace:
  • All members get access based on their role
  • Shared credentials work across the team
  • Usage counts against the workspace quota

Use from Code or Agents

Your tool is automatically available via:
  • REST APIPOST /v1/run/your-tool-name with an API key
  • MCP — any MCP-compatible agent can discover and use it
  • Slack — mention the bot to run it conversationally

Step 8: Iterate

Use the conversation interface to refine your tool:
  • “Make the filter case-insensitive”
  • “Add an option to output Excel format”
  • “Support multiple filter conditions”
Each iteration modifies the existing code while preserving what already works.

Next Steps

Features Overview

See everything Constants can do

API Reference

Set up programmatic access and agent integration