- Raya - Computer Use Agent
raya is an AI agent for raya that harnesses the power of code and AI to control your PC with ease. It enables you to automate any task by interacting with applications, clicking buttons, typing, running commands, and capturing the UI state.
rya.mp4
Unlike traditional computer vision models, raya works directly at the raya GUI layer, providing advanced automation capabilities without relying on image recognition techniques.
Requirements:
- Python 3.13 or higher
- windows 7, 8, 10, or 11
- UV (optional, or use pip)
To install with uv:
uv pip install raya
Or with pip:
pip install raya
To use raya in your own script:
from langchain_google_genai import ChatGoogleGenerativeAI
from raya.agent import Agent
from dotenv import load_dotenv
load_dotenv()
llm = ChatGoogleGenerativeAI(model='gemini-2.0-flash')
agent = Agent(llm=llm, browser='chrome', use_vision=True)
query = input("Enter your query: ")
result = agent.invoke(query=query)
print(result.content)
To run the agent from the command line:
python main.py
- Write a short note about LLMs and save to the desktop
- Change from Dark mode to Light mode
See the demos for screenshots and more examples.
- raya is under active development.
- Contributions, bug reports, and feature requests are welcome.
raya interacts directly with your windows OS at the GUI layer to perform actions. While designed to be intelligent and safe, it can make mistakes that might cause unintended changes. Use with care.
This project is licensed under the MIT License - see the LICENSE file for details.
Thank you for your interest in contributing to raya!
raya requires:
- Python 3.13 or later
- Fork the repository on GitHub.
- Clone your fork locally:
git clone https://github.com/YOUR_USERNAME/raya.git cd raya
- Install the package in development mode:
pip install -e ".[dev,search]"
- Set up pre-commit hooks:
pip install pre-commit pre-commit install
main
branch contains the latest stable code- Create feature branches from
main
named according to the feature you're implementing:feature/your-feature-name
- For bug fixes, use:
fix/bug-description
- No strict style enforced, but keep commit messages clear and informational.
- Uses Ruff for formatting and linting (see
ruff.toml
). - Line length: 100 characters
- Double quotes for strings
- PEP 8 naming conventions
- Add type hints to function signatures
- Configured in
.pre-commit-config.yaml
. - Hooks will:
- Format code using Ruff
- Run linting checks
- Check for trailing whitespace
- Ensure files end with a newline
- Validate YAML files
- Check for large files
- Remove debug statements
Run the test suite with pytest:
pytest
To run specific test categories:
pytest tests/
- Add unit tests for new functionality in
tests/unit/
- For slow or network-dependent tests, mark them with
@pytest.mark.slow
or@pytest.mark.integration
- Aim for high test coverage of new code
- Ensure your code passes all tests and pre-commit hooks
- Push your changes to your fork
- Submit a pull request to the main repository
- Follow the pull request template
- Update docstrings for new or modified functions, classes, and methods
- Use Google-style docstrings:
def function_name(param1: type, param2: type) -> return_type: """Short description. Longer description if needed. Args: param1: Description of param1 param2: Description of param2 Returns: Description of return value Raises: ExceptionType: When and why this exception is raised """
- Open an issue for discussion
- Reach out to the maintainers
- Check existing code for examples
@software{
author = {Rayamah, Ibrahim},
title = {raya: Enable AI to control your PC},
year = {2025},
publisher = {GitHub},
url={https://github.com/iBz-04/raya}
}