> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stateset.com/llms.txt
> Use this file to discover all available pages before exploring further.

# StateSet Computer Use Agents - Quick Start Guide

> Quick start guide for using StateSet Computer Use Agents

# StateSet Computer Use Agents - Quick Start Guide

## 🚀 Quick Setup

### 1. Install and Activate

```bash theme={null}
git clone https://gitlab.com/StateSet/StateSet-computer-use-agent.git
cd StateSet-computer-use-agent
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
```

### 2. Run Your First Agent

```bash theme={null}
# Auto-close tickets
./start-autoclose-agent.sh

# Or with custom instruction
python main.py "auto-close all pending tickets"
```

## 📋 Common Commands

### Agent-Specific Commands

#### Auto-Close Agent

```bash theme={null}
# Using script
./start-autoclose-agent.sh

# Direct command
python main.py "auto-close tickets"
```

#### Social Media Agent

```bash theme={null}
# Using script
./start-socialmedia-agent.sh

# Direct command
python main.py "social media content moderation"
```

#### LinkedIn Agent

```bash theme={null}
# Using script
./start-linkedin-agent.sh

# Direct command
python main.py "linkedin send connection requests"
```

#### Slack Support Agent

```bash theme={null}
# Using script
./start-slack-agent.sh

# Direct command
python main.py "slack respond to customer inquiries"
```

#### Shopify Agent

```bash theme={null}
# Using script
./start-shopify-agent.sh

# Direct command
python main.py "shopify update product inventory"
```

### General Purpose Commands

```bash theme={null}
# Custom task with general agent
./start-general-agent.sh "your task description here"

# Multiple agents simultaneously
python main.py "auto-close tickets and social media monitoring"
```

## 🔧 Configuration Examples

### Setting Display Resolution

Edit `main.py`:

```python theme={null}
WIDTH = 1920   # Full HD width
HEIGHT = 1080  # Full HD height
```

### API key Configuration

Replace in `main.py`:

```python theme={null}
api_key = 'sk-ant-api03-YOUR-KEY-HERE'
```

### Custom Agent Selection Logic

Add to `get_active_agents()` function:

```python theme={null}
if "custom_keyword" in instruction:
    active_agents.append(AGENT_CONFIGS["YOUR_AGENT"])
```

## 📊 Monitoring Commands

### View Logs in Real-Time

```bash theme={null}
# Follow logs as they're generated
python main.py "your task" 2>&1 | tee agent.log

# Filter logs by agent type
python main.py "your task" | grep "\[AUTO_CLOSE\]"
```

### Check Screenshots

```bash theme={null}
# List all screenshots
ls -la screenshots/*/

# View latest screenshot
eog screenshots/AUTO_CLOSE/screenshot_*.png
```

## 🛠️ Troubleshooting Commands

### Check Dependencies

```bash theme={null}
pip list | grep -E "anthropic|httpx|streamlit"
```

### Test Display

```bash theme={null}
echo $DISPLAY
xdpyinfo
```

### Verify API Connectivity

```bash theme={null}
curl -X POST https://response.cx/api/agents/get-agent \
  -H "Content-Type: application/json" \
  -d '{"agent_id": "your-agent-id"}'
```

## 💡 Usage Examples

### Example 1: Close Support Tickets

```bash theme={null}
python main.py "auto-close all tickets marked as resolved in the last 24 hours"
```

### Example 2: Social Media Monitoring

```bash theme={null}
python main.py "social media hide inappropriate comments on our Facebook page"
```

### Example 3: LinkedIn Outreach

```bash theme={null}
python main.py "linkedin send connection requests to software engineers in San Francisco"
```

### Example 4: Slack Customer Support

```bash theme={null}
python main.py "slack respond to questions in #customer-support channel"
```

### Example 5: Shopify Management

```bash theme={null}
python main.py "shopify update inventory levels for out-of-stock products"
```

## 🔑 Key Environment Variables

```bash theme={null}
# Set display for GUI applications
export DISPLAY=:1

# Optional: Set Anthropic API key
export ANTHROPIC_API_KEY="your-key-here"

# Optional: Set workspace path
export WORKSPACE_PATH="/home/user/StateSet-computer-use-agent"
```

## 📈 Performance Tips

1. **Run Multiple Agents**: Use "&" to run agents in background
   ```bash theme={null}
   python main.py "auto-close tickets" &
   python main.py "social media monitoring" &
   ```

2. **Limit Token Usage**: Modify in code
   ```python theme={null}
   max_tokens=2048  # Instead of 4096
   ```

3. **Reduce Screenshot Frequency**: Modify in code
   ```python theme={null}
   only_n_most_recent_images=3  # Instead of 5
   ```

## 🛡️ Security Quick Checks

```bash theme={null}
# Check API key isn't in git
git grep "sk-ant-api"

# Verify permissions
ls -la ~/.ssh/
chmod 600 ~/.ssh/id_rsa

# Check running processes
ps aux | grep python
```

## 📝 Notes

* Always use `Ctrl+C` for graceful shutdown
* Screenshots are saved in `screenshots/{AGENT_TYPE}/`
* Logs show `[AGENT_TYPE]` prefix for easy filtering
* Billing only occurs for completed tasks
* Virtual display must be running (DISPLAY=:1)

***

For detailed documentation, see [USERGUIDE.md](USERGUIDE.md)
