Validation & Version Locking
Node.js serves as the execution foundation. Version drift is a common failure point in AI workflow runtimes, as underlying dependencies often require specific V8 engine features. Use NVM to isolate and lock the runtime version before installing platform tooling.
# Install and activate the required Node.js version
nvm install 20
nvm use 20
# Verify runtime alignment
node --version
npm --version
Production teams should commit an .nvmrc file to the repository root to enforce version consistency across CI/CD pipelines and developer machines.
2. CLI Installation & Path Resolution
The platform tooling is distributed as a scoped npm package. Global installation enables direct terminal access, but path resolution failures are common when npm's global prefix is misconfigured.
# Install the orchestration CLI globally
npm install -g @hexabot-ai/cli
# Validate installation and access command registry
hexabot --help
If global path resolution fails, fall back to the npm execution wrapper:
npx @hexabot-ai/cli --help
3. Project Scaffolding & Credential Initialization
The scaffold command generates a deterministic workspace structure, initializes the local database, and provisions the administrative interface. During execution, the CLI prompts for initial admin credentials. These are stored securely in the local runtime and should never be committed to version control.
# Generate a new workflow orchestration workspace
hexabot init enterprise-ai-orchestrator
# Navigate into the generated project root
cd enterprise-ai-orchestrator
The scaffold creates a standardized directory layout containing workflow definitions, action handlers, channel adapters, and configuration manifests. This structure enforces separation of concerns and simplifies future scaling.
4. Local Runtime Initialization
The development server command boots the unified runtime, attaches the database layer, and exposes the administrative dashboard and API documentation endpoints.
# Launch the local development environment
hexabot dev
Once the runtime stabilizes, the following endpoints become available:
- Administrative dashboard:
http://localhost:3000
- REST/GraphQL API gateway:
http://localhost:3000/api
- Interactive documentation:
http://localhost:3000/docs
Architecture Decisions & Rationale
- Single Runtime Model: Hexabot consolidates workflow execution, agent orchestration, and channel routing into one process. This eliminates inter-service latency and simplifies debugging.
- CLI-Driven Schema Management: Database migrations are versioned and executed via
hexabot migrate. This ensures schema evolution aligns with CLI updates and prevents drift between development and production environments.
- Environment Isolation: The scaffold generates a
.env template for runtime configuration. Secrets, API keys, and channel credentials are injected at startup, maintaining security boundaries.
- Docker Compatibility: While the CLI handles core runtime provisioning, external services (vector databases, message brokers, LLM proxies) are best managed via Docker Compose. The scaffold includes override templates for seamless integration.
Pitfall Guide
1. Global CLI Path Conflicts
Explanation: npm's global binary directory is not included in the system $PATH, causing command not found errors despite successful installation.
Fix: Verify the global prefix with npm config get prefix and ensure it is exported in your shell profile. Alternatively, use npx @hexabot-ai/cli for isolated execution.
2. Node.js Version Drift
Explanation: Running an unsupported Node.js version triggers V8 compatibility errors or dependency resolution failures during runtime initialization.
Fix: Lock the runtime version using NVM and commit .nvmrc to the project root. Validate versions in CI pipelines before executing CLI commands.
3. Port Binding Collisions
Explanation: The default runtime binds to port 3000. Conflicts occur when other development servers (React, Next.js, or legacy APIs) occupy the same port.
Fix: Terminate the conflicting process using lsof -i :3000 or override the binding via the HEXABOT_PORT environment variable in your configuration manifest.
4. Skipping Database Migrations
Explanation: CLI updates often introduce schema changes. Failing to run migrations results in missing tables, type mismatches, or runtime crashes.
Fix: Execute hexabot migrate after every CLI upgrade or when pulling schema updates from version control. Automate this step in your deployment pipeline.
5. Admin Credential Hardcoding
Explanation: Storing initial admin credentials in .env files or version control exposes administrative access to unauthorized parties.
Fix: Use a secrets manager or CI/CD variable injection for production deployments. Rotate credentials immediately after initial setup and enforce MFA on the admin interface.
6. Ignoring Docker Dependencies
Explanation: The CLI manages the core runtime but does not provision external services like vector stores, caching layers, or LLM proxies. Assuming full self-containment leads to missing dependencies.
Fix: Maintain a docker-compose.yml file for external services. Use the CLI's Docker override templates to align container networking with the local runtime.
7. Running Development Builds in Staging
Explanation: Using hexabot dev in non-production environments enables hot-reloading, verbose logging, and unoptimized asset compilation, degrading performance and security.
Fix: Use production-optimized build commands for staging and live environments. Disable debug endpoints and enforce rate limiting on the API gateway.
Production Bundle
Action Checklist
Decision Matrix
| Scenario | Recommended Approach | Why | Cost Impact |
|---|
| Local Development | hexabot dev with NVM isolation | Enables hot-reloading, verbose logging, and rapid iteration | Minimal infrastructure cost |
| Staging Validation | Production build with Docker Compose | Mirrors live environment, disables debug endpoints, enforces security boundaries | Moderate compute cost |
| Production Deployment | Containerized runtime with secrets manager | Ensures scalability, credential isolation, and automated scaling | Higher infrastructure cost, optimized for reliability |
| Multi-Tenant Workflows | CLI scaffold with namespace routing | Isolates tenant data, enforces access controls, simplifies billing integration | Increased configuration overhead, lower per-tenant cost |
Configuration Template
Copy this template into your project root to standardize runtime behavior. Adjust environment variables to match your deployment target.
# Runtime Configuration
HEXABOT_ENV=development
HEXABOT_PORT=3000
HEXABOT_LOG_LEVEL=info
# Database Connection
HEXABOT_DB_HOST=localhost
HEXABOT_DB_PORT=5432
HEXABOT_DB_NAME=hexabot_local
HEXABOT_DB_USER=workflow_admin
HEXABOT_DB_PASSWORD=CHANGE_ME_IN_PRODUCTION
# API & Documentation
HEXABOT_API_BASE=/api
HEXABOT_DOCS_ENABLED=true
# Security & Access
HEXABOT_ADMIN_MFA_ENABLED=false
HEXABOT_RATE_LIMIT_REQUESTS=100
HEXABOT_RATE_LIMIT_WINDOW=60
# External Service Proxies
HEXABOT_LLM_PROXY_URL=http://localhost:8080/v1
HEXABOT_VECTOR_STORE_ENDPOINT=http://localhost:9200
Quick Start Guide
- Install the CLI: Run
npm install -g @hexabot-ai/cli and verify with hexabot --help.
- Generate Workspace: Execute
hexabot init my-ai-workspace, provide admin credentials when prompted, and navigate into the directory.
- Configure Environment: Duplicate the
.env.example file, populate runtime variables, and ensure database credentials match your local instance.
- Initialize Schema: Run
hexabot migrate to apply database migrations and align the runtime with the current CLI version.
- Launch Runtime: Start the development server with
hexabot dev, then access the administrative dashboard at http://localhost:3000 and API documentation at http://localhost:3000/docs.