This framework is for CSC 581 students to develop intelligent agents supporting the AI4S&R project. Students can create specialized agents for various SAR roles such as those listed in this spreadsheet:
https://docs.google.com/spreadsheets/d/1QZK5HAdDC-_XNui6S0JZTbJH5_PbYJTp8_gyhXmz8Ek/edit?usp=sharing https://docs.google.com/spreadsheets/d/11rBV9CbKNeQbWbaks8TF6GO7WcSUDS_-hAoH75UEkgQ/edit?usp=sharing
Each student or team will choose a specific role within the SAR ecosystem and implement an agent that provides decision support and automation for that role.
Please submit a link to your clone of the repository to Canvas.
- Python 3.8 or higher
- pyenv (recommended for Python version management)
- pip (for dependency management)
- Clone the repository:
git clone <repository-url>
cd sar-project
- Set up Python environment:
# Using pyenv (recommended)
pyenv install 3.9.6 # or your preferred version
pyenv local 3.9.6
# Create and activate virtual environment
python -m venv .venv
source .venv/bin/activate # On Unix/macOS
# or
.venv\Scripts\activate # On Windows
- Install dependencies:
pip install -r requirements.txt
pip install -e .
- Configure environment variables:
- Obtain required API keys:
- OpenAI API key: Sign up at https://platform.openai.com/signup
- Update your
.env
file with the following:OPENAI_API_KEY=your_openai_api_key_here
- Obtain required API keys:
pip install google-generativeai
import google.generativeai as genai
- Google Gemini API Key: Obtain at https://aistudio.google.com/apikey
- Configure with the following:
genai.configure(api_key=os.getenv("GOOGLE_API_KEY"))
Make sure to keep your .env
file private and never commit it to version control.
sar-project/
├── src/
│ └── sar_project/ # Main package directory
│ └── agents/ # Agent implementations
│ └── config/ # Configuration and settings
│ └── knowledge/ # Knowledge base implementations
├── tests/ # Test directory
├── pyproject.toml # Project metadata and build configuration
├── requirements.txt # Project dependencies
└── .env # Environment configuration
This project follows modern Python development practices:
- Source code is organized in the
src/sar_project
layout - Use
pip install -e .
for development installation - Run tests with
pytest tests/
- Follow the existing code style and structure
- Make sure to update requirements.txt when adding dependencies
Q: How do I choose a role for my agent?
A: Review the list of SAR roles above and consider which aspects interest you most. Your agent should provide clear value to SAR operations through automation, decision support, or information processing.
Q: What capabilities should my agent have?
A: Your agent should handle tasks relevant to its role such as: data processing, decision making, communication with other agents, and providing actionable information to human operators.
Q: Can I add new dependencies?
A: Yes, you can add new Python packages to requirements.txt as needed for your implementation.
Q: Why am I getting API key errors?
A: Ensure you've properly set up your .env file and obtained valid API keys from the services listed above.
Q: How do I test my agent?
A: Use the provided test framework in the tests/ directory. Write tests that verify your agent's core functionality.
Q: Can I use external libraries for my agent?
A: Yes, you can use external libraries as long as they are compatible.