Thanks for your interest in contributing! This guide covers setup, code style, and the PR process.
git clone https://github.com/elophanto/EloPhanto.git
cd EloPhanto
./setup.sh # Install deps + build browser bridge
source .venv/bin/activate # Activate venv
uv sync --all-extras # Install with dev dependencies- Python 3.12+
- uv package manager
- Node.js 22+ (for the browser bridge)
pytest tests/ -v # Full test suite
pytest tests/test_core/ -v # Core tests only
pytest tests/test_tools/ -v # Tool tests only
pytest tests/ -k "test_protocol" # Run specific tests by nameWe use ruff for linting/formatting and mypy for type checking:
ruff check . # Lint
ruff format . # Auto-format
mypy core/ tools/ cli/ # Type checkKey conventions:
- Type hints on all function signatures
from __future__ import annotationsat the top of every module- Async-first — use
async deffor any I/O operations - Tests use
pytest-asynciowithasyncio_mode = "auto"
core/ # Agent brain — loop, routing, sessions, gateway
channels/ # Channel adapters (CLI, Telegram, Discord, Slack)
tools/ # Built-in tools organized by category
system/ # Shell, filesystem
browser/ # 47 browser tools via Node.js bridge
knowledge/ # Search, write, index, skills, hub
documents/ # Document analysis, query, collections
self_dev/ # Plugin creation, source modification, rollback
scheduling/ # Cron-based task scheduling
data/ # LLM calls
skills/ # Best-practice guides (SKILL.md files)
plugins/ # Agent-created tools (grows over time)
cli/ # CLI commands (click)
tests/ # Test suite
- Create a new file in the appropriate
tools/subdirectory - Extend
BaseToolfromtools/base.py - Implement the required properties:
name,description,input_schema,permission_level - Implement
async execute(self, params: dict) -> ToolResult - Register the tool in
core/registry.py→load_builtin_tools() - Add tests in
tests/test_tools/ - Update
tests/test_tools/test_tool_interface.py(add to_make_tools()and update count)
- Fork the repo and create a branch from
main - Make your changes with tests
- Ensure all checks pass:
ruff check . && mypy core/ tools/ cli/ && pytest tests/ -v - Open a PR against
mainwith a clear description of what changed and why - Link any related issues
Use the GitHub issue templates for bug reports and feature requests. Include:
- Steps to reproduce (for bugs)
- Expected vs actual behavior
- Environment details (OS, Python version, relevant config)
By contributing, you agree that your contributions will be licensed under the Apache License 2.0.