StateSet ResponseCX CLI
AI-powered CLI for managing the StateSet ResponseCX platform. Chat with an AI agent that can manage your agents, rules, skills, knowledge base, channels, messages, and more — all from the terminal. Includes optional WhatsApp and Slack gateways for connecting your agent to messaging platforms.Install
Quick Start
Authentication
The CLI supports two authentication methods: Browser / Device Code (recommended)response auth login, you can provide your GraphQL endpoint and admin secret directly.
Credentials are stored in ~/.stateset/config.json with restricted file permissions (600).
Multiple Organizations
Usage
Interactive Chat
| Command | Description |
|---|---|
/help | Show available commands |
/clear | Reset conversation history |
/history | Show conversation turn count |
/model | Switch model (sonnet, haiku, opus) |
exit | End the session |
\ to continue on the next line. Press Ctrl+C to cancel the current request.
WhatsApp Gateway
Bridge incoming WhatsApp messages to your StateSet Response agent.~/.stateset/whatsapp-auth/.
Options:
Slack Gateway
Bridge Slack messages to your StateSet Response agent via Socket Mode.- Create a Slack app at https://api.slack.com/apps
- Enable Socket Mode (Settings > Socket Mode)
- Generate an app-level token (
xapp-...) withconnections:writescope - Add Bot Token Scopes:
chat:write,app_mentions:read,im:history,channels:history - Install the app to your workspace
- Set environment variables:
- In DMs: responds to all messages
- In channels: responds when @mentioned or in threads the bot has participated in
Environment Variables
| Variable | Required | Description |
|---|---|---|
ANTHROPIC_API_KEY | Yes | Anthropic API key for Claude |
STATESET_INSTANCE_URL | No | StateSet ResponseCX instance URL |
STATESET_GRAPHQL_ENDPOINT | No | GraphQL API endpoint |
STATESET_KB_HOST | No | Knowledge base (Qdrant) host URL |
SLACK_BOT_TOKEN | Slack | Bot User OAuth Token (xoxb-...) |
SLACK_APP_TOKEN | Slack | App-level token for Socket Mode (xapp-...) |
OPENAI_API_KEY | KB | OpenAI API key for knowledge base embeddings |
Available Tools
The AI agent has access to 80+ tools organized by resource type:Agents
list_agents get_agent create_agent update_agent delete_agent bootstrap_agent export_agent
Rules
list_rules get_agent_rules create_rule update_rule delete_rule import_rules bulk_update_rule_status bulk_assign_rules_to_agent bulk_delete_rules
Skills
list_skills get_agent_skills create_skill update_skill delete_skill import_skills bulk_update_skill_status bulk_delete_skills
Attributes
list_attributes create_attribute update_attribute delete_attribute import_attributes
Examples
list_examples create_example update_example delete_example import_examples
Evaluations
list_evals create_eval update_eval delete_eval export_evals_for_finetuning
Datasets
list_datasets get_dataset create_dataset update_dataset delete_dataset add_dataset_entry delete_dataset_entry
Functions
list_functions create_function update_function delete_function import_functions
Responses
list_responses get_response get_response_count bulk_update_response_ratings search_responses
Knowledge Base
kb_search kb_upsert kb_update kb_delete kb_get_collection_info kb_scroll
Channels
list_channels get_channel get_channel_with_messages create_channel update_channel delete_channel get_channel_count
Messages
list_messages get_message create_message update_message delete_message search_messages get_message_count
Settings
list_agent_settings get_agent_settings update_agent_settings get_channel_settings
Organizations
get_organization get_organization_overview update_organization