ca-agent-cli
v4.8.18
Published
CLI tools for managing multi-agent development environments with tmux
Maintainers
Readme
Agent CLI
CLI tools for managing multi-agent development environments with tmux. Streamline your multi-agent workflow by automating tmux session creation, agent initialization, and inter-agent communication.
Features
- 🚀 Automated Setup: Initialize complex multi-agent tmux sessions with a single command
- 📤 Inter-Agent Messaging: Send messages between agents without switching panes
- 🔍 Smart Configuration: Automatically discovers configuration files in parent directories
- 📊 Flexible Layouts: Support for various pane layouts (2x4 grid by default)
- 📝 Activity Logging: Keep track of all agent interactions and messages
- 🎯 Project-Specific Config: Define different agent setups for different projects
Installation
# Global installation (recommended)
npm install -g ca-agent-cli
# Or install locally in your project
npm install --save-dev ca-agent-cliQuick Start
Install the CLI globally:
npm install -g ca-agent-cliCreate a
.agentconfig.ymlin your project:cat > .agentconfig.yml << 'EOF' session: name: myproject window: agents layout: 2x4 agents: - name: frontend pane: 1 role: "Frontend Developer" init_command: "echo 'Frontend agent ready'" - name: backend pane: 2 role: "Backend Developer" init_command: "echo 'Backend agent ready'" EOFInitialize your agents:
agent-initSend messages between agents:
agent-send send backend "Please create the user API endpoint"
Configuration
Configuration File
Create a .agentconfig.yml file in your project root. The CLI will search for this file in the current directory and all parent directories.
# Session configuration
session:
name: multiagent # tmux session name
window: agent # tmux window name
layout: 2x4 # Layout pattern (2 columns x 4 rows)
# Agent definitions
agents:
- name: architect
pane: 1 # Pane number (1-8 for 2x4 layout)
role: "System Architect"
init_command: | # Command to run when initializing
export ANTHROPIC_MODEL="claude-3-opus-20240229"
claude
init_message: | # Initial message to send
You are the system architect. Please review the requirements.
- name: frontend
pane: 2
role: "Frontend Developer"
init_command: "node"
init_message: "Ready for frontend development tasks"
# Logging configuration (optional)
logging:
enabled: true
directory: logs
format: "[{{timestamp}}] {{agent}}: {{action}} - \"{{message}}\""Layout Options
Currently supports:
2x4: 2 columns × 4 rows (8 panes total)- More layouts coming soon!
Usage
Initialize Session
# Basic initialization
agent-init
# With custom config file
agent-init -c /path/to/custom-config.yml
# Without auto-attaching to the session
agent-init --no-attachSend Messages
# Send a message to an agent
agent-send send <agent-name> "<message>"
# Examples
agent-send send frontend "Please update the login component"
agent-send send backend "Database migration completed"
# List all available agents
agent-send list
# Use custom config file
agent-send send architect "Review the API design" -c ./configs/project.ymlCommand Options
agent-init
-c, --config <path>: Path to configuration file--no-attach: Don't attach to session after creation-h, --help: Display help-V, --version: Display version
agent-send
send <agent> <message>: Send message to agentlist: List all configured agents-c, --config <path>: Path to configuration file-h, --help: Display help
Advanced Usage
Multiple Projects
You can manage multiple projects by using different configuration files:
# Project A
agent-init -c ~/projects/projectA/.agentconfig.yml
# Project B
agent-init -c ~/projects/projectB/.agentconfig.ymlCI/CD Integration
# .github/workflows/agent-test.yml
- name: Setup agents
run: |
npm install -g ca-agent-cli
agent-init --no-attach
- name: Run agent tasks
run: |
agent-send send tester "Run all tests"
agent-send send builder "Build the project"Scripting
#!/bin/bash
# deploy.sh
# Initialize agents
agent-init --no-attach
# Send deployment commands
agent-send send devops "Pull latest changes"
agent-send send backend "Run database migrations"
agent-send send frontend "Build production bundle"
agent-send send devops "Deploy to production"Requirements
- Node.js >= 14.0.0
- tmux installed on your system
- macOS:
brew install tmux - Ubuntu/Debian:
sudo apt-get install tmux - RHEL/CentOS:
sudo yum install tmux
- macOS:
Troubleshooting
tmux not found
# Install tmux first
brew install tmux # macOS
sudo apt-get install tmux # Ubuntu/DebianSession already exists
# Kill existing session
tmux kill-session -t <session-name>
# Or use a different session name in configConfiguration file not found
# Check file exists
ls -la .agentconfig.yml
# Specify path explicitly
agent-init -c ./path/to/.agentconfig.ymlContributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
License
This project is licensed under the MIT License - see the LICENSE file for details.
Support
- 📧 Email: [email protected]
- 🐛 Issues: GitHub Issues
- 💬 Discussions: GitHub Discussions
Roadmap
- [ ] Support for more layout patterns
- [ ] Agent health monitoring
- [ ] Message history and replay
- [ ] Web UI for agent management
- [ ] Plugin system for custom agent types
- [ ] Integration with popular AI platforms
Made with ❤️ by Nowly Lab
