---
headline: Opik Optimizer | Opik Documentation
og:description: Contribute effectively to the Agent Optimizer SDK and enhance model
performance. Start optimizing prompts with our detailed guide.
og:site_name: Opik Documentation
og:title: Contribute to the Agent Optimizer - Opik
title: Opik Optimizer
canonical-url: https://www.comet.com/docs/opik/contributing/guides/agent-optimizer-sdk
---
# Contributing to the Agent Optimizer SDK
This guide will help you get started with contributing to the Agent Optimizer SDK, our tool for optimizing prompts and improving model performance.
Before you start, please review our general [Contribution Overview](/v1/contributing/overview) and the [Contributor License Agreement (CLA)](https://github.com/comet-ml/opik/blob/main/CLA.md).
## Project Structure
The Agent Optimizer is located in the `sdks/opik_optimizer` directory. Here's an overview of the key components:
- `src/`: Main source code
- `benchmarks/`: Benchmarking tools and results
- `notebooks/`: Example notebooks and tutorials
- `tests/`: Test files
- `docs/`: Additional documentation
- `scripts/`: Utility scripts
- `setup.py`: Package configuration
- `requirements.txt`: Python dependencies
## Setup
```bash
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
```
```bash
cd sdks/opik_optimizer
pip install -r requirements.txt
pip install -e .
```
```bash
pytest tests/
```
## Development Workflow
Create a new branch for your changes
Make your changes
Add tests for new functionality
Run the test suite
Run benchmarks if applicable
Submit a pull request
## Testing
We use pytest for testing. When adding new features:
Write unit tests in the `tests/` directory
Ensure all tests pass with `pytest tests/`
## Benchmarking
The optimizer includes benchmarking tools to measure performance improvements:
```bash cd benchmarks python run_benchmark.py ```
View results in the `benchmark_results/` directory
Add new benchmarks for new optimization strategies
## Documentation
When adding new features or making changes:
Update the README.md
Add docstrings for new functions and classes
Include examples in the `notebooks/` directory
Update the main documentation if necessary. See the [Documentation Guide](documentation) for details.
## Code Style
We follow PEP 8 guidelines. Before submitting a PR:
Run `flake8` to check for style issues
Fix any linting errors
Ensure your code follows Python best practices
## Pull Request Process
Fork the repository
Create your feature branch
Make your changes
Run tests and benchmarks
Submit a pull request
Your PR should:
- Have a clear description of the changes
- Include tests for new functionality
- Pass all CI checks
- Follow the project's coding standards
- Include benchmark results if applicable
## Notebooks and Examples
The `notebooks/` directory contains examples and tutorials. When adding new features:
Create a new notebook demonstrating the feature
Include clear explanations and comments
Show both basic and advanced usage
Add performance comparisons if relevant
## Need Help?
If you need help or have questions:
- Open an issue on GitHub
- Join our [Comet Chat](https://chat.comet.com) community
- Check the existing documentation and notebooks
---
_Remember to review our [Contributor License Agreement (CLA)](https://github.com/comet-ml/opik/blob/main/CLA.md) before contributing._