apps/opik-documentation/documentation/fern/docs-v2/contributing/guides/agent-optimizer-sdk.mdx
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 and the Contributor License Agreement (CLA).
The Agent Optimizer is located in the sdks/opik_optimizer directory. Here's an overview of the key components:
src/: Main source codebenchmarks/: Benchmarking tools and resultsnotebooks/: Example notebooks and tutorialstests/: Test filesdocs/: Additional documentationscripts/: Utility scriptssetup.py: Package configurationrequirements.txt: Python dependenciesWe use pytest for testing. When adding new features:
<Steps> <Step title="Write unit tests">Write unit tests in the `tests/` directory</Step> <Step title="Run tests">Ensure all tests pass with `pytest tests/`</Step> </Steps>The optimizer includes benchmarking tools to measure performance improvements:
<Steps> <Step title="Run benchmarks">```bash cd benchmarks python run_benchmark.py ```</Step> <Step title="View results">View results in the `benchmark_results/` directory</Step> <Step title="Add benchmarks">Add new benchmarks for new optimization strategies</Step> </Steps>When adding new features or making changes:
<Steps> <Step title="Update README">Update the README.md</Step> <Step title="Add docstrings">Add docstrings for new functions and classes</Step> <Step title="Add examples">Include examples in the `notebooks/` directory</Step> <Step title="Update docs"> Update the main documentation if necessary. See the [Documentation Guide](documentation) for details. </Step> </Steps>We follow PEP 8 guidelines. Before submitting a PR:
<Steps> <Step title="Run linter">Run `flake8` to check for style issues</Step> <Step title="Fix issues">Fix any linting errors</Step> <Step title="Check style">Ensure your code follows Python best practices</Step> </Steps>Your PR should:
The notebooks/ directory contains examples and tutorials. When adding new features:
If you need help or have questions:
Remember to review our Contributor License Agreement (CLA) before contributing.