Dynamic Shell Toolkit with Installable Skillsets

An AI agent that demonstrates dynamically installing skillsets as executable shell commands, turning ChatBotKit abilities into a powerful command-line interface that extends on demand. Features AI image generation, Gmail integration, and CRM automation with Instantly.

shell
skillset installation
command-line tools
661

The Dynamic Shell Toolkit blueprint showcases a powerful architectural pattern: installing skillsets as executable commands in a shell environment. This transforms abstract AI abilities into tangible command-line tools that can be invoked, piped, and composed like traditional Unix utilities.

The core innovation here is the shell/skillset/install[by-id] ability, which takes any skillset and makes it available as a shell command. When you install a skillset into the shell environment, its abilities become subcommands of that skillset's command. For example, installing an "email-tools" skillset creates an email-tools command, and its abilities like "search" and "send" become email-tools search and email-tools send.

This architecture demonstrates several powerful concepts. First, it shows how skillsets are not just collections of abilities — they're composable units of functionality that can be loaded and unloaded dynamically. Second, it bridges the gap between conversational AI and traditional scripting, allowing agents to leverage both paradigms. An agent can chat naturally about what needs to be done, then drop into shell mode to execute complex command pipelines with precise control.

The blueprint includes three specialized skillsets that showcase real-world integrations: Image Tools for AI-powered image generation and modification using GPT Image 1.5, Email Tools for Gmail integration with message search, send, and draft capabilities, and CRM Tools for Instantly.ai lead and campaign management. The agent discovers these skillsets at runtime using the blueprint/resource/list ability, installs the ones it needs using shell/skillset/install[by-id], and then executes shell commands that invoke them.

Practical use cases include building marketing automation pipelines where agents generate personalized images and add leads to email campaigns, creating sales assistants that search Gmail for prospect conversations and sync with CRM, constructing content workflows that generate images and distribute via email, and building self-extending automation systems that discover and install new capabilities as needed.

The shell environment is sandboxed and isolated per agent instance, making this pattern safe for multi-tenant scenarios. Each agent gets its own workspace where installed commands persist for the session but don't leak to other users. The timeout parameter (max 5 minutes) prevents runaway processes, and the space parameter ensures file operations are contained within the agent's designated storage.

To extend this blueprint, add more specialized skillsets for different domains (database operations, cloud API interactions, monitoring tools), implement a command registry that tracks installed tools and their versions, create wrapper scripts that combine multiple skillset commands into higher-level workflows, or build a package manager concept where skillsets declare dependencies on other skillsets and auto-install them.

This pattern is particularly valuable for marketing automation, sales workflows, content creation pipelines, and any scenario where structured command execution with real integrations is preferable to purely conversational interaction. It combines the flexibility of AI with the precision and composability of shell scripting.

Backstory

Common information about the bot's experience, skills and personality. For more information, see the Backstory documentation.

You are a Shell Toolkit Agent that demonstrates the powerful pattern of installing skillsets as executable shell commands. Your workspace is a shell environment where you can dynamically extend your capabilities by loading skillsets on demand. CORE WORKFLOW: 1. DISCOVER AVAILABLE TOOLS - Use the "List Available Skillsets" ability to see what toolsets are available in your blueprint - Each skillset represents a category of tools (image, email, CRM, etc.) - Review the skillset names and descriptions to understand their purposes 2. INSTALL SKILLSETS AS COMMANDS - Use the "Install Skillset as Shell Command" ability to load a skillset into your shell environment - Provide the skillset ID to install it - Once installed, the skillset becomes an executable command - The skillset's abilities become subcommands you can invoke 3. EXECUTE SHELL COMMANDS - Use the "Execute Shell Command" ability to run commands - Installed skillsets can be invoked like: `skillsetname subcommand --args` - Combine commands with pipes, redirects, and shell features - Chain multiple commands together for complex workflows 4. MANAGE FILES AND DATA - Use shell read/write abilities to persist results - Store command outputs, logs, and processing artifacts - Build scripts that orchestrate multiple tools AVAILABLE SKILLSETS: - Image Tools: Generate and modify images using GPT Image 1.5 model - Email Tools: Search, send, and manage Gmail messages and drafts - CRM Tools: Manage Instantly.ai campaigns and leads EXAMPLE WORKFLOW: When asked to create a marketing campaign: 1. List available skillsets to find "Image Tools", "Email Tools", "CRM Tools" 2. Install the Image Tools: generates product images 3. Install the CRM Tools: add leads to campaigns 4. Install the Email Tools: send personalized emails 5. Execute commands to orchestrate the workflow IMPORTANT CONCEPTS: - Skillsets as Tools: Each skillset is a command-line tool - Abilities as Subcommands: Each ability in the skillset is a subcommand - Dynamic Loading: You choose which tools to load based on the task - Shell Integration: Everything works like standard Unix commands Current date: ${EARTH_DATE} Your goal is to demonstrate this powerful pattern of extending shell environments with AI-powered tools that can be installed dynamically.

Skillset

This example uses a dedicated Skillset. Skillsets are collections of abilities that can be used to create a bot with a specific set of functions and features it can perform.

  • 🎿

    List Available Skillsets

    Discover all installable skillsets (toolkits) available in this blueprint
  • ♻️

    Install Skillset as Shell Command

    Install a skillset into the shell environment as an executable command
  • 🎐

    Execute Shell Command

    Execute shell commands including installed skillset commands
  • 🏢

    Read File

    Read files from the shell workspace
  • 🏢

    Write File

    Write files to the shell workspace
  • Search Gmail

    Search for messages in Gmail using query syntax
  • 💬

    Send Email

    Send an email message via Gmail
  • 🅰️

    Create Draft

    Create a draft email in Gmail
  • 🐀

    Generate Image

    Generate an image using GPT Image 1.5 model
  • Modify Image

    Modify an existing image using GPT Image 1.5 model
  • List Campaigns

    List all Instantly.ai campaigns
  • Add Lead to Campaign

    Add a lead to an Instantly.ai campaign
  • Campaign Summary

    Get analytics summary for an Instantly.ai campaign

Secrets

This example uses Secrets to store sensitive information such as API keys, passwords, and other credentials.

  • 🔐

    Google Mail

    OAuth connection to Gmail for email operations
  • 🔐

    Instantly API Key

    API key for Instantly.ai CRM operations

Terraform Code

This blueprint can be deployed using Terraform, enabling infrastructure-as-code management of your ChatBotKit resources. Use the code below to recreate this example in your own environment.

Copy this Terraform configuration to deploy the blueprint resources:

Next steps:

  1. Save the code above to a file named main.tf
  2. Set your API key: export CHATBOTKIT_API_KEY=your-api-key
  3. Run terraform init to initialize
  4. Run terraform plan to preview changes
  5. Run terraform apply to deploy

Learn more about the Terraform provider

A dedicated team of experts is available to help you create your perfect chatbot. Reach out via or chat for more information.