Thank you for your interest in contributing to HexAgent! We believe agent infrastructure should be open, vendor-neutral, and community-driven — and every contribution moves that forward.
Whether you're fixing a typo, adding a new tool, implementing a computer backend, or improving documentation, you're helping build the agent harness the community needs.
- Python 3.11+ (3.12+ for the demo app)
- uv — fast Python package manager
- Node.js 18+ (for the demo frontend/electron)
# Clone the repository
git clone https://github.com/an7tang/hexagent.git
cd hexagent
# Set up the core library
cd libs/hexagent
uv sync --group test
# Verify everything works
make lint
make testhexagent/
├── libs/
│ ├── hexagent/ # Core agent harness library
│ │ ├── hexagent/ # Package source
│ │ ├── tests/ # Unit + integration tests
│ │ ├── sandbox/ # Docker/VM sandbox configs
│ │ ├── Makefile # Build targets
│ │ └── pyproject.toml # Package config
│ └── hexagent_demo/ # Demo desktop application
│ ├── backend/ # FastAPI backend
│ ├── frontend/ # React frontend
│ └── electron/ # Electron shell
├── CONTRIBUTING.md # This file
└── README.md # Project overview
cd libs/hexagent
make test # Unit tests with coverage
make integration_test # Integration tests (requires API keys)
# Run a specific test
uv run pytest tests/unit_tests/path/to/test_file.py -v
uv run pytest tests/unit_tests/path/to/test_file.py::test_name -vmake lint # Ruff formatting check + Ruff linting + MyPy strict
make format # Auto-fix formatting and lint issuesAll code must pass:
- Ruff — formatting and linting
- MyPy strict — full type checking with
--strict
Pre-commit hooks are configured to run these checks automatically. Install them with:
pip install pre-commit
pre-commit install- Typing: MyPy strict mode. All public APIs must have complete type annotations.
- Docstrings: Google style. Required on all public APIs.
- Async: All tool and session operations are async.
- Error handling: Fail fast on bugs, retry on transient failures. Specific exceptions only — no bare
except:. Actionable messages (what failed, why, what to do next). - Line length: 150 characters max.
- Use
pytest-asynciowithasyncio_mode = "auto"(no@pytest.mark.asyncioneeded) - Test behavior, not implementation details
- Prefer testing public APIs over internal functions
- Descriptive test names:
test_<action>_<condition>_<expected_result> - Unit tests in
tests/unit_tests/— mirror thehexagent/directory structure - Integration tests in
tests/integration_tests/
- Check existing issues to see if someone is already working on it
- For significant changes, open an issue first to discuss the approach
- Fork the repository and create a feature branch
-
Create a branch from
main:git checkout -b your-feature-name
-
Make your changes. Keep commits focused and well-described.
-
Ensure all checks pass:
cd libs/hexagent make format make lint make test
-
Push and open a pull request against
main. -
In your PR description:
- Summarize what changed and why
- Link related issues
- Include a test plan
- Correctness and logic — Does it work? Are edge cases handled?
- Code quality — Is it readable, well-typed, and well-tested?
- Simplicity — Is this the simplest solution that works? No over-engineering.
- Architecture alignment — Does it follow the project's design principles?
Backward compatibility is not a concern at this stage (0.0.x). Clean design always wins.
When contributing, keep these principles in mind:
- Testability: Every module must be testable in isolation without complex mocks.
- Composability: Small, single-purpose units with explicit inputs and outputs.
- Minimal Dependencies: A change to module A should require understanding only module A.
- Agent-First: Tools and results are designed for agent ergonomics, not human UIs.
- Simplicity: Obvious solutions over clever ones.
- Idempotency: Operations must be safely repeatable.
The core library (hexagent/) is framework-agnostic — LangChain integration lives in hexagent/langchain/. Don't introduce LangChain imports outside of that directory.
| Area | Good for | Location |
|---|---|---|
| New tools | Adding capabilities to agents | hexagent/tools/ |
| Computer implementations | New execution environments | hexagent/computer/ |
| Web providers | New search/fetch backends | hexagent/tools/web/providers/ |
| MCP improvements | Protocol support | hexagent/mcp/ |
| Prompt fragments | Better agent instructions | hexagent/prompts/fragments/ |
| Demo features | UI/UX improvements | libs/hexagent_demo/ |
| Tests | Improving coverage | tests/ |
| Documentation | Clarity and examples | README.md, libs/*/README.md |
New to the project? Look for issues tagged good first issue. These are scoped to be approachable without deep knowledge of the codebase.
- Use GitHub Issues
- Include steps to reproduce, expected behavior, and actual behavior
- For bugs, include your Python version, OS, and relevant dependency versions
Open a Discussion for questions, ideas, or feedback that don't fit neatly into an issue.