Thank you for your interest in contributing to AgentGate! This document provides guidelines and instructions for contributing.
- Code of Conduct
- Getting Started
- Development Setup
- Making Changes
- Code Standards
- Testing
- Submitting Changes
- Release Process
By participating in this project, you agree to maintain a respectful and inclusive environment for everyone.
- Python 3.10+
- Node.js 18+
- Docker & Docker Compose
- uv (recommended) or pip
# Fork the repository on GitHub, then:
git clone https://github.com/YOUR_USERNAME/agentgate.git
cd agentgate
git remote add upstream https://github.com/EaCognitive/agentgate.git# Create virtual environment
uv venv
source .venv/bin/activate
# Install all dependencies including dev tools
uv pip install -e ".[server,dev,all]"
# Setup pre-commit hooks
pre-commit installcd dashboard
npm install# Start PostgreSQL and Redis
docker compose up -d postgres redis
# Or use the full stack
docker compose up -dcp .env.example .env
# Edit .env with your configurationUse descriptive branch names:
feature/add-semantic-caching
fix/rate-limiter-redis-connection
docs/update-api-reference
refactor/middleware-chain
We follow Conventional Commits:
feat: add semantic caching middleware
fix: resolve Redis connection timeout in rate limiter
docs: update API authentication guide
test: add integration tests for PII vault
refactor: simplify middleware chain execution
chore: update dependencies
Types:
feat: New featurefix: Bug fixdocs: Documentation onlytest: Adding or updating testsrefactor: Code change that neither fixes a bug nor adds a featurechore: Maintenance tasks
Linting & Formatting:
# Run ruff linter
ruff check ea_agentgate server
# Run ruff formatter
ruff format ea_agentgate server
# Run all linters
make lintType Checking:
# Pyright (strict mode)
pyright ea_agentgate
# MyPy
mypy ea_agentgate --strictStyle Guidelines:
- Use type hints for all function signatures
- Maximum line length: 100 characters
- Use
"""docstrings"""for all public functions and classes - Prefer
async/awaitfor I/O operations
Linting:
cd dashboard
npm run lintType Checking:
npm run typecheck
# or
npx tsc --noEmitStyle Guidelines:
- Strict TypeScript mode enabled
- Use functional components with hooks
- Prefer named exports
- Use TanStack Query for server state
# Run all tests
pytest
# Run with coverage
pytest --cov=ea_agentgate --cov-report=html
# Run specific test file
pytest tests/test_pii_vault.py
# Run tests matching pattern
pytest -k "rate_limit"
# Run only unit tests
pytest -m "not integration"
# Run integration tests (requires services)
pytest -m "integration"cd dashboard
# Unit tests
npm test
# E2E tests (requires running server)
npm run test:e2e
# E2E with UI
npm run test:e2e:ui- All new features must include tests
- Minimum 90% coverage for new code
- Integration tests for API endpoints
- E2E tests for critical user flows
-
Update your fork:
git fetch upstream git rebase upstream/main
-
Push your branch:
git push origin feature/your-feature
-
Create Pull Request:
- Use a descriptive title following commit conventions
- Fill out the PR template completely
- Link related issues
-
PR Requirements:
- All CI checks must pass
- At least 1 approval required
- No merge conflicts
- Documentation updated if needed
## Description
Brief description of changes
## Type of Change
- [ ] Bug fix
- [ ] New feature
- [ ] Breaking change
- [ ] Documentation update
## Testing
- [ ] Unit tests added/updated
- [ ] Integration tests added/updated
- [ ] E2E tests added/updated
- [ ] Manual testing performed
## Checklist
- [ ] Code follows project style guidelines
- [ ] Self-review completed
- [ ] Documentation updated
- [ ] No new warnings introducedReleases are automated via GitHub Actions when tags are pushed:
# Version bump (updates pyproject.toml)
bump2version patch # 1.0.0 -> 1.0.1
bump2version minor # 1.0.0 -> 1.1.0
bump2version major # 1.0.0 -> 2.0.0
# Create and push tag
git tag v1.0.1
git push origin v1.0.1The release workflow will:
- Run full test suite
- Build Python package
- Build Docker images
- Publish to PyPI
- Create GitHub release
- Push to container registry
- Discord: Join our community
- Issues: GitHub Issues
- Discussions: GitHub Discussions
Contributors are recognized in release notes and the project README.
Thank you for contributing to AgentGate!
Erick Aleman | AI Architect | AI Engineer | erick@eacognitive.com