Use TabTab to run AI-powered tasks in a sandboxed multi-agent environment. Supported capabilities:
- General agent: open-ended tasks, writing, research, summarisation
- Data analysis: upload CSV / Excel files, run analytics, generate insights
- Data collection: web scraping and browser automation to collect structured data
- Chart generation: produce charts and visualisations from data
- Deep research: long-form research with web search and synthesised reports
- Database Q&A: natural-language to SQL queries against connected databases
- Slide generation: create PowerPoint presentations
- Web / HTML generation: produce web pages or UI prototypes
Interact via REST API: create tasks, poll status, stream event logs, terminate tasks, and download sandbox output.
The TabTab OpenPlatform exposes REST endpoints under /open/apis/v1/ that let you drive TabTab's multi-agent platform programmatically. Every request must carry an API Key in the Authorization header.
text
Authorization: Bearer sk-<32-hex-chars>
The API Key is obtained from the KMS page(https://tabtabai.com/api-key) in TabTab settings and stored as environment variable TABTAB_API_KEY.
Configuration — Set environment variables
Recommended: write to scripts/env (persists across sessions, not in shell history)
Warning: Commands typed with the key inline (e.g. export TABTAB_API_KEY="sk-...") are saved to shell history (.bash_history / .zsh_history). Prefer the scripts/env file approach above, or set the key via a password manager / secrets tool that avoids writing to history.
Verify configuration
bash
echo "BASE_URL : ${TABTAB_BASE_URL:-https://tabtabai.com}"
echo "API_KEY : ${TABTAB_API_KEY:0:8}…" # print only first 8 chars for safety
# Verify API key is valid before proceeding — stop if this fails
bash scripts/hello.sh
Variable
Required
Description
TABTAB_API_KEY
✅
API Key in sk-… format obtained from KMS page
TABTAB_BASE_URL
❌
Base URL of TabTab instance (default: https://tabtabai.com)
If TABTAB_API_KEY is empty, all scripts will immediately exit with an error.
Required tools
The scripts depend on the following tools — confirm they are installed from trusted packages:
Note: MIME type validation is lenient. The primary validation is based on file extension. This accommodates variations in MIME type reporting across different browsers and systems.
Step 2 — Create a task
Submit a new task and get back a task_id immediately. The task is queued for agent execution; you will poll for its result in the next step.
Create task with files (using scripts)
bash
# First upload files
FILES_INFO=$(TABTAB_FILES="report.pdf chart.png" bash scripts/upload-files.sh)
FILES_JSON=$(echo "$FILES_INFO" | jq -c '.files')
# Then create task with files
TASK_ID=$(TABTAB_MESSAGE="Analyze the attached documents" \
TABTAB_MODE="data_analysis" \
TABTAB_FILES="$FILES_JSON" \
bash scripts/create-task.sh)
STATUS=$(TABTAB_TASK_ID="$TASK_ID" bash scripts/poll-task.sh)
echo "Final status: $STATUS"
For manual polling:
bash
while true; do
STATUS=$(TABTAB_TASK_ID="$TASK_ID" bash scripts/get-status.sh)
echo "status: $STATUS"
case "$STATUS" in
completed | failed | cancelled) break ;;
hitl)
echo "Task is waiting for human input — check the TabTab UI."
break
;;
esac
sleep 5
done
Status lifecycle
text
pending → running → completed
↘ failed
↘ cancelled
↘ hitl (waiting for user action in UI)
Response fields
Field
Description
status
Current task status
status_message
Human-readable detail (non-empty on failed)
Step 4 — Retrieve event log
Fetch all events for a completed (or still-running) task to inspect what the agent did:
bash
# Get all events — stdout is the saved file path
EVENTS_FILE=$(TABTAB_TASK_ID="$TASK_ID" bash scripts/get-events.sh)
jq '.events[].event_type' "$EVENTS_FILE"
# Custom output path
EVENTS_FILE=$(TABTAB_TASK_ID="$TASK_ID" \
TABTAB_EVENTS_FILE=/tmp/my-events.json \
bash scripts/get-events.sh)
# Get incremental events (streaming-style)
LAST_EVENT_ID=""
while true; do
EVENTS_FILE=$(TABTAB_TASK_ID="$TASK_ID" \
TABTAB_FROM_EVENT_ID="$LAST_EVENT_ID" \
bash scripts/get-events.sh)
# Update cursor — read from the saved file
NEW_LAST=$(jq -r '.events[-1].event_id // empty' "$EVENTS_FILE")
[ -n "$NEW_LAST" ] && LAST_EVENT_ID="$NEW_LAST"
# Stop when task is done
STATUS=$(TABTAB_TASK_ID="$TASK_ID" bash scripts/get-status.sh | jq -r '.status')
case "$STATUS" in completed | failed | cancelled) break ;; esac
sleep 3
done
The signal is asynchronous — poll status until it becomes cancelled.
Helper scripts
The skill ships ready-to-use shell scripts under scripts/. Use these scripts for most operations — they handle authentication, JSON parsing, and error handling automatically.
Quick reference
Script
Purpose
hello.sh
Test API connectivity
upload-files.sh
Upload multiple files in batch
create-task.sh
Create a new task
list-tasks.sh
List all tasks with pagination
get-status.sh
Get current status of a task
get-events.sh
Get event log for a task
poll-task.sh
Poll until task finishes (blocking)
download.sh
Download sandbox output as ZIP
terminate-task.sh
Cancel a running task
Complete end-to-end example (reference)
This example shows the complete flow using both scripts and direct curl commands (for reference). For actual usage, prefer the scripts shown above.
bash
# ── Config ─────────────────────────────────────────────
# Set these in your shell session before running (never store secrets in a file):
# export TABTAB_API_KEY="sk-..."
# export TABTAB_BASE_URL="https://tabtabai.com" # optional
BASE="${TABTAB_BASE_URL:-https://tabtabai.com}"
KEY="$TABTAB_API_KEY"
# ── 0. Verify ──────────────────────────────────────────
bash scripts/hello.sh
# ── 1. Upload files ───────────────────────────────────
FILES_INFO=$(TABTAB_FILES="report.pdf chart.png" bash scripts/upload-files.sh)
FILES_JSON=$(echo "$FILES_INFO" | jq -c '.files')
# ── 2. Create task with files ───────────────────────
TASK_ID=$(TABTAB_MESSAGE="Analyze the sales data in attachments and generate trend report" \
TABTAB_MODE="data_analysis" \
TABTAB_FILES="$FILES_JSON" \
bash scripts/create-task.sh)
echo "Created task: $TASK_ID"
# ── 3. Poll ────────────────────────────────────────────
STATUS=$(TABTAB_TASK_ID="$TASK_ID" bash scripts/poll-task.sh)
# ── 4. Download output ─────────────────────────────────
[ "$STATUS" = "completed" ] \
&& TABTAB_TASK_ID="$TASK_ID" bash scripts/download.sh > /dev/null 2>&1 \
&& echo "Download complete"
Error handling
All endpoints return a consistent error body on failure:
Always check the HTTP status code and err_code before proceeding. Do not retry 401/403/404 errors automatically — they require user action.
Best Practices
Always use scripts: They handle authentication, JSON parsing, and error handling automatically
Verify connectivity first: Run bash scripts/hello.sh after setting credentials — if it fails, stop and fix the key before proceeding
Export env vars in your shell session: Set TABTAB_API_KEY (and optionally TABTAB_BASE_URL) via export before using any script. Never store secrets in plain-text files inside the skill directory.
Check response codes: Scripts return proper exit codes; check $? after each call
Capture stderr for progress: Scripts write progress to stderr, output to stdout for capture
Use poll-task.sh for blocking: It waits until completion, simpler than manual polling loops