Thank you for your interest in contributing to AgentLock. This project aims to establish an open standard for authorization in AI agent systems.
git clone https://github.com/webpro255/agentlock.git
cd agentlock
pip install -e ".[dev]"
pytest- Fork the repository
- Create a branch from
main:git checkout -b my-feature - Make your changes with tests
- Run the checks:
pytest -v # Tests pass ruff check agentlock/ tests/ # Zero lint errors mypy agentlock/ --ignore-missing-imports # Zero type errors
- Commit with a clear message
- Open a Pull Request against
main
- Python 3.10+ - all code must support Python 3.10 and above
- Type hints everywhere - all function signatures must be annotated
from __future__ import annotations- required in every module- Google-style docstrings - for all public classes and functions
- Pydantic v2 - for schema models
- No unnecessary dependencies - core library depends only on
pydantic
- All new features must include tests
- All bug fixes must include a regression test
- Tests go in
tests/following the existing pattern - Use
pytestfixtures fromtests/conftest.py - Prefer monkeypatching
time.time()overtime.sleep()for expiry tests
# Run all tests
pytest -v
# Run with coverage
pytest --cov=agentlock --cov-report=term-missing
# Run a specific test file
pytest tests/test_gate.py -v- Real-world integration testing - test with actual LangChain, CrewAI, AutoGen deployments
- Additional audit backends - Redis, PostgreSQL, CloudWatch, Datadog
- Additional auth providers - OAuth2 providers, SAML, OIDC
- Performance benchmarks - measure gate overhead at scale
- Documentation improvements - tutorials, guides, API reference
- Memory and context permissions
- Conditional permissions (time, location, context)
- Tool chain permissions for multi-step workflows
- Multi-agent identity delegation
- Use GitHub Issues
- Include Python version, OS, and agentlock version
- Include a minimal reproducible example
- For security vulnerabilities, see SECURITY.md
- One feature per PR - keep changes focused
- Update tests - new code needs tests
- Update docs - if you change the API, update the docs
- No breaking changes without discussion - open an issue first
- Keep commits clean - squash fixup commits before merge
agentlock/gate.py- Central enforcement point. Changes here affect everything.agentlock/schema.py- Pydantic models for the spec. Changes here affect the standard.agentlock/policy.py- Policy evaluation. Check order matters.agentlock/integrations/- Framework wrappers. Must lazy-import framework dependencies.schema/agentlock-v1.0.json- Hand-written JSON schema. Must stay in sync with Pydantic models.
By contributing, you agree that your contributions are licensed under the Apache License 2.0, allowing them to be incorporated into AgentLock under its dual-license model (AGPL-3.0 + commercial). See COMMERCIAL.md.
Be respectful, constructive, and professional. We're building infrastructure that protects people. Act accordingly.