We're excited to announce a major enhancement to the ChatBotKit CLI - a powerful new agent mode that brings autonomous AI capabilities directly to your command line. Now you can use your ChatBotKit bots combined with local file system and command execution tools to automate development tasks, business processes, and much more.
What is Agent Mode?
Agent mode transforms the ChatBotKit CLI into an autonomous AI assistant that can interact with your local environment while leveraging the full power of your ChatBotKit platform resources. It bridges the gap between your local development environment and remote integrations, enabling powerful automation workflows that were previously complex to implement.
Key Features
Local File System Access
The CLI agent comes with built-in tools for interacting with your local file system:
read- Read file contentswrite- Write content to filesedit- Replace exact string occurrences (single match only)find- Search for files using patternsexec- Execute shell commands with configurable timeouts
These tools enable your agent to work directly with your codebase, configuration files, and project structure.
Full Platform Integration
Agent mode runs with complete ChatBotKit platform capabilities, meaning your CLI agent can:
- Access all configured integrations - Slack, Discord, Jira, Linear, Google Workspace, Notion, and 30+ more services
- Query datasets - Retrieve information from your knowledge bases
- Use skillsets and abilities - Leverage pre-built capabilities and custom functions
- Maintain authenticated sessions - No need to manage OAuth flows or API keys for integrated services
This combination of local and remote capabilities is what makes the CLI agent truly powerful.
Simple Command-Line Interface
Getting started is incredibly simple:
# Install globally npm install --global @chatbotkit/cli # Set your API token (one-time setup) export CHATBOTKIT_API_TOKEN=your_token_here # Run an agent task cbk agent -p "Create a new file and write hello world to it"
Real-World Use Cases
Development & Coding Assistance
Automated Code Reviews:
cbk agent -p "Read all .js files in src/, check for console.log statements, create a report.md listing the files and line numbers where they appear"
Project Setup:
cbk agent -p "Create a standard Node.js project structure with package.json, src/ folder, README.md, and .gitignore. Include common scripts for testing and building."
Refactoring Helper:
cbk agent -p "Find all files using the old API pattern 'fetchData()', show me the occurrences, and update them to use the new 'getData()' pattern"
Business Process Automation
Document Processing:
cbk agent -p "Read all PDF invoices in the ./invoices folder, extract key data, create a spreadsheet summary, and send it to #finance Slack channel"
Report Generation:
cbk agent -p "Analyze the last 30 days of application logs, identify error patterns, create a summary report, and post it to our Notion workspace"
Data Synchronization:
cbk agent -p "Read customer data from local CSV, validate email addresses, cross-reference with our CRM via API, and update records that have changed"
DevOps & System Administration
Deployment Checks:
cbk agent -p "Check git status, verify all tests pass, ensure no console statements in production code, then create a deployment checklist in Jira"
System Monitoring:
cbk agent -p "Check disk usage, analyze recent error logs, if any issues found create alerts in PagerDuty and notify the team via Slack"
Backup Verification:
cbk agent -p "Verify all backup files exist, check their integrity, compare sizes with previous backups, and log results to Google Sheets"
Content Management
Bulk Content Updates:
cbk agent -p "Read all markdown files in content/blog/, update the front matter to include new SEO fields, and create a summary of changes"
Asset Organization:
cbk agent -p "Find all images in assets/, resize images larger than 2MB, optimize them, and update all references in markdown files"
Advanced Configuration
Custom Tool Selection
Choose specific tools for enhanced security or focused functionality:
# Only allow read and write operations cbk agent -t read,write -p "Create a backup of package.json" # All tools except exec for safety cbk agent -t read,write,edit,find -p "Refactor component files"
Model Selection
Use different AI models based on your task requirements:
# Use GPT-5 for complex reasoning cbk agent -m gpt-5 -p "Analyze codebase and suggest architectural improvements" # Use Claude for creative tasks cbk agent -m claude-4.5 -p "Generate comprehensive documentation for all API endpoints"
Environment Configuration
The CLI supports flexible environment variable configuration:
.env.local- Project-specific settings (current directory).env- Project configuration (current directory)~/.cbk/env- Global user configuration (home directory)
Store your API token globally for convenience:
# Create global config file mkdir -p ~/.cbk echo "CHATBOTKIT_API_TOKEN=your_token_here" > ~/.cbk/env
Override per project as needed with local .env files.
How It Works
The agent mode leverages the ChatBotKit Agent SDK under the hood, providing:
- Autonomous task execution - The agent plans, executes, and adapts without constant supervision
- Built-in error handling - Failed operations are communicated to the agent, which can adjust strategy
- Progress tracking - System tools like
plan,progress, andexitenable sophisticated task management - Type-safe operations - All tools use Zod schemas for validation and error prevention
When you run a command, the agent:
- Analyzes your prompt to understand the task
- Creates an execution plan
- Executes local tools (file operations, shell commands)
- Leverages remote integrations when needed (Slack notifications, Jira tickets, etc.)
- Reports progress and handles errors gracefully
- Exits with a status code when complete
Security Considerations
When using agent mode with local file system and command access:
- Review prompts carefully - Ensure your instructions are clear and won't cause unintended side effects
- Use tool restrictions - Limit available tools with the
tflag when appropriate - Test in safe environments - Try new workflows on test projects first
- Monitor execution - The CLI provides real-time feedback on all operations
- Backup important data - Especially when testing file modification tasks
The agent only has access to files and commands within your current working directory and its subdirectories.
Getting Started
Installation
npm install --global @chatbotkit/cli@latest
Quick Start
# Set up authentication export CHATBOTKIT_API_TOKEN=your_token_here # Try a simple task cbk agent -p "List all JavaScript files in the current directory" # More complex automation cbk agent -p "Read package.json, check for outdated dependencies, create an update plan in updates.md"
Tips for Effective Prompts
- Be specific - Clear instructions yield better results
- Break down complex tasks - Agent mode handles multi-step workflows well
- Mention file paths - Help the agent locate files quickly
- Specify output formats - Tell the agent how you want results formatted
- Include validation steps - Ask the agent to verify its work
API Management Commands
Beyond agent mode, the CLI also provides direct API access for managing ChatBotKit resources:
# List conversations cbk api conversation list # List bots cbk api bot list # Manage datasets cbk api dataset list
Use cbk --help to see all available commands.
What Makes This Unique?
The ChatBotKit CLI with agent mode stands out because it:
- Combines local and remote capabilities - No other tool seamlessly bridges local file operations with 30+ cloud integrations
- Requires minimal setup - Install, add your token, and start automating
- Leverages your existing bots - Use the same ChatBotKit resources you've already configured
- Provides autonomous execution - Agents plan and adapt without requiring step-by-step guidance
- Maintains security - Scoped access and configurable tool restrictions keep you safe
It's like having a highly capable assistant that understands both your local environment and your cloud infrastructure.
Documentation
For comprehensive documentation including command references, examples, and best practices:
What's Next
We're continuously improving the CLI with upcoming features:
- Custom tool plugins - Add your own tools for specialized workflows
- Interactive mode - Multi-turn conversations with the agent
- Session persistence - Resume long-running tasks across CLI sessions
- Workflow templates - Pre-built automation patterns for common scenarios
- Enhanced logging - Detailed execution traces for debugging
Examples to Try
Here are some practical examples to get you started:
# Code quality check cbk agent -p "Check all files for TODO comments and create a todos.md list" # Documentation generator cbk agent -p "Read all .js files, extract JSDoc comments, generate API docs in docs/" # Environment validator cbk agent -p "Check if all required environment variables from .env.example exist" # Git workflow cbk agent -p "Create a feature branch, list uncommitted changes, suggest commit message" # Project statistics cbk agent -p "Count lines of code by file type, create a stats report with breakdown"
Join the Community
We'd love to hear about your automation workflows! Share your CLI agent use cases, ask questions, and provide feedback:
- Email: support@chatbotkit.com
- Discord: Join our community
- GitHub: Report issues or contribute