Thank you for your interest in contributing to Agentic Kernel! This document provides guidelines and instructions for contributing to the project.
- Code of Conduct
- Getting Started
- Development Environment
- Workflow
- Coding Standards
- Testing
- Documentation
- Submitting Changes
We expect all contributors to adhere to our code of conduct, which promotes a welcoming and inclusive environment. Please be respectful, considerate, and constructive in all interactions.
- Fork the repository: Start by forking the Agentic Kernel repository.
- Clone the fork: Clone your fork to your local machine.
- Set up the development environment: Follow the instructions in the Development Environment section.
- Python 3.10 or higher
- uv (Python package manager)
-
Clone the repository:
git clone https://github.com/your-username/agentic-kernel.git cd agentic-kernel -
Create and activate a virtual environment with uv:
uv venv source .venv/bin/activate # On Windows: .venv\Scripts\activate
-
Install development dependencies:
uv pip install -e ".[dev]"
-
Create a branch: Create a branch for your changes.
git checkout -b feature/your-feature-name
-
Make changes: Implement your changes, following the Coding Standards.
-
Test: Run tests to ensure your changes don't break existing functionality.
pytest
-
Document: Update documentation as necessary.
-
Commit: Commit your changes with a descriptive commit message.
git commit -m "Add feature X" -
Push: Push your changes to your fork.
git push origin feature/your-feature-name
-
Pull Request: Create a pull request from your fork to the main repository.
- Follow PEP 8 style guide.
- Use type hints for all functions and methods.
- Write docstrings for all modules, classes, functions, and methods.
- Use meaningful variable and function names.
- Keep functions and methods short and focused.
- Use
rufffor linting and formatting to ensure consistent code style.
- Use 4 spaces for indentation.
- Use single quotes for strings unless the string contains single quotes.
- Use f-strings for string formatting.
- Keep line length to 88 characters (enforced by ruff).
- Add comments for complex code or non-obvious behavior.
- Write tests for all new features and bug fixes.
- Follow test-driven development (TDD) principles when appropriate.
- Use pytest for unit and integration tests.
- Run the full test suite before submitting changes.
- Aim for high test coverage, especially for critical components.
# Run all tests
pytest
# Run tests with coverage
pytest --cov=src/agentic_kernel
# Run specific tests
pytest tests/test_orchestrator.py- Update documentation for any changes to APIs or behavior.
- Document all public functions, classes, and modules.
- Use clear language and provide examples where appropriate.
- Keep documentation up-to-date with code changes.
- Write docstrings in Google style.
- Include parameter descriptions, return values, and raised exceptions.
- Add examples for complex functions or classes.
- Update README.md, ARCHITECTURE.md, and other documentation files as needed.
Example docstring:
def create_dynamic_workflow(self, goal: str, context: Optional[Dict[str, Any]] = None) -> List[WorkflowStep]:
"""Create a dynamic workflow for a given goal.
Args:
goal: The goal to create a workflow for.
context: Optional context information for planning.
Returns:
A list of WorkflowStep objects representing the workflow.
Raises:
ValueError: If the goal is empty or invalid.
Example:
```python
workflow = await orchestrator.create_dynamic_workflow("Research quantum computing")
result = await orchestrator.execute_workflow(workflow)
```
"""- Pull Request: Submit a pull request from your fork to the main repository.
- Description: Include a detailed description of your changes.
- Issue Reference: Reference any related issues.
- Tests: Ensure all tests pass and code style checks pass.
- Review: Address any feedback from code reviews.
- CI/CD: Wait for CI/CD pipelines to complete successfully.
- Merge: Once approved, your changes will be merged into the main branch.
If you're contributing to the Orchestrator component, please review the Orchestrator Developer Guide for detailed information on the architecture and extension points.
Key areas to consider when modifying the Orchestrator:
- Nested Loop Architecture: Understand the separation of planning (outer loop) and execution (inner loop) concerns.
- Error Recovery: Maintain or improve error recovery mechanisms.
- Progress Monitoring: Ensure accurate progress tracking.
- Agent Integration: Follow the established patterns for agent registration and delegation.
Your contributions help improve Agentic Kernel for everyone. We appreciate your time and effort!