Wisebot CLI and HTTP API
Full wisebot CLI reference (@wisebotai/cli)—dashboard API, playground, and workflow webhook commands—plus links to TypeScript and Python HTTP examples.
Wisebot CLI and HTTP API
@wisebotai/cli installs the wisebot command-line tool. It is not limited to workflows: most commands call the web app’s HTTP API (/api/v1/…) for organization metrics, agents, activity, webhooks, and API keys. Only wisebot workflow trigger targets workflow automation webhooks (a different host and credentials).
For workflow triggers from HTTP or scripts, see Triggering workflows (HTTPS & CLI).
Install
Package name: @wisebotai/cli.
npm install -g @wisebotai/clipnpm add -g @wisebotai/cliAlternatively: npx @wisebotai/cli, a project devDependency, or pnpm exec wisebot. If the package is not on the registry you use, ask your administrator how the CLI is distributed.
Environment variables (two different contexts)
| Context | Variables | Used for |
|---|---|---|
| Dashboard API | WISEBOTAI_BASE_URL, WISEBOT_ACCESS_TOKEN or WISE_KEY | wisebot status, agents list, logs, api-keys list, webhooks list, and any fetch to https://<app>/api/v1/… |
| Workflow webhook | WISEBOT_WORKFLOW_TRIGGER_ORIGIN, WISEBOT_WORKFLOW_SECRET | wisebot workflow trigger only—POST to the workflow trigger origin (not the same token as the dashboard API) |
WISEBOTAI_BASE_URL— Web app origin without a path (e.g.https://app.example.comorhttp://app.wisebotai.com).WISEBOT_ACCESS_TOKEN/WISE_KEY— Dashboard JWT or organization API key (wb_live_…) forAuthorization: Beareron/api/v1/….WISEBOT_WORKFLOW_TRIGGER_ORIGIN— HTTPS origin for/workflows/trigger(scheme + host, no path). The CLI also acceptsWISEBOT_CONVEX_SITEorCONVEX_SITE_URLifWISEBOT_WORKFLOW_TRIGGER_ORIGINis unset (same “site” host your administrator uses for Convex HTTP actions).WISEBOT_WORKFLOW_SECRET— Per-workflow webhook secret from the workflow editor.
Run wisebot, wisebot --help, or wisebot -h with no subcommand to print the embedded help (same command list as below).
Command reference (full)
Every subcommand below is implemented in @wisebotai/cli (wisebot). Invalid combinations print Usage: to stderr and exit with code 1. Successful HTTP responses print JSON (pretty-printed where noted) to stdout. Workflow trigger prints the response body (JSON if parseable).
wisebot · wisebot --help · wisebot -h
Prints the built-in help text (environment variables + command list). Does not call the network.
wisebot status
| HTTP | GET {WISEBOTAI_BASE_URL}/api/v1/status |
| Auth | Authorization: Bearer — WISEBOT_ACCESS_TOKEN or WISE_KEY |
| Purpose | Session and organization metrics (same data the dashboard can surface for operators). |
Example
export WISEBOTAI_BASE_URL="https://app.example.com"
export WISE_KEY="wb_live_…"
wisebot statuswisebot logs --tail
| HTTP | GET {WISEBOTAI_BASE_URL}/api/v1/activity?limit=20 |
| Auth | Dashboard JWT or org API key |
| Purpose | Recent conversation activity lines (conversation id, status, timestamp, optional agent name). |
Requirements: the second token must be exactly --tail. wisebot logs without --tail is invalid and prints usage.
Example
wisebot logs --tailwisebot agents list
| HTTP | GET {WISEBOTAI_BASE_URL}/api/v1/agents |
| Auth | Dashboard JWT or org API key |
| Purpose | List agents for the authenticated organization. |
Example
wisebot agents listwisebot api-keys list
| HTTP | GET {WISEBOTAI_BASE_URL}/api/v1/api-keys |
| Auth | Dashboard JWT only — wb_live_ API keys return 401 |
| Purpose | Metadata for API keys (prefixes, labels)—not the secret values. |
Example
wisebot api-keys listwisebot webhooks list
| HTTP | GET {WISEBOTAI_BASE_URL}/api/v1/webhooks |
| Auth | Dashboard JWT only — wb_live_ API keys return 401 |
| Purpose | List configured webhook endpoints for the organization. |
Example
wisebot webhooks listwisebot workflow trigger <workflowId> [--data '<json>']
| HTTP | POST {ORIGIN}/workflows/trigger?workflowId=<id> |
| Auth | Authorization: Bearer — WISEBOT_WORKFLOW_SECRET (not the dashboard token) |
| Body | Optional JSON string; when omitted, the CLI sends a POST without a body. --data must be a single JSON object string (validated before send). |
Origin resolution (ORIGIN): first non-empty env among WISEBOT_WORKFLOW_TRIGGER_ORIGIN, WISEBOT_CONVEX_SITE, CONVEX_SITE_URL (each trimmed, trailing slash removed).
Examples
export WISEBOT_WORKFLOW_TRIGGER_ORIGIN="https://your-deployment.convex.site"
export WISEBOT_WORKFLOW_SECRET="wf_…"
wisebot workflow trigger "jd7abc123xyz"wisebot workflow trigger "jd7abc123xyz" --data '{"message":"from CLI"}'For curl, Node, and Python copies of the same POST, see Triggering workflows.
Quick reference (all commands)
| Command | HTTP (summary) |
|---|---|
wisebot status | GET /api/v1/status |
wisebot logs --tail | GET /api/v1/activity?limit=20 |
wisebot agents list | GET /api/v1/agents |
wisebot api-keys list | GET /api/v1/api-keys (JWT only) |
wisebot webhooks list | GET /api/v1/webhooks (JWT only) |
wisebot workflow trigger <id> [--data json] | POST /workflows/trigger?workflowId=… on workflow origin |
wisebot playground session create [--agent ID] [--force-new] | POST /api/v1/playground/sessions (JWT only) |
wisebot playground sessions list --agent ID | GET /api/v1/playground/sessions?agentId=… |
wisebot playground session resume --conversation ID | POST /api/v1/playground/sessions/resume |
wisebot playground send --conversation ID --session ID --message "…" | POST /api/v1/playground/messages |
wisebot playground wait --conversation ID [--timeout 120] | Polls GET /api/v1/playground/runs/latest |
wisebot playground approvals pending --run ID | GET /api/v1/playground/approvals/pending |
wisebot playground approve --id ID | POST /api/v1/playground/approvals/{id}/approve |
wisebot playground deny --id ID | POST /api/v1/playground/approvals/{id}/deny |
wisebot playground stop --conversation ID | POST /api/v1/playground/runs/stop |
wisebot playground messages --thread ID | GET /api/v1/playground/messages |
wisebot playground traces --run ID | GET /api/v1/playground/runs/{id}/traces |
Dashboard workflow run (not in CLI): POST /api/v1/flow/{workflowId} with JWT or wb_live_ key — see TypeScript SDK.
HTTP “SDK” for dashboard APIs
Use fetch, axios, requests, or any HTTP client against WISEBOTAI_BASE_URL and /api/v1/…, with the same Bearer token as the CLI.
If you use TypeScript or JavaScript, prefer the official TypeScript SDK (@wisebotai/sdk) for typed helpers: create agents, stream chat over SSE (/api/chat/agent), playground runs, workflows.run(), and knowledge by filename—without re-implementing those endpoints by hand. For Python, see Python integration (HTTP) (requests / httpx examples for the same paths).
Two workflow trigger paths:
| Path | Origin | Auth | Body |
|---|---|---|---|
| Webhook | Convex site /workflows/trigger?workflowId= | Per-workflow secret | Flat JSON keys |
| Dashboard API | Web app /api/v1/flow/{workflowId} | JWT or wb_live_ key | { "inputs": { … } } |
See Triggering workflows for webhooks; TypeScript SDK for client.workflows.run().
Example (Node / TypeScript, raw fetch):
const base = process.env.WISEBOTAI_BASE_URL!.replace(/\/$/, "");
const token = process.env.WISEBOT_ACCESS_TOKEN ?? process.env.WISE_KEY;
const res = await fetch(`${base}/api/v1/status`, {
headers: { Authorization: `Bearer ${token}` },
});
const text = await res.text();
if (!res.ok) throw new Error(text || res.statusText);
const data = JSON.parse(text) as Record<string, unknown>;Paths mirror what the CLI calls (/api/v1/status, /api/v1/agents, /api/v1/activity, …). Exact payloads are subject to your deployment version.
For workflow POST examples (different base URL and secret), use Triggering workflows.
Playground commands (JWT only)
Playground subcommands call /api/v1/playground/*. They require a dashboard JWT — wb_live_ API keys return 403.
export WISEBOTAI_BASE_URL=http://app.wisebotai.com
export WISEBOT_ACCESS_TOKEN="<dashboard-jwt>"
wisebot playground session create --agent <agentId> --force-new
wisebot playground sessions list --agent <agentId>
wisebot playground session resume --conversation <conversationId>
wisebot playground send --conversation <id> --session <id> --message "Hello"
wisebot playground wait --conversation <id> --timeout 120
wisebot playground messages --thread <threadId>
wisebot playground traces --run <runId>
wisebot playground stop --conversation <id>
wisebot playground approvals pending --run <runId>
wisebot playground approve --id <approvalId>
wisebot playground deny --id <approvalId>Choosing what to use
| Need | Use |
|---|---|
| Scripts and CI against dashboard data | wisebot + WISEBOTAI_BASE_URL / token, or HTTPS in your language |
| TypeScript integrations (agents, chat, playground, workflows) | TypeScript SDK (@wisebotai/sdk) |
| Python backends and scripts | Python integration (HTTP) — requests / httpx + same URLs as the CLI |
| Workflow webhook from external systems | Workflow webhooks — curl, wisebot workflow trigger, or HTTP POST to /workflows/trigger |
| Workflow run with dashboard credentials | POST /api/v1/flow/{id} or client.workflows.run() — see TypeScript SDK |
| Full product UI | Dashboard (Analytics, Inbox, and so on) |
Related
- Python integration (HTTP) — requests / httpx for every CLI path + workflow
POST - TypeScript SDK (
@wisebotai/sdk) — Typed agents, SSE chat, playground, workflows.run(), knowledge by filename - Getting started — Dashboard layout and organization context
- Triggering workflows (HTTPS & CLI) — Webhook URL, dashboard API, and
POSTbody for Input steps - Workflows overview — Building flows, schedules, and run history