Thank you for your interest in contributing to AgentGuard! AgentGuard is a community-driven open-source project dedicated to securing autonomous AI agents and making LLM-driven development safe for everyone.
-
Clone the repository:
git clone https://github.com/agentguard-ai/agentguard.git cd agentguard -
Create a virtual environment:
python -m venv .venv # Windows: .venv\Scripts\activate # Linux / macOS: source .venv/bin/activate
-
Install dependencies in editable mode:
pip install -e ".[dev]" -
Run tests:
pytest
AgentGuard is structured into clean modular layers:
agentguard/config.py: Pydantic v2 schemas and validation foragentguard.yaml.agentguard/engine/:policy_engine.py: Master orchestrator coordinating all security layers.filesystem.py: Path canonicalization, traversal defense, sensitive pattern matching.shell_parser.py: AST tokenization, subshell restriction, pipeline inspection, dangerous command heuristics.secret_redactor.py: Multi-pattern regex & entropy credential scrubber.rate_limiter.py: Sliding window action count and byte throughput quotas.approval_prompter.py: Rich TUI interactive Human-in-the-Loop approval modal.
agentguard/proxy/:process_runner.py: Subprocess execution wrapper with environment scrubbing and live stream redaction.mcp_gateway.py: Model Context Protocol (MCP) JSON-RPC stdio proxy.
agentguard/telemetry/:logger.py: Structured JSONL and Rich terminal logger.auditor.py: Aggregates session statistics and security reports.
agentguard/sdk.py: Programmatic Python SDK (Guard) and@guard.guard_tooldecorator.
- All new features and rule additions must include unit tests under
tests/. - Ensure 100% pass rate before submitting a pull request:
pytest -v --tb=short
- Check code formatting and style:
ruff check .
- Fork the repo and create your branch from
main:git checkout -b feature/my-cool-defense
- Commit your changes with clear, descriptive commit messages.
- Push to your fork and submit a Pull Request to
main. - Ensure all CI checks pass.
Thank you for helping make AI agents safe and secure!