Skip to main content

Overview

Every tool you create on Constants is automatically available through multiple interfaces — all backed by the same execution engine, credential resolution, and audit trail.
InterfaceHow It Works
Web UIGenerated form with file upload, streaming logs, and artifact download
Agent ChatBuilt-in AI assistant that discovers and runs your tools
MCPModel Context Protocol endpoint for any MCP-compatible AI agent
Slack BotMention the bot in Slack to run tools conversationally
REST APIProgrammatic POST /v1/run/[toolName] for automation

Agent Chat

What Is It?

Constants includes a built-in AI assistant powered by Claude that can discover your tools, understand what they do, and execute them in multi-step workflows.

How to Use

  1. Open the Agent tab from the sidebar
  2. Start a new conversation or continue an existing one
  3. Ask the agent to find and run tools, analyze results, or chain multiple tools together

Capabilities

The agent sees all tools you own and tools shared with you. Ask it “what tools do I have?” or describe what you need — it will find the right tool.
The agent executes tools in the same E2B sandboxes as the UI. Results include full output, artifacts, and run logging.
Attach files to your chat messages. The agent auto-maps files to tool input fields by matching MIME types against the tool’s accept patterns. If required files are missing, the agent asks for them.
The agent maintains conversation context across turns. Chain tool executions, ask follow-up questions about results, or refine parameters based on output.

Architecture

The agent system uses a split architecture for reliability:
  • Web app: Handles authentication, creates conversation records, enqueues agent runs
  • Agent worker: Standalone process that polls the database, runs Claude Agent SDK, and streams events back
This ensures long-running LLM + tool execution loops don’t hit serverless timeouts.

MCP (Model Context Protocol)

What Is It?

MCP is an open protocol for AI agents to discover and execute tools. Every Constants tool is automatically exposed as an MCP tool — no extra configuration needed.

Setup

Add the Constants MCP server to your agent or IDE configuration:
{
  "mcpServers": {
    "constants": {
      "url": "https://constants.io/api/mcp",
      "apiKey": "YOUR_API_KEY"
    }
  }
}

How It Works

  1. Discovery: Agent calls tools/list to see all available tools (owned + shared)
  2. Execution: Agent calls tools/call with tool name and arguments
  3. Results: Output returned with the same structure as UI execution
Each tool is exposed with:
  • A sanitized name (tool title + unique ID suffix)
  • Description from the tool summary
  • Input schema derived from the interface schema

Governance

MCP executions get the same governance as UI runs:
  • Credentials resolved through the same binding chain
  • Runs logged with triggeredBy: "agent" and triggerSource: "mcp"
  • Full audit trail with input/output, timing, and credential sources

Slack Bot

Installation

  1. Go to your organization settings in Constants
  2. Click Connect Slack
  3. Authorize the Constants bot for your Slack workspace
  4. Choose a default configuration for the bot

Usage

Mention the bot in any channel or thread:
@Constants process this CSV with the report generator

How It Works

1

Mention Detected

Slack sends an app_mention event to Constants. The bot posts a “Working on it…” message immediately.
2

Context Gathered

If the mention is in a thread, the bot reads the last 50 messages for context, enabling multi-turn interactions.
3

Agent Processes

The request is queued as an agent run. The agent worker picks it up, runs Claude with your tools available, and determines which tool to use.
4

Results Posted

The bot updates its message with results formatted in Slack Block Kit — structured output with clear formatting.

Thread Conversations

The Slack bot supports multi-turn interactions within threads:
User: @Constants what tools do I have for data processing?
Bot: You have these tools available: CSV Processor, JSON Transformer, Report Generator...

User: @Constants run the CSV processor on the Q4 sales data with region=APAC
Bot: ✅ Processed 3,847 rows. 1,204 matched region=APAC.

REST API (V1)

Overview

For programmatic access and automation, use the V1 REST API:
# List available tools
curl -X GET https://constants.io/api/v1/tools \
  -H "Authorization: Bearer YOUR_API_KEY"

# Execute a tool
curl -X POST https://constants.io/api/v1/run/my_tool_abc123 \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"param1": "value1"}'

Key Endpoints

MethodEndpointDescription
GET/v1/toolsList tools with schemas
POST/v1/run/:toolNameExecute a tool (waits up to 50s)
GET/v1/skill/:toolNameGet tool documentation as markdown
GET/v1/skills/searchSearch available tools
See the API Reference for full details.

API Keys

All programmatic interfaces (REST API, MCP, Slack bot) use API keys for authentication.

Creating Keys

  1. Click your profile icon → API Keys
  2. Click Create New Key
  3. Choose scopes:
    • mcp:read — List tools and view schemas
    • mcp:execute — Execute tools

Key Security

  • Keys are hashed before storage — Constants never stores the plain key
  • Each key has configurable scopes for least-privilege access
  • Keys can be revoked individually at any time
  • Usage is tracked per-key for audit purposes

Organizations & Access

Tool Visibility

Access LevelWho Can See/Run
OwnerThe user who created the tool
SharedSpecific users added via email sharing
OrganizationAll members of the tool’s organization
FeaturedPublic discovery (admin-curated)

Cross-Interface Consistency

Regardless of which interface triggers execution:
  • Same credential resolution chain (org binding → personal → auto-match → runtime)
  • Same E2B sandbox with same compute tier and resource limits
  • Same run logging with full context (caller type, trigger source, credential sources)
  • Same quota accounting against the organization

What’s Next?

API Reference

Full API documentation with examples

Architecture

Deep dive into the system architecture