WisebotAI

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/cli
pnpm add -g @wisebotai/cli

Alternatively: 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)

ContextVariablesUsed for
Dashboard APIWISEBOTAI_BASE_URL, WISEBOT_ACCESS_TOKEN or WISE_KEYwisebot status, agents list, logs, api-keys list, webhooks list, and any fetch to https://<app>/api/v1/…
Workflow webhookWISEBOT_WORKFLOW_TRIGGER_ORIGIN, WISEBOT_WORKFLOW_SECRETwisebot 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.com or http://app.wisebotai.com).
  • WISEBOT_ACCESS_TOKEN / WISE_KEY — Dashboard JWT or organization API key (wb_live_…) for Authorization: Bearer on /api/v1/….
  • WISEBOT_WORKFLOW_TRIGGER_ORIGIN — HTTPS origin for /workflows/trigger (scheme + host, no path). The CLI also accepts WISEBOT_CONVEX_SITE or CONVEX_SITE_URL if WISEBOT_WORKFLOW_TRIGGER_ORIGIN is 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

HTTPGET {WISEBOTAI_BASE_URL}/api/v1/status
AuthAuthorization: BearerWISEBOT_ACCESS_TOKEN or WISE_KEY
PurposeSession 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 status

wisebot logs --tail

HTTPGET {WISEBOTAI_BASE_URL}/api/v1/activity?limit=20
AuthDashboard JWT or org API key
PurposeRecent 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 --tail

wisebot agents list

HTTPGET {WISEBOTAI_BASE_URL}/api/v1/agents
AuthDashboard JWT or org API key
PurposeList agents for the authenticated organization.

Example

wisebot agents list

wisebot api-keys list

HTTPGET {WISEBOTAI_BASE_URL}/api/v1/api-keys
AuthDashboard JWT onlywb_live_ API keys return 401
PurposeMetadata for API keys (prefixes, labels)—not the secret values.

Example

wisebot api-keys list

wisebot webhooks list

HTTPGET {WISEBOTAI_BASE_URL}/api/v1/webhooks
AuthDashboard JWT onlywb_live_ API keys return 401
PurposeList configured webhook endpoints for the organization.

Example

wisebot webhooks list

wisebot workflow trigger <workflowId> [--data '<json>']

HTTPPOST {ORIGIN}/workflows/trigger?workflowId=<id>
AuthAuthorization: BearerWISEBOT_WORKFLOW_SECRET (not the dashboard token)
BodyOptional 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)

CommandHTTP (summary)
wisebot statusGET /api/v1/status
wisebot logs --tailGET /api/v1/activity?limit=20
wisebot agents listGET /api/v1/agents
wisebot api-keys listGET /api/v1/api-keys (JWT only)
wisebot webhooks listGET /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 IDGET /api/v1/playground/sessions?agentId=…
wisebot playground session resume --conversation IDPOST /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 IDGET /api/v1/playground/approvals/pending
wisebot playground approve --id IDPOST /api/v1/playground/approvals/{id}/approve
wisebot playground deny --id IDPOST /api/v1/playground/approvals/{id}/deny
wisebot playground stop --conversation IDPOST /api/v1/playground/runs/stop
wisebot playground messages --thread IDGET /api/v1/playground/messages
wisebot playground traces --run IDGET /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:

PathOriginAuthBody
WebhookConvex site /workflows/trigger?workflowId=Per-workflow secretFlat JSON keys
Dashboard APIWeb 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 JWTwb_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

NeedUse
Scripts and CI against dashboard datawisebot + WISEBOTAI_BASE_URL / token, or HTTPS in your language
TypeScript integrations (agents, chat, playground, workflows)TypeScript SDK (@wisebotai/sdk)
Python backends and scriptsPython integration (HTTP)requests / httpx + same URLs as the CLI
Workflow webhook from external systemsWorkflow webhooks — curl, wisebot workflow trigger, or HTTP POST to /workflows/trigger
Workflow run with dashboard credentialsPOST /api/v1/flow/{id} or client.workflows.run() — see TypeScript SDK
Full product UIDashboard (Analytics, Inbox, and so on)