The Constants Primitives
Constants provides a complete system for generating tools with AI from scripts and prompts. Here are the core primitives:Tool
Spec + entrypoint — a standardized execution unit with explicit inputs/outputs
Version (SHA)
Pinned provenance of code + spec for reproducibility
Run
Inputs, status, logs, timing, cost — full execution record
Artifacts
Outputs from runs: files, tables, reports, models
Core Features
Tool: Spec + Entrypoint
A Tool is a standardized execution unit with:- Explicit inputs and outputs — Typed schemas that define what goes in and what comes out
- Governed runtime — CPU, memory, timeout, and permission boundaries
- Deterministic execution — Same inputs produce same outputs
- Version pinning — Locked to a specific SHA for reproducibility
- From GitHub
- From Upload
- From Prompt
Version: Pinned Provenance
Every Tool is pinned to a specific version:- Git SHA for GitHub imports — exact code snapshot
- Content hash for uploaded scripts — deterministic identifier
- Spec version — the input/output contract at that point in time
- Reproducibility — Run the same code months later
- Auditability — Know exactly what ran and when
- Stability — Source changes don’t break running Tools
Run: Complete Execution Record
Every execution produces a Run with:| Field | Description |
|---|---|
| Inputs | The exact parameters and files provided |
| Status | Running, completed, failed, cancelled |
| Logs | Real-time stdout/stderr capture |
| Timing | Start time, duration, resource usage |
| Cost | Compute resources consumed |
Artifacts: Execution Outputs
Tools produce Artifacts:- Files — CSVs, PDFs, images, models
- Data — JSON responses, structured outputs
- Reports — Generated visualizations and summaries
- Downloadable from the UI
- Accessible via the API
- Linked to their originating Run
Governance Layer
Policy: Permissions & Resources
Define who can run what, with which resources:Access Control
Access Control
- Owner — Full control over the Tool
- Editor — Can modify settings and run
- Runner — Can execute but not modify
- Viewer — Can see runs but not execute
Secrets Management
Secrets Management
- API keys and credentials stored encrypted
- Injected at runtime as environment variables
- Scoped per-Tool — receivers never see values
- Audit log of secret access
Resource Limits
Resource Limits
- CPU: 1-4 cores
- Memory: 512MB - 4GB
- Timeout: 30s - 30min
- Network: Allow/deny external access
Sandbox: Isolated Execution
Every Tool runs in a governed sandbox:- Isolated runtime — Each execution in its own container
- Resource boundaries — CPU/memory limits enforced
- Network controls — External access explicitly granted
- Filesystem isolation — No access to host system
- Clean slate — Fresh environment for each run
Interfaces
Generated UI
Every Tool gets a generated UI:- Form inputs based on the input schema
- File upload for file-type inputs
- Real-time log streaming
- Artifact download buttons
- Run history viewer
API Access
Tools are also accessible programmatically via the REST API for automation and integration into existing workflows. See the API Reference for details.What a Tool Guarantees
| Guarantee | Description |
|---|---|
| Verified Execution | Runs real code, not approximations or guesses |
| Governed Sandbox | Isolated runtime with resource/permission boundaries |
| Observable + Replayable | Logs, artifacts, history, and reruns |
| Reproducible | Pinned to SHA with deterministic semantics |
| Shareable | Anyone with the link can run it — no setup required |
File Handling
Upload and process files in your Tools:- Scripts:
.py,.js,.ts,.sh,.sql - Data:
.csv,.json,.xml,.yaml - Documents:
.pdf,.docx,.txt,.md - Images:
.png,.jpg,.gif,.webp - Spreadsheets:
.xls,.xlsx
File size limits apply based on your plan. Large file handling is available for enterprise accounts.
Conversation Mode
Interact with your Tools through natural language:- Ask questions about run results
- Request modifications to the Tool
- Debug failed runs conversationally
- Get explanations of what the code does
What’s Next?
GitHub Integration
Import scripts from repositories
API Reference
Programmatic access for automation
