We welcome contributions from everyone! If you're interested in contributing to OmAgent, please follow these guidelines.
All contributions should start with an issue. You can start your contribution by replying to an existing issue, or by creating a new one.
Please describe your contribution in the issue as detailed as possible, including the contribution point, reason, implementation method, etc. The project manager will communicate with you as soon as possible according to the description of the issue and assign the task to you.
We classify contributions into two categories: new feature and optimization.
If you want to contribute a new feature, please explain in detail the function of the feature and your technical approach in the issue. We provide three possible entry points for you:
-
Add a new feature module to OmAgent. For example, support a new large language model, a new memory, a new client type, a new tool, etc.
-
Add a new application to OmAgent. This can be an example application to guide new developers; it can also be an application with practical value; or it can be a reproduction of the content of a paper.
All applications should be placed under theexample
path. An application should contain the worker code, the worker configuration files, the compilation script used to generate the container configuration file template, the program's runtime entry script, and the application's description file, README.md. A typical directory for a simple single-workflow agent is as follows:examples/step1_simpleVQA ├── agent # Where to put worker codes │ ├── input_interface │ │ ├── __init__.py │ │ └── input_interface.py │ └── simple_vqa │ ├── __init__.py │ └── simple_vqa.py ├── compile_container.py # Compilation script ├── configs # Where to put worker config files │ ├── llms │ │ └── gpt.yml │ └── workers │ └── simple_vqa.yaml ├── __init__.py ├── README.md ├── run_app.py ├── run_cli.py └── run_webpage.py
-
Add an agent operator to OmAgent. An agent operator refers to a general-purpose agent logic module, which can be a worker or a sub-workflow.
All agent operators should be placed under theomagent-core/src/omagent_core/advanced_components
path. Single functional nodes can be placed in theomagent-core/src/omagent_core/advanced_components/worker
directory, and these workers should have high generalizability to be used in different functional scenarios. Similarly, workflows with high generalizability can be placed in theomagent-core/src/omagent_core/advanced_components/workflow
directory and can be used as sub-workflows by other developers.
The file structure of the workflow operator should be similar to the simple single-workflow agent mentioned above. The major difference is that the workflow operator does not require an entry script, but needs a workflow.py file containing aConductorWorkflow
object. In addition, the README file of the workflow operator should describe the input and output parameters of the workflow, as well as their types.Inputs: | Name | Type | Required | Description | | -------- | ----- | ----- | ---- | | user_name | str | true | The name of the user |
When submitting an agent operator, you should also submit an example under the
example
directory to demonstrate how to use the operator. The example should include:- A complete application that uses the operator
- Clear documentation explaining how to use the operator
- Sample input/output to help users understand the operator's behavior
For example, if you submit a workflow operator for task decomposition, you should:
- Place the operator code under
omagent-core/src/omagent_core/advanced_components/worker/new_worker_operator/
- Create an example under
examples/new_worker_operator_demo/
showing how to use it
The example helps other developers understand and adopt your operator more easily.
All modifications to existing features are categorized as optimization. This can include bug fixes, performance optimization, code structure optimization, documentation optimization, etc. Please confirm that your modification is forward-compatible and will not change the running logic of the code itself. If forward compatibility cannot be guaranteed, please make a special note in the issue.
Please follow the "fork and pull request" workflow. Here is a short version:
-
Fork the Repository: Fork the OmAgent repository on GitHub. This creates your own copy where you can make changes.
-
Clone Your Fork: Clone your forked repository to your local machine:
git clone https://github.com/your-username/OmAgent.git
-
Create a New Branch: Create a new branch for your specific contribution:
git checkout -b your-feature-branch
-
Make Your Changes: Make your changes to the codebase or documentation.
-
Commit Your Changes: Commit your changes with informative commit messages:
git add . git commit -m "Your commit message"
-
Push Your Changes: Push your changes to your forked repository:
git push origin your-feature-branch
- Navigate to Your Fork: Go to your forked repository on GitHub.
- Create a Pull Request: Click the "New pull request" button.
- Select Your Branch: Select your feature branch as the head and the latest develop branch of the original OmAgent repository as the base.
- Add a Description: Provide a clear description of your changes.
- Submit Your Pull Request: Click the "Create pull request" button.
- Code Style: Adhere to the project's coding style conventions (PEP 8).
- Testing: Ensure your changes don't introduce regressions. Add unit tests if necessary.
- Communication: Feel free to discuss your contributions on the project's issue tracker.
Here are some useful commands:
- List branches:
git branch
- Switch to a branch:
git checkout branch-name
- Merge branches:
git merge other-branch
- Pull changes from upstream:
git pull upstream branch-name
Thank you for your contributions!