This document provides comprehensive instructions for installing and configuring the II-Agent system on your local machine. It covers prerequisites, environment setup, installation steps, and initial configuration for both CLI and web interface usage.
For information about deployment in production environments, see Deployment.
Prerequisites
Before installing II-Agent, ensure your system meets the following requirements:
Python | 3.10+ | Python 3.10 or higher is required |
Node.js | 18+ | Only needed if using the frontend |
Disk Space | 1GB+ | For dependencies and workspace files |
Memory | 4GB+ recommended | Higher is better for complex tasks |
API Keys | Various | See Environment Configuration section |
You'll also need one of the following:
- Anthropic API key
- Google Cloud project with Vertex AI API enabled
Sources: README.md94-98 pyproject.toml9
Installation Process
1. Clone the Repository
2. Set Up Python Environment
Create and activate a virtual environment:
3. Install Python Dependencies
Install the package in development mode:
This installs all required dependencies listed in the pyproject.toml file, including:
- Anthropic client libraries
- FastAPI and Uvicorn for WebSocket server
- Google Cloud AI Platform
- Browser automation tools (Playwright)
- PDF and media processing libraries
- Search tools integration
4. Frontend Setup (Optional)
If you plan to use the web interface, set up the frontend:
Sources: README.md133-147 pyproject.toml10-43
Environment Configuration
II-Agent requires several environment variables to function properly. These control API access, security settings, and integration points.
Environment Variables
Create a .env file in the root directory with the following variables:
Frontend Environment
If using the frontend, create another .env file in the frontend directory:
Sources: README.md100-131
Running II-Agent
II-Agent can be run in two primary modes:
- Command Line Interface (CLI)
- WebSocket Server with Web Interface
CLI Mode
The CLI provides direct interaction with the agent through your terminal.
Using Anthropic API:
Using Google Vertex AI:
CLI Options:
--project-id | Google Cloud project ID | None |
--region | Google Cloud region | None |
--workspace | Path to workspace directory | ./workspace |
--needs-permission | Require permission before executing commands | False |
--minimize-stdout-logs | Reduce the amount of logs printed | False |
Web Interface
To use the web interface, you need to:
- Start the WebSocket server:
- Start the frontend (in a separate terminal):
- Access the interface at http://localhost:3000
Sources: README.md149-193
Workspace and Data Management
II-Agent organizes its files and data in a workspace directory, which maintains state between sessions.
The workspace directory contains:
- Saved files from agent operations
- Downloaded web content
- Generated media
- Session-specific context
You can specify a custom workspace location with the --workspace option when starting the agent.
Sources: README.md166
Troubleshooting
API Key Issues
If you encounter authentication errors:
- Verify your API keys in the .env file
- Ensure .env file is in the correct location (project root)
- Check that your Anthropic or Google Cloud credentials are valid
Dependency Problems
If you experience module import errors:
- Ensure you're using Python 3.10+
- Verify that the virtual environment is activated
- Try reinstalling dependencies: pip install -e .
Frontend Connection Issues
If the frontend cannot connect to the backend:
- Check that the WebSocket server is running
- Verify that STATIC_FILE_BASE_URL matches the WebSocket server address
- Ensure NEXT_PUBLIC_API_URL is correctly set in the frontend .env
Workspace Permissions
If you encounter file permission errors:
- Check that your user account has write access to the workspace directory
- Try running with elevated permissions if necessary
Sources: README.md100-131 README.md149-193
Next Steps
After successfully installing and configuring II-Agent, see:
- Usage Examples for practical examples of common tasks
- Command Line Interface for detailed CLI documentation
- WebSocket Server for API details
- Tool System to learn about available capabilities