Make sure you have Python 3.10+ installed:
python --versioncd d:\Git\Axonyx_Revolt
python -m venv venv
.\venv\Scripts\Activate.ps1Note: If you get an execution policy error, run:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUserpip install -r requirements.txtThis installs:
anthropic- Claude SDKpywinauto- Windows UI automationpyautogui- Keyboard/mouse controlpywin32- Windows API accesspsutil- System/process informationpython-dotenv- Environment configurationrich- Beautiful terminal output
- Get your API key from https://console.anthropic.com/
- Copy the example config:
Copy-Item .env.example .env - Edit
.envand add your key:ANTHROPIC_API_KEY=sk-ant-api03-...
python src/main.pyOnce running, try these natural language commands:
- "Create a folder called 'MyProject' on my Desktop"
- "List all files in my Documents folder"
- "Create a text file called notes.txt with the content 'Hello World'"
- "Copy all files from Desktop to Documents/Backup"
- "Show me all running processes"
- "Start Calculator"
- "Open Notepad"
- "Close all Chrome windows"
- "Open Notepad and type 'Hello from AI'"
- "Press Ctrl+S to save"
- "Click at position 500, 300"
- "What's my current mouse position?"
- "What's my CPU usage?"
- "How much RAM is available?"
- "Show me disk space on C drive"
- "What's my battery status?"
- "Open Notepad, type 'Meeting Notes', press Enter twice, then type 'Attendees:'"
- "Create a folder called 'Reports' on Desktop, then create 3 text files inside it"
- "Check if Chrome is running, if not, start it"
User Input → Claude (reasoning) → Tool Selection → Tool Execution → Result → Claude (synthesis) → Output
-
agent.py - Core orchestrator
- Manages conversation with Claude
- Handles tool calling loop
- Coordinates tool execution
-
tools/ - Windows automation capabilities
file_ops.py- File system operationsprocess_ops.py- Process managementui_automation.py- Keyboard/mouse controlsystem_info.py- System queries
-
main.py - User interface
- Terminal interaction
- Input/output formatting
- Error handling
- User gives natural language task
- Claude analyzes and decides which tools to use
- Agent executes tools with parameters Claude provides
- Results go back to Claude
- Claude continues or provides final answer
Example flow for "Open Notepad and type Hello":
User: "Open Notepad and type Hello"
↓
Claude: "I'll use start_process to open notepad"
Tool: start_process(command="notepad")
↓
Claude: "Now I'll type the text"
Tool: type_text(text="Hello")
↓
Claude: "Done! Notepad is open with 'Hello' typed"
- Create function in appropriate
tools/*.pyfile:
def my_new_tool(param: str) -> Dict:
try:
# Your implementation
return {"success": True, "result": "..."}
except Exception as e:
return {"error": str(e)}- Add tool definition:
{
"name": "my_new_tool",
"description": "What this tool does",
"input_schema": {
"type": "object",
"properties": {
"param": {
"type": "string",
"description": "Parameter description"
}
},
"required": ["param"]
}
}- Map to function:
MY_FUNCTIONS = {
"my_new_tool": my_new_tool
}In .env:
REQUIRE_CONFIRMATION=true- Ask before each tool executionDRY_RUN_MODE=true- Simulate without actual executionMAX_TOKENS=4096- Control response length
In .env, change:
CLAUDE_MODEL=claude-3-5-sonnet-20241022 # Most capable
# CLAUDE_MODEL=claude-3-haiku-20240307 # Faster, cheaper
- Delete files
- Kill processes
- Control your keyboard/mouse
- Modify system settings
- Always use confirmation mode (
REQUIRE_CONFIRMATION=true) - Test in isolated environment first
- Review tool permissions before deployment
- Monitor agent actions closely
- Use specific commands to avoid ambiguity
- Keep API keys secure (never commit
.env)
Some operations require administrator privileges:
- Killing system processes
- Accessing protected directories
- Installing software
Run PowerShell as Administrator if needed:
Start-Process powershell -Verb RunAs- Make sure
.envfile exists (copy from.env.example) - Check that API key is valid
- Restart terminal after creating
.env
- Activate virtual environment:
.\venv\Scripts\Activate.ps1 - Reinstall packages:
pip install -r requirements.txt
- Move mouse to corner to cancel
- Adjust failsafe:
pyautogui.FAILSAFE = False(use carefully)
- Run as Administrator for system operations
- Check Windows permissions
- Some processes are protected by Windows
- Be more specific: "Open notepad.exe" vs "Open Notepad"
- Provide exact paths: "C:/Users/YourName/Desktop" vs "Desktop"
- Break complex tasks into steps
Uncomment in requirements.txt:
pillow>=10.0.0
opencv-python>=4.8.0
Then add screenshot/image analysis tools.
Install Selenium:
pip install seleniumCreate tools/browser_ops.py for web automation.
Add email tools with smtplib or Microsoft Graph API.
Integrate with speech_recognition and pyttsx3.
To extend this agent:
- Add new tools in
src/tools/ - Update tool registrations in
agent.py - Test thoroughly in safe environment
- Document new capabilities in README
MIT License - Feel free to modify and extend!
Happy Automating! 🤖
For questions or issues, consult the troubleshooting section or Claude API documentation.