https://github.com/nethermindeth/agent4rena-agent-template
https://github.com/nethermindeth/agent4rena-agent-template
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/nethermindeth/agent4rena-agent-template
- Owner: NethermindEth
- License: mit
- Created: 2025-03-26T11:24:53.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-05-07T19:18:51.000Z (about 1 year ago)
- Last Synced: 2025-05-07T21:05:44.119Z (about 1 year ago)
- Language: Python
- Size: 53.7 KB
- Stars: 4
- Watchers: 4
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Solidity Audit Agent Template
An AI-powered agent template for auditing Solidity smart contracts using OpenAI models.
## Features
- Audit Solidity contracts for security vulnerabilities
- Security findings classified by threat level (Critical, High, Medium, Low, Informational)
- Two operation modes:
- **Server mode**: Runs a webhook server to receive notifications from Agent4rena when a new challenge begins
- **Local mode**: Processes a GitHub repository directly
## Installation
```bash
# Clone the repository
git clone https://github.com/yourusername/solidity-audit-agent.git
cd solidity-audit-agent
# Create a virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install the package
pip install -e .
# Create .env file from example
cp .env.example .env
# Edit .env with your configuration
```
## Configuration
Create a `.env` file from `.env.example` and set the variables.
```
cp .env.example .env
```
## Usage
### Server Mode
#### ⚠️ Warning ⚠️ - This mode does not work yet. It will be available once Agent4rena is released.
Join the [telegram group](https://t.me/agent4rena) to stay updated with the latest news.
To run the agent in server mode, you need to run the following command:
```bash
audit-agent server
```
By default, the agent will run on port 8000. To use a custom port, you can use the following command:
```bash
audit-agent server --port 8008
```
### Local Mode
Run the agent in local mode to audit a GitHub repository directly.
You can use the following example repository to test out the agent. The results will be saved in JSON format in the specified output file, by default that is `audit.json`.
```bash
audit-agent local --repo https://github.com/andreitoma8/learn-solidity-hacks.git --output audit.json
```
This mode is useful for testing the agent or auditing repositories outside of the Agent4rena platform.
To see all available options (such as auditing a specific commit or selecting only some of the files to audit), run
```bash
audit-agent --help
```
## License
MIT