@2501
prefix and work from any directory.
Command Overview
Command | Purpose |
---|---|
set | Configure CLI settings |
config | View available configurations |
init | Initialize a new agent |
agents | Manage and list agents |
query | Execute tasks with agents |
jobs | Monitor and manage jobs |
set
Configure essential CLI settings, primarily for authentication.config
Fetch and display available agent configurations from the API, including specialties and operational settings.init
Initialize a new agent in the current or specified workspace. Agents can execute tasks locally or remotely.Option | Description | Default |
---|---|---|
--name <name> | Agent name | Auto-generated |
--workspace <path> | Workspace directory path | Current directory |
--config <configKey> | Specialty configuration key | SYSOPS |
--remote-exec <connection> | Enable remote execution (user@host:port) | None (local) |
--remote-exec-type <type> | Remote connection type: ssh or winrm | ssh |
--remote-private-key <key> | SSH private key for authentication | ~/.ssh/id_rsa |
--remote-exec-password <password> | Password for remote authentication | None |
Local Execution
Initialize an agent for local execution (requires CLI installed on the target machine):Remote Execution
Initialize an agent for remote execution via SSH or WinRM. The agent runs in the 2501 agent swarm and connects to target machines remotely. SSH with Default Key:5985
(HTTP) or 5986
(HTTPS).
Complete Remote Example:
agents
List and manage agents in the current workspace or across your machine.Option | Description |
---|---|
--workspace <path> | List agents in specific workspace |
--all | List all agents on the machine |
--flush | Clear cached agent data |
query
Execute tasks by sending natural language instructions to agents. This is the primary command for assigning work.Option | Description | Default |
---|---|---|
--workspace <path> | Execute in specific workspace | Current directory |
--agentId <id> | Target specific agent by ID | Workspace agent |
jobs
Monitor and manage jobs—coordinated multi-task operations created by gateways or manual orchestration.Option | Description |
---|---|
--workspace <path> | Monitor jobs for specific workspace |
--subscribe | Receive continuous updates every minute |
--unsubscribe | Stop receiving updates |
--listen | Listen for and auto-execute new jobs from API |
Best Practices
Query Construction: Be specific—“Restart nginx and verify it’s serving traffic” beats “fix nginx”. Include context like file paths and service names. Write queries as you would ask a colleague. Reference previous tasks when following up. Workspace Management: Initialize agents in project directories for automatic workspace association. Use--workspace
to switch between projects without changing directories. Keep one agent per project for better context isolation.
Remote Execution: Prefer key-based auth over passwords. Test SSH/WinRM access manually before initializing agents. Use descriptive names based on target system and role. Check firewall rules to ensure agent swarm can reach remote hosts.
Agent Organization: Create specialized agents for different tasks or environments. Use naming conventions like {environment}-{role}-{system}
(e.g., prod-deploy-api
). List agents regularly and flush cache if experiencing stale data.
Job Monitoring: Use --subscribe
for active monitoring during deployments. Use --listen
for unattended automation. Check jobs regularly to track gateway-initiated workflows. Unsubscribe when done to reduce API calls.
Common Workflows
Initial Setup:Troubleshooting
Command Not Found: Verify CLI is installed withnpm list -g @2501-ai/cli
. Check PATH includes npm global bin directory. Reinstall if necessary.
Authentication Errors: Verify API key with @2501 config
. Re-set with @2501 set api_key YOUR_API_KEY
. Check key hasn’t expired. See Authentication for detailed troubleshooting.
Agent Not Found: List agents with @2501 agents --all
. Verify you’re in the correct workspace. Initialize if needed. Clear cache with @2501 agents --flush
.
Remote Execution Failures: Test manual SSH/WinRM connection. Verify host accessibility (firewall, network). Check credentials. Ensure private key has correct permissions (SSH requires 600
). Confirm port numbers (SSH: 22, WinRM: 5985/5986).
Query Not Executing: Check agent status with @2501 agents
. Verify workspace has an initialized agent. Try with explicit agent ID. Review task in Accounts for detailed errors.
Job Subscription Not Working: Verify agent is initialized. Check API authentication. Ensure workspace path is correct. Try unsubscribing and resubscribing.
For additional support, visit our Discord community or contact hello@2501.ai.
Next Steps
- Learn about Agents configuration and management
- Explore Tasks for execution details
- Review Specialties for domain-specific configurations
- Set up Gateways for automated task creation