pip install aegis-detect==1.0.1 Copy PIP instructions
Aegis is a fine-tuned CodeBERT model designed to classify AI-generated and human Python code. While CodeBERT contains 125 million parameters, Aegis was efficiently trained locally using LoRA (Low-Rank Adaptation), updating only a subset of the original parameters.
This project investigates whether AI-generated and human-written code can be told apart from the code itself. Consequently, the dataset (20K raw Python samples: 10K AI + 10K Human; 18,888 after cleaning and deduplication) was aggressively cleaned to ensure standard formatting and the removal of comments and docstrings. A confidence threshold of 0.7 was established to flag samples as AI-generated only when strong evidence exists. Aegis is not a definitive judge; predictions can be imperfect, particularly in tasks where semantic convergence between humans and AI is observed (e.g., LeetCode solutions).
pip install aegis-detect CLI Usage Supported commands:
# Predicting using a file aegis --file path/to/code.py # Predicting using text aegis --text "def add(a, b):\n return a + b" # JSON output aegis --file path/to/code.py --json > result.json # Setting a threshold for AI classification aegis --file path/to/code.py --threshold 0.7 # Classify as-is (by default docstrings and comments are stripped first, as in training) aegis --file path/to/code.py --raw # Help aegis --help # Uninstall aegis-cleanup pip uninstall aegis-detect Notes:
This project is licensed under the MIT License.
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
None of the files in this release were uploaded with provenance metadata.
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.
Yanked reason: Superseded by 0.1.6 + new contact info
Yanked reason: Superseded by v0.1.1 which removes unnecessary dependencies




