Thank you for contributing to Prax! This guide covers development setup, code standards, and the PR process.
We value contributions in this order:
- Bug fixes — crashes, incorrect behavior, data loss
- Cross-platform compatibility — Windows, macOS, Linux
- Security hardening — injection vulnerabilities, privilege escalation
- Performance and robustness — retry logic, error handling
- Documentation — fixes, clarifications, examples
- New features — discuss in an issue first
| Requirement | Notes |
|---|---|
| Python 3.10+ | Required |
| Git | For cloning and version control |
git clone https://github.com/ChanningLua/prax-agent.git
cd prax
# Create virtual environment
python3 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install in editable mode with dev dependencies
pip install -e ".[dev]"# Run all tests
pytest
# Run specific test file
pytest tests/test_agent_loop.py
# Run with coverage
pytest --cov=core --cov=tools --cov=agents --cov=commands --cov=workflows
# Run only unit tests (skip evals that call real APIs)
pytest -m "not eval"- Formatter/Linter: Ruff
- Type hints: Required for public APIs
# Lint
ruff check core/ tools/ agents/ commands/ workflows/ tui/ runtime/ integrations/ tests/- Unit tests for core logic (core/, runtime/)
- Integration tests for agent loops and workflows
- Eval tests (marked with
@pytest.mark.eval) for real LLM API calls
New features must include tests. Bug fixes should include a regression test.
- Fork the repository
- Create a branch (
git checkout -b fix-memory-leak) - Make changes and add tests
- Run tests (
pytest) - Lint and format (
ruff check ...and your editor/formatter setup) - Commit with clear message (
git commit -m "Fix memory leak in session store") - Push (
git push origin fix-memory-leak) - Open PR on GitHub
- Tests pass (
pytest) - Code linted/formatted (
ruff check ...) - Type hints added for new public APIs
- Documentation updated (if adding features)
- CHANGELOG.md updated (if user-facing change)
prax/
├── core/ # Agent loop, tools, memory
├── agents/ # Ralph, Sisyphus, Team
├── tools/ # Built-in tools
├── commands/ # Slash command handlers
├── workflows/ # Task orchestration
├── runtime/ # NativeRuntime entry point
├── integrations/ # Claude Code integration
├── assets/ # Claude Code assets
├── cli.py # prax CLI commands
├── main.py # prax CLI entry point
├── tests/ # Test suite
│ ├── unit/ # Unit tests
│ ├── integration/ # Integration tests
└── docs/ # Architecture notes, benchmark reports, and release docs
If you discover a security vulnerability, please email 543370794@qq.com instead of opening a public issue.
When contributing code that handles:
- User input
- Shell commands
- File paths
- API keys
Please ensure proper validation and sanitization.
- Open an issue for bugs or feature requests
- Join discussions in GitHub Discussions
- Check existing issues before creating new ones
By contributing, you agree that your contributions will be licensed under the MIT License.