Package Exports
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@defai.digital/automatosx) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
AutomatosX
Production-ready code intelligence platform with AI agents and workflow orchestration
π v8.0.10 - Ready for npm Publishing (No Warnings)
AutomatosX is a comprehensive code intelligence platform with AI-powered workflow automation:
- Code Intelligence - Tree-sitter AST parsing with SQLite FTS5 search for 44 languages
- AI Agent System - 21 specialized agents for development tasks
- Multi-Provider AI - Claude, Gemini, and OpenAI with automatic fallback
- Workflow Orchestration - ReScript state machines for complex multi-step tasks
- Interactive CLI - ChatGPT-style REPL with natural language interface
- SpecKit Generators - Auto-generate workflows, plans, tests, and project scaffolds
- Iterate Mode - Autonomous retry loops with 10 adaptive strategies
- Validation System - Production-ready type-safe validation (488k ops/sec)
π Requirements
- Node.js: v24.x or higher (Download)
- pnpm: v9.0.0 or higher (Install instructions)
- Supported Operating Systems:
- Ubuntu: 24.04 LTS (Noble Numbat) or later
- macOS: 26 (Tahoe) or later
- Windows: 11 or later
Installing pnpm
# Via npm (recommended)
npm install -g pnpm@9
# Via Homebrew (macOS)
brew install pnpm
# Via winget (Windows)
winget install -e --id pnpm.pnpm
# Verify installation
pnpm --version # Should show 9.x.xWhy pnpm? This project uses pnpm (not npm) because:
- β Better monorepo/workspace support
- β 2-3x faster installations
- β Smaller disk usage (40% reduction)
- β Stricter dependency resolution
See INSTALLATION.md for detailed setup instructions.
π Quick Start (Development)
# Clone the repository
git clone https://github.com/defai-digital/automatosx.git
cd automatosx
# Install dependencies
pnpm install
# Build the project
pnpm run build
# Link CLI binary (makes 'ax' command available globally)
pnpm run link
# Now you can use the CLI directly:
ax find "getUserById"
ax cli # Launch interactive mode
ax speckit spec "Build authentication API"
# Or use via npm script:
npm run cli -- find "getUserById"
# Run tests (745+ tests)
npm testUsing the ax Command
After npm install and npm run build, the ax binary is automatically linked globally via the postinstall script. This means you can use:
# These work anywhere on your system:
ax find "Calculator"
ax def "getUserById"
ax flow "handleRequest"
ax cli # Interactive ChatGPT-style modeTo unlink (if you want to remove the global ax command):
npm run unlink
# Or manually:
npm unlink -g @defai.digital/automatosxπ¦ Installation
For End Users (Recommended)
Install globally with npm:
npm install -g @defai.digital/automatosx
# Verify installation
ax --version
# Use the CLI
ax find "getUserById"
ax cli # Launch interactive modeFor Developers
Clone and build from source:
git clone https://github.com/defai-digital/automatosx.git
cd automatosx
npm install
npm run build
npm linkβ οΈ Installation Warnings
Peer Dependency Warnings
When installing AutomatosX, you may see warnings about tree-sitter peer dependencies:
WARN Issues with peer dependencies found
βββ¬ tree-sitter-c 0.24.1
β βββ β unmet peer tree-sitter@^0.22.4: found 0.25.0These warnings are harmless and can be safely ignored. AutomatosX uses tree-sitter v0.25.0 (latest), while some language parser packages haven't updated their peer dependencies yet. Everything works correctly.
pnpm Build Scripts Warning (pnpm v10+ users)
cp .npmrc.example .npmrc
See [INSTALLATION.md](./INSTALLATION.md#peer-dependency-warnings) for details.
---
See [CLAUDE.md](./CLAUDE.md) for detailed development guide.
## β¨ Core Features
### 1. Code Intelligence Engine
- π **Multi-language search** - 44 languages including TypeScript, Python, Go, Rust, Java, C++
- β‘ **Lightning fast** - Query caching delivers 10-100x speedup (<1ms cached, <5ms uncached)
- π― **Advanced filtering** - Filter by language, symbol kind, or file path
- π **Smart indexing** - Batch operations process 2000+ files/sec
### 2. AI Agent System (21 Specialized Agents)
- π€ **Engineering Agents** - Backend, Frontend, DevOps, Security, Quality, Testing, Performance, Architecture
- π§ **Technical Specialists** - API, Database, Data, DataScience, Mobile, Infrastructure, Standards
- π **Leadership Agents** - Product, CTO, CEO, Writer, Researcher, Community
- π **Collaboration** - Agent-to-agent delegation and task coordination
### 3. Multi-Provider AI Integration
- π **Three Providers** - Claude (Anthropic), Gemini (Google), OpenAI
- π **Automatic Fallback** - Seamless failover with retry logic
- π **Health Monitoring** - Real-time latency and error rate tracking
- βοΈ **Smart Routing** - Priority-based provider selection
### 4. Workflow Orchestration
- π **YAML/JSON Workflows** - Define complex multi-step processes
- π **Dependency Management** - Automatic topological sorting and parallel execution
- πΎ **Checkpoint/Resume** - Resume long-running workflows from any point
- π― **ReScript State Machines** - Deterministic execution with type safety
### 5. Interactive CLI Mode β NEW
- π¬ **ChatGPT-style REPL** - Natural language conversations with AI
- β‘ **15+ slash commands** - `/agent`, `/workflow`, `/memory`, `/history`, `/save`
- π¨ **Rich UX** - Syntax highlighting, table formatting, progress indicators
- πΎ **Auto-save** - Persistent conversations in SQLite
- π **Context-aware** - Pronoun resolution and conversation memory
### 6. SpecKit Auto-Generation β NEW
- π **Spec Generator** - Natural language β YAML workflows (AI-powered)
- π **Plan Generator** - Execution plans with cost/time estimates
- π **DAG Generator** - Dependency graphs (ASCII/DOT/Mermaid)
- ποΈ **Scaffold Generator** - Project structure generation
- π§ͺ **Test Generator** - Unit, integration, E2E test suites
- π **ADR/PRD Generators** - Architecture decisions and product requirements
### 7. Iterate Mode β NEW
- π **Autonomous Retry** - Intelligent retry loops (max 10 iterations)
- π― **10 Strategies** - Timeout, fallback, parallel, circuit breaker, etc.
- π‘οΈ **Safety Levels** - Paranoid, normal, permissive with cost/time limits
- π **Telemetry** - Strategy analytics and recommendations
- π **Error Analysis** - Classify and detect patterns (9 error types)
### 8. Natural Language Interface β NEW
- π£οΈ **Natural Commands** - `ax "run security audit"` β workflow execution
- π― **40+ Intent Patterns** - Pattern matching + LLM fallback
- π **Entity Extraction** - Files, agents, filters, limits
- β **Clarification** - Interactive prompts for ambiguous queries
- π **Learning System** - Learns from user corrections
### 9. Validation System β NEW
- β
**Type-safe Validation** - Zod v4 with 20 schemas
- β‘ **Ultra-fast** - 488k ops/sec, <0.01ms per operation
- ποΈ **Feature Flags** - Disabled, log-only, enforce modes
- π **Metrics** - Success rate, latency (P50/P95/P99)
- π **Sampling** - Gradual rollout (0-100%)
- π‘οΈ **Production-ready** - 213 tests passing, deployment scripts
## ποΈ Architecture
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β Application Layer β β CLI β’ Web UI β’ LSP Server β’ VS Code Extension β βββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββββββββββββ β βββββββββββββ΄ββββββββββββ¬ββββββββββββββββββββββββββ β β β βΌ βΌ βΌ ββββββββββββββββββββ ββββββββββββββββββββ ββββββββββββββββββββ β Workflow β β Agent β β Code β β Engine ββββ System ββββ Intelligence β β (Orchestration) β β (21 Agents) β β (45 Languages) β ββββββββββ¬ββββββββββ ββββββββββ¬ββββββββββ ββββββββββ¬ββββββββββ β β β βββββββββββββββββββββββ΄βββββββββββββββββββββββ β βββββββββββββββ΄βββββββββββββββ β β βΌ βΌ ββββββββββββββββββββ ββββββββββββββββββββ β Provider Router β β ReScript Core β β (Multi-AI) β β (State Machines)β ββββββββββββββββββββ ββββββββββββββββββββ β β βββββββββββββββ¬βββββββββββββββ β βΌ ββββββββββββββββββββ β SQLite Database β β (FTS5 + Vector) β ββββββββββββββββββββ
## π― Example Use Cases
### 1. Multi-Agent Code Review
```typescript
// Security, Quality, and Architecture agents collaborate
const runtime = new AgentRuntime(registry, router, db);
await runtime.executeTask({
type: 'code-review',
description: 'Comprehensive security and quality review',
context: { repositoryPath: './src' },
});2. CI/CD Pipeline Workflow
# workflows/cicd-pipeline.yaml
name: cicd-pipeline
steps:
- key: security-scan
agent: security
- key: run-tests
agent: testing
dependsOn: [security-scan]
- key: deploy
agent: devops
dependsOn: [run-tests]ax workflow execute workflows/cicd-pipeline.yaml3. Provider Fallback
// Automatically tries Claude β Gemini β OpenAI
const router = new ProviderRouterV2({
providers: {
claude: { enabled: true, priority: 1 },
gemini: { enabled: true, priority: 2 },
openai: { enabled: true, priority: 3 }
}
});
const response = await router.request({
messages: [{ role: 'user', content: 'Explain this code' }]
});π¬ Interactive CLI Mode
AutomatosX includes a ChatGPT-style Interactive CLI for natural language conversations with AI assistants.
Quick Start
# Launch Interactive CLI
ax cli
# Set an agent for specialized help
> /agent BackendAgent
# Ask questions naturally
> how do I implement rate limiting in Express?
# Run workflows
> /workflow run code-review
# Save your session
> /save my-session.jsonFeatures
- π€ Natural language conversations with Claude, Gemini, and OpenAI
- β‘ 13 slash commands for system control and automation
- πΎ Auto-save conversations to SQLite (every 5 messages + on exit)
- π― Agent collaboration with 21 specialized AI personas
- π Workflow integration for automated development tasks
- β¨οΈ Tab autocomplete and command history navigation
- π¨ Professional UX with color-coded output and loading indicators
Interactive Commands
| Command | Description | Example |
|---|---|---|
/help |
Show all available commands | /help |
/agent <name> |
Set active AI agent | /agent BackendAgent |
/workflow run <name> |
Execute workflow | /workflow run test-gen |
/history [limit] |
View conversation history | /history 20 |
/save <file> |
Export conversation to JSON | /save session.json |
/load <file> |
Import conversation from JSON | /load session.json |
/memory search <query> |
Search code index | /memory search "login" |
/context |
Show conversation state | /context |
/agents [filter] |
List all agents | /agents backend |
/status |
System health check | /status |
/config |
Show configuration | /config |
/clear |
Clear terminal screen | /clear |
/exit |
Exit CLI (auto-saves) | /exit |
Example Session
> /agent BackendAgent
β Active agent set to: BackendAgent
> how do I implement database connection pooling in Express?
BackendAgent: For Express database connection pooling, I recommend using pg-pool
for PostgreSQL or mysql2 pool for MySQL. Here's a complete example:
[provides detailed code example with connection pool setup]
> what about error handling?
BackendAgent: Good question! For robust error handling with connection pools:
1. Always use try-catch with async/await
2. Implement retry logic for transient errors
3. Set proper timeout values
4. Monitor pool metrics
[provides error handling code examples]
> /save express-db-pooling-session.json
β Conversation exported to: express-db-pooling-session.json
> /exit
Saving conversation to database...
β Conversation saved
π Exiting... Goodbye!Full Interactive CLI Documentation β
π¨ System Capabilities
Code Intelligence
- π Multi-language search - Natural language and symbol queries
- π― Advanced filtering - Filter by language, kind, file patterns
- π Smart indexing - Incremental updates, batch processing
- π Complete ecosystem coverage - DevOps, Messaging, Frontend, Backend, Mobile, ML
- π¨ Professional UX - Color-coded output, progress indicators, helpful errors
- βοΈ Flexible configuration - Hierarchical config with environment variables
- π§ͺ Production quality - 165 tests passing, 85%+ coverage, zero known bugs
π Supported Languages (45)
Systems & Performance
C, C++, Rust, Go, Zig, Objective-C, AssemblyScript, CUDA (NVIDIA/AMD ROCm HIP)
Frontend & Mobile
TypeScript, JavaScript, HTML, Swift, Kotlin, Dart (Flutter)
Backend & Scripting
Python, Ruby, PHP, Java, Scala, C#, Bash, Zsh, Lua, Groovy, Perl
Functional Programming
Haskell, OCaml, Elm, Elixir, Gleam
Data & Config
SQL, JSON, YAML, TOML, Markdown, CSV
DevOps & Infrastructure
HCL (Terraform), Puppet, Makefile
Messaging & RPC
Thrift (Apache Thrift IDL)
Specialized
Solidity (Ethereum), Verilog, SystemVerilog, Julia, MATLAB, Regex
π Framework Coverage by Ecosystem
| Ecosystem | Coverage | Frameworks |
|---|---|---|
| Frontend | 100% | React, Vue, Angular, Svelte, Next.js, Elm, Flutter |
| Backend | 100% | NestJS, Express, Django, FastAPI, Flask, Spring Boot, Rails, Laravel, Phoenix |
| Mobile | 100% | Flutter, SwiftUI, Jetpack Compose, React Native |
| ML/AI | 100% | TensorFlow, PyTorch, HuggingFace, Qiskit, JAX, scikit-learn |
| DevOps | 100% β | Terraform, Puppet, Kubernetes, Ansible, Jenkins, GitHub Actions, GitLab CI |
| Messaging | 100% β | NATS, Kafka, Thrift, RabbitMQ, Redis, Apache Pulsar |
| Blockchain | 100% | Ethereum, Hardhat, Truffle, Solidity |
π Quick Start
Installation
# Install globally
npm install -g @defai.digital/automatosx
# Or use npx (no installation required)
npx @defai.digital/automatosx@latest <command>Basic Usage
# Index your codebase
ax index ./src
# Search for code
ax find "getUserById"
# Search with filters
ax find "lang:python authentication"
# Find symbol definition
ax def getUserById
# Show index statistics
ax statusπ Commands
Code Intelligence Commands
| Command | Description | Example |
|---|---|---|
ax find <query> |
Search code with optional filters | ax find "lang:python login" |
ax def <symbol> |
Find symbol definition | ax def getUserById |
ax flow <function> |
Show call flow | ax flow handleLogin |
ax lint [pattern] |
Code linting | ax lint src/**/*.ts |
ax index [dir] |
Index codebase | ax index ./src |
ax watch [dir] |
Auto-index with file watching | ax watch ./src |
ax status |
Show index & cache statistics | ax status --verbose |
Interactive & Natural Language Commands β NEW
| Command | Description | Example |
|---|---|---|
ax cli |
Launch interactive ChatGPT-style CLI | ax cli |
ax "<natural>" |
Execute command via natural language | ax "run security audit" |
SpecKit Generator Commands β NEW
| Command | Description | Example |
|---|---|---|
ax speckit spec <desc> |
Generate workflow from description | ax speckit spec "CI/CD pipeline" |
ax speckit adr <topic> |
Generate Architecture Decision Record | ax speckit adr "database choice" |
ax speckit prd <feature> |
Generate Product Requirements Doc | ax speckit prd "auth system" |
ax gen plan <workflow> |
Generate execution plan | ax gen plan workflow.yaml |
ax gen dag <workflow> |
Generate dependency graph | ax gen dag workflow.yaml -f mermaid |
ax gen scaffold <workflow> |
Generate project structure | ax gen scaffold workflow.yaml |
ax gen tests <workflow> |
Generate test suite | ax gen tests workflow.yaml |
Workflow & Agent Commands
| Command | Description | Example |
|---|---|---|
ax workflow run <file> |
Execute workflow | ax workflow run cicd.yaml |
ax workflow run --iterate |
Execute with retry mode | ax workflow run cicd.yaml --iterate |
ax agent list |
List all available agents | ax agent list --filter backend |
ax memory search <query> |
Search code memory | ax memory search "authentication" |
π Query Syntax
Natural Language Search
ax find "function that validates email addresses"
ax find "class for user authentication"Symbol Search
ax find getUserById
ax find UserServiceLanguage Filters
ax find "lang:python authentication" # Python files only
ax find "lang:typescript getUserById" # TypeScript files only
ax find "-lang:test handleUser" # Exclude test filesKind Filters
ax find "kind:function getUserById" # Functions only
ax find "kind:class User" # Classes only
ax find "-kind:constant MAX_USERS" # Exclude constantsFile Path Filters
ax find "file:src/auth/ login" # Files in src/auth/
ax find "file:*.ts getUserById" # TypeScript files only
ax find "-file:*.spec.ts handleUser" # Exclude spec filesCombining Filters
ax find "lang:python kind:function file:src/ authentication"βοΈ Configuration
Create automatosx.config.json in your project root:
{
"languages": {
"typescript": { "enabled": true },
"javascript": { "enabled": true },
"python": { "enabled": true }
},
"search": {
"defaultLimit": 10,
"maxLimit": 100
},
"indexing": {
"excludePatterns": [
"**/node_modules/**",
"**/.git/**",
"**/dist/**",
"**/build/**"
],
"maxFileSize": 1048576
},
"database": {
"path": ".automatosx/db/code-intelligence.db"
},
"performance": {
"enableCache": true,
"cacheMaxSize": 1000,
"cacheTTL": 300000
}
}Environment Variables
Override config values with environment variables:
export AUTOMATOSX_SEARCH_DEFAULT_LIMIT=25
export AUTOMATOSX_DATABASE_WAL=false
export AUTOMATOSX_INDEXING_EXCLUDE_PATTERNS='["**/test/**"]'π Performance
AutomatosX v8.0.0 delivers exceptional performance across all systems:
| System | Metric | Value |
|---|---|---|
| Code Search | Query latency (cached) | <1ms |
| Query latency (uncached) | <5ms (P95) | |
| Indexing throughput | 2000+ files/sec | |
| Cache hit rate | 60%+ typical | |
| Validation | Single validation | <0.01ms |
| Batch (100 items) | <0.1ms | |
| Throughput | 488,056 ops/sec | |
| Error rate | 0% | |
| Testing | Total tests | 745+ passing |
| Test coverage | 85%+ | |
| Test pass rate | 100% |
Performance Tips
- Use caching - Repeated queries are 10-100x faster
- Filter early - Use
lang:,kind:,file:to narrow results - Batch index - Index entire directory at once for best performance
- Watch mode - Use for active development to keep index updated
- Monitor cache - Check hit rate with
ax status -v
ποΈ Architecture
AutomatosX uses a multi-layer architecture:
βββββββββββββββββββββββββββββββββββββββ
β CLI Layer (Commander) β
β (Commands, Args, Output Formatting) β
ββββββββββββββββ¬βββββββββββββββββββββββ
β
ββββββββββββββββΌβββββββββββββββββββββββ
β Service Layer (TypeScript) β
β (FileService, ConfigLoader, Caching) β
ββββββββββββββββ¬βββββββββββββββββββββββ
β
ββββββββββββββββΌβββββββββββββββββββββββ
β Parser Layer (Tree-sitter) β
β (TS/JS/Python AST β Symbol Extract) β
ββββββββββββββββ¬βββββββββββββββββββββββ
β
ββββββββββββββββΌβββββββββββββββββββββββ
β Database Layer (SQLite FTS5) β
β (Files, Symbols, Chunks, Full-Text) β
ββββββββββββββββββββββββββββββββββββββββKey Components:
- Parser Layer: Tree-sitter for AST parsing (44 languages: TypeScript, Python, Go, Rust, Java, C++, and 38 more)
- Database Layer: SQLite with FTS5 for full-text search and BM25 ranking
- Service Layer: FileService orchestrates indexing and search
- Query Router: Intelligent query intent detection (symbol vs natural language)
- Cache Layer: LRU cache with TTL for query result caching
- Configuration: Zod-based validation with hierarchical loading
π§ͺ Testing
# Run all tests
npm test
# Run with coverage
npm run test:coverage
# Run specific test file
npm test FileServiceTest Statistics v8.0.0:
- Total tests: 745+
- Pass rate: 100%
- Coverage: 85%+
- Test categories:
- Core: 165 tests (Parser, DAO, Service, Cache, Config, CLI)
- SpecKit: 171 tests (5 generators + utilities)
- Validation: 213 tests (ADR-014 system)
- Iterate Mode: 103 tests (strategies, safety, analysis)
- Natural Language: 30 tests (intent, routing, clarification)
- ReScript Core: 50 tests (state machines, workflow)
- Additional: 13+ tests (LSP, Web UI, integrations)
π οΈ Development
# Install dependencies
npm install
# Build TypeScript
npm run build
# Build CLI
npm run build:cli
# Run CLI locally
npm run cli -- find "query"
# Run tests
npm test
# Clean build artifacts
npm run cleanπ Documentation
- P1 Final Action Plan - Comprehensive implementation plan
- CHANGELOG - Version history and release notes
- API Quick Reference - Command reference and examples
πΊοΈ Roadmap
v8.0.0 (Current - β Complete)
- β 45 programming languages supported
- β 21 specialized AI agents
- β Multi-provider AI (Claude, Gemini, OpenAI)
- β Interactive CLI with natural language interface
- β SpecKit auto-generation (5 generators)
- β Iterate Mode with 10 strategies
- β Validation system (ADR-014)
- β 745+ tests passing (100%)
v8.1.0 (Next - 4-6 weeks)
- API Spec Generator (OpenAPI/Swagger)
- Configuration validation (remaining 12.5% gap)
- Streaming validation for large files
- Custom error messages per validation rule
- User documentation and migration guides
- Performance optimizations
v8.2.0 (Future - 8-12 weeks)
- Automated rollback on high error rates
- Advanced metrics (histograms, time-series)
- Workflow templates library
- Custom strategy plugins
- Multilingual support (i18n)
- Enhanced Web UI dashboard
v9.0.0 (Long-term)
- ML semantic search with hybrid BM25+semantic scoring
- Cross-project search
- Enhanced LSP features
- Protocol Buffers (.proto) support
- Desktop application
- Collaborative workflows
- Enterprise SSO/RBAC
π€ Contributing
Contributions are welcome! Please read our contributing guidelines before submitting PRs.
π License
Apache License 2.0 - Copyright 2025 DEFAI Private Limited
AutomatosX is licensed under the Apache License 2.0. See LICENSE for the full license text.
Commercial Usage
The codebase is Apache 2.0 licensed, free for:
- β Research and academic use
- β Personal use and learning
- β Startups and small businesses (under $2M annual revenue/funding)
Commercial license required for:
- β Enterprises with $2M+ annual revenue or funding
- β Competitive use with DEFAI's commercial API offerings
- β Offering AutomatosX as a managed service or SaaS
- β Embedding in commercial products for distribution
For commercial licensing: Visit https://license.defai.digital/automatox
See COMMERCIAL-LICENSE.md for detailed terms and FAQs.
π Acknowledgments
Built with:
- Tree-sitter - Incremental parsing system
- SQLite - Embedded database with FTS5
- Zod - TypeScript-first schema validation
- Commander.js - CLI framework
- Chalk - Terminal string styling
AutomatosX.0.0 - Production-ready code intelligence
Copyright 2025 DEFAI Private Limited | Apache License 2.0
Made with β€οΈ by DEFAI Private Limited