# ob-tuner
![CI Status](https://github.com/svange/ob-tuner/actions/workflows/pipeline-prod.yaml/badge.svg?branch=main)
![CI Status](https://github.com/Woxom-Solutions/ob-tuner/actions/workflows/pipeline-prod.yaml/badge.svg?branch=dev)
![PyPI - Version](https://img.shields.io/pypi/v/ob-tuner)
[![License: AGPL v3](https://img.shields.io/badge/License-AGPL_v3-blue.svg)](https://www.gnu.org/licenses/agpl-3.0)
<a href="https://github.com/psf/black"><img alt="Code style: black" src="https://img.shields.io/badge/code%20style-black-000000.svg"></a>
[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg?style=flat-square)](https://conventionalcommits.org)
[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?style=flat-square&logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit)
[![Made with GH Actions](https://img.shields.io/badge/CI-GitHub_Actions-blue?logo=github-actions&logoColor=white)](https://github.com/features/actions "Go to GitHub Actions homepage")
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
## Introduction
ob-tuner is a user-friendly, interactive GUI interface for creating, testing, and managing AI agents for OpenBrain. It provides a Gradio-based interface for users to create and fine-tune agent configurations and test various setups. The ob-tuner UI aims to simplify the process of working with AI agents by providing a comprehensive toolset for developers and researchers.
Your AI Agents will use tools, such as access to your CRM's API, to funnel leads into your campaigns. This UI gives you a place to tweak parameters of your agents (temperature, mode, tools, etc.), store the keys for any tools that require authentication, and test the agents in real-time.
![gradio.png](images/gradio.png)
## Features
- **Interactive GUI**: Easily create, modify, and test agent configurations using a web-based interface powered by Gradio.
- **Real-time Testing**: Test your agent configurations in real-time and see immediate feedback on changes.
- **Configuration Management**: Save, load, and manage different agent configurations using DynamoDB.
## Using ob-tuner
### Agent Configuration
In the ob-tuner interface, you can create and modify agent configurations. These configurations can be saved to your DynamoDB tables in AWS, allowing you to reference them in any AWS workflow using the boto3 library.
### Testing and Tuning
Use the interactive interface to test different configurations and fine-tune agent parameters. The interface provides real-time feedback, making it easy to see the effects of your changes immediately.
## Procedures
### Before Deploying
1. **Ensure AWSServiceRoleForElasticBeanstalk Exists**:
- Verify that the `AWSServiceRoleForElasticBeanstalk` exists in your roles. If it does not exist, create it using the AWS Management Console. The UI will guide you to create the role correctly without needing to fill in the name, trust relationship, or policy document.
2. **Register with Cognito**:
- Register with Amazon Cognito and obtain a `client_id` and `client_secret` for the OAuth2 client. You will need to provide your `callback_url` during this process.
3. **Create a Route53 Record for Your Base Domain**:
- Create a Route 53 record for your base domain. This requires a root A record in the root domain. For example, set `openbra.in` with an `A` record pointing to your EBS endpoint.
4. **Create a Custom Domain in Cognito**:
- Set up a custom domain in your Cognito user pool. Ensure the Route 53 record above is created first before proceeding with this step.
5. **Create an ACM Certificate**:
- Create a certificate in AWS Certificate Manager (ACM) for the custom domain.
6. **Create an SSH Key Pair**:
- Generate an SSH key pair and store the private key in a secure location. Use the key pair name in the `ec2_key_name` parameter.
7. **Add EBS Admin Access**:
- Ensure that Elastic Beanstalk has the necessary administrative access.
![policy.png](images/policy.png)
![policy2.png](images/policy2.png)
### After Deploying
1. **Create a Route 53 Record Set**:
- Create a Route 53 record set pointing your callback URL domain to the Elastic Beanstalk URL.
![ebs.png](images/ebs.png)
### Note
- **Avoid Immediate Redeployment**:
- Do not redeploy the application for at least 5 minutes after a successful deployment to avoid failed runs. This requires additional logic in the deployment pipeline to handle such cases automatically.
-
:construction: **The following procedures are not guaranteed to work, it's where the project is going though.** :construction:
## Quick Start
### Installation
Install ob-tuner and its dependencies using pip:
```bash
pip install ob-tuner
```
### Setting Up Your Environment
To set up your environment, create a `.env` file:
```bash
cp .env.example .env
```
Edit the `.env` file with your own values.
### Running ob-tuner
To launch the ob-tuner interface:
```bash
ob-tuner
```
## Contributing
Contributions are welcome! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines on how to contribute to the project.
## License
ob-tuner is open-source software licensed under the AGPLv3. For commercial use, contact us.
## Procedures
### Before deploying
1. Ensure AWSServiceRoleForElasticBeanstalk exists in your roles, if not, create it. Use the UI and it weil be created correctly without havingto fill in the name or trust relationship or policy document.
1. Before deploying, register with Cognito and get a `client_id` and `client_secret` for the OAuth2 client. You will need to provide your `callback_url`.
1. Before deploying, create a Route53 record for your base domain. This requires a root A record in the root domain. For example `openbra.in` `A` `EBS endpoint`.
1. Before deploying, create a custom domain in your cognito user pool. This requires the record above to be created first.
1. Before deploying you must creaet a certificate in ACM for the custom domain.
1. Before deploying, create ssh keypair and store the private key in a secure location. Use the key pair name in the `ec2_key_name` parameter.
1. Befoer deploying, add EBS admin access
![policy.png](images/policy.png)![policy2.png](images/policy2.png)
### After deploying
1. After deploying, create a Route 53 record set pointing your callback URL domain to the EBS URL.
![ebs.png](images/ebs.png)
### When updating to a new major version of openbrain
You should do a manual `semantic-release version` to bump the version before commit, otherwise, the major versions will be out of sync until the next release (the pipeline will release for you)
NOTE:
Do not redeploy app for at least 5 minutes (if last one was succesful) to avoid failed runs... requires more logic in the pipeline to automate this case
Raw data
{
"_id": null,
"home_page": "https://github.com/svange/openbrain",
"name": "ob-tuner",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.10",
"maintainer_email": null,
"keywords": null,
"author": "Samuel Vange",
"author_email": "7166607+svange@users.noreply.github.com",
"download_url": "https://files.pythonhosted.org/packages/8f/75/40c5e35bcd6a25167d2fe191b7349d22efda8634d38b862be7f8be065014/ob_tuner-5.0.3.tar.gz",
"platform": null,
"description": "# ob-tuner\n\n![CI Status](https://github.com/svange/ob-tuner/actions/workflows/pipeline-prod.yaml/badge.svg?branch=main)\n![CI Status](https://github.com/Woxom-Solutions/ob-tuner/actions/workflows/pipeline-prod.yaml/badge.svg?branch=dev)\n\n![PyPI - Version](https://img.shields.io/pypi/v/ob-tuner)\n[![License: AGPL v3](https://img.shields.io/badge/License-AGPL_v3-blue.svg)](https://www.gnu.org/licenses/agpl-3.0)\n<a href=\"https://github.com/psf/black\"><img alt=\"Code style: black\" src=\"https://img.shields.io/badge/code%20style-black-000000.svg\"></a>\n[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg?style=flat-square)](https://conventionalcommits.org)\n[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?style=flat-square&logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit)\n[![Made with GH Actions](https://img.shields.io/badge/CI-GitHub_Actions-blue?logo=github-actions&logoColor=white)](https://github.com/features/actions \"Go to GitHub Actions homepage\")\n[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)\n\n## Introduction\n\nob-tuner is a user-friendly, interactive GUI interface for creating, testing, and managing AI agents for OpenBrain. It provides a Gradio-based interface for users to create and fine-tune agent configurations and test various setups. The ob-tuner UI aims to simplify the process of working with AI agents by providing a comprehensive toolset for developers and researchers.\n\nYour AI Agents will use tools, such as access to your CRM's API, to funnel leads into your campaigns. This UI gives you a place to tweak parameters of your agents (temperature, mode, tools, etc.), store the keys for any tools that require authentication, and test the agents in real-time.\n\n![gradio.png](images/gradio.png)\n\n## Features\n\n- **Interactive GUI**: Easily create, modify, and test agent configurations using a web-based interface powered by Gradio.\n- **Real-time Testing**: Test your agent configurations in real-time and see immediate feedback on changes.\n- **Configuration Management**: Save, load, and manage different agent configurations using DynamoDB.\n\n\n## Using ob-tuner\n\n### Agent Configuration\n\nIn the ob-tuner interface, you can create and modify agent configurations. These configurations can be saved to your DynamoDB tables in AWS, allowing you to reference them in any AWS workflow using the boto3 library.\n\n### Testing and Tuning\n\nUse the interactive interface to test different configurations and fine-tune agent parameters. The interface provides real-time feedback, making it easy to see the effects of your changes immediately.\n\n## Procedures\n\n### Before Deploying\n\n1. **Ensure AWSServiceRoleForElasticBeanstalk Exists**: \n - Verify that the `AWSServiceRoleForElasticBeanstalk` exists in your roles. If it does not exist, create it using the AWS Management Console. The UI will guide you to create the role correctly without needing to fill in the name, trust relationship, or policy document.\n\n2. **Register with Cognito**: \n - Register with Amazon Cognito and obtain a `client_id` and `client_secret` for the OAuth2 client. You will need to provide your `callback_url` during this process.\n\n3. **Create a Route53 Record for Your Base Domain**: \n - Create a Route 53 record for your base domain. This requires a root A record in the root domain. For example, set `openbra.in` with an `A` record pointing to your EBS endpoint.\n\n4. **Create a Custom Domain in Cognito**: \n - Set up a custom domain in your Cognito user pool. Ensure the Route 53 record above is created first before proceeding with this step.\n\n5. **Create an ACM Certificate**: \n - Create a certificate in AWS Certificate Manager (ACM) for the custom domain.\n\n6. **Create an SSH Key Pair**: \n - Generate an SSH key pair and store the private key in a secure location. Use the key pair name in the `ec2_key_name` parameter.\n\n7. **Add EBS Admin Access**:\n - Ensure that Elastic Beanstalk has the necessary administrative access.\n\n ![policy.png](images/policy.png)\n ![policy2.png](images/policy2.png)\n\n### After Deploying\n\n1. **Create a Route 53 Record Set**: \n - Create a Route 53 record set pointing your callback URL domain to the Elastic Beanstalk URL.\n\n ![ebs.png](images/ebs.png)\n\n### Note\n\n- **Avoid Immediate Redeployment**: \n - Do not redeploy the application for at least 5 minutes after a successful deployment to avoid failed runs. This requires additional logic in the deployment pipeline to handle such cases automatically.\n - \n\n :construction: **The following procedures are not guaranteed to work, it's where the project is going though.** :construction:\n\n## Quick Start\n\n### Installation\n\nInstall ob-tuner and its dependencies using pip:\n\n```bash\npip install ob-tuner\n```\n\n### Setting Up Your Environment\n\nTo set up your environment, create a `.env` file:\n\n```bash\ncp .env.example .env\n```\n\nEdit the `.env` file with your own values.\n\n### Running ob-tuner\n\nTo launch the ob-tuner interface:\n\n```bash\nob-tuner\n```\n\n\n## Contributing\n\nContributions are welcome! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines on how to contribute to the project.\n\n## License\n\nob-tuner is open-source software licensed under the AGPLv3. For commercial use, contact us.\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n## Procedures\n\n### Before deploying\n\n1. Ensure AWSServiceRoleForElasticBeanstalk exists in your roles, if not, create it. Use the UI and it weil be created correctly without havingto fill in the name or trust relationship or policy document.\n\n1. Before deploying, register with Cognito and get a `client_id` and `client_secret` for the OAuth2 client. You will need to provide your `callback_url`.\n\n1. Before deploying, create a Route53 record for your base domain. This requires a root A record in the root domain. For example `openbra.in` `A` `EBS endpoint`.\n\n\n1. Before deploying, create a custom domain in your cognito user pool. This requires the record above to be created first.\n\n1. Before deploying you must creaet a certificate in ACM for the custom domain.\n\n1. Before deploying, create ssh keypair and store the private key in a secure location. Use the key pair name in the `ec2_key_name` parameter.\n\n1. Befoer deploying, add EBS admin access \n![policy.png](images/policy.png)![policy2.png](images/policy2.png)\n\n\n### After deploying\n1. After deploying, create a Route 53 record set pointing your callback URL domain to the EBS URL.\n![ebs.png](images/ebs.png)\n\n### When updating to a new major version of openbrain\nYou should do a manual `semantic-release version` to bump the version before commit, otherwise, the major versions will be out of sync until the next release (the pipeline will release for you)\n\nNOTE:\nDo not redeploy app for at least 5 minutes (if last one was succesful) to avoid failed runs... requires more logic in the pipeline to automate this case",
"bugtrack_url": null,
"license": null,
"summary": "OpenBra.in agent creation and tuning Gradio deployment.",
"version": "5.0.3",
"project_urls": {
"Homepage": "https://github.com/svange/openbrain"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "dd86864c8990736c7e0dcf848ee055899ab72e246292a231f497d7238209ea99",
"md5": "ec56138f9053dc92059928e6e24243b1",
"sha256": "27354794bea11d3791b01f3d7fafe44dc31ee4cea922091e318c286e613f9040"
},
"downloads": -1,
"filename": "ob_tuner-5.0.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "ec56138f9053dc92059928e6e24243b1",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.10",
"size": 623023,
"upload_time": "2024-07-30T05:29:07",
"upload_time_iso_8601": "2024-07-30T05:29:07.706305Z",
"url": "https://files.pythonhosted.org/packages/dd/86/864c8990736c7e0dcf848ee055899ab72e246292a231f497d7238209ea99/ob_tuner-5.0.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "8f7540c5e35bcd6a25167d2fe191b7349d22efda8634d38b862be7f8be065014",
"md5": "d7143ce3d47eebe5ff97cbd65784cd84",
"sha256": "b70bffab4d77a7eeb6350e173ee3bcc8a28c6d459f5aa404ece740bc4e725500"
},
"downloads": -1,
"filename": "ob_tuner-5.0.3.tar.gz",
"has_sig": false,
"md5_digest": "d7143ce3d47eebe5ff97cbd65784cd84",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.10",
"size": 623974,
"upload_time": "2024-07-30T05:29:09",
"upload_time_iso_8601": "2024-07-30T05:29:09.441711Z",
"url": "https://files.pythonhosted.org/packages/8f/75/40c5e35bcd6a25167d2fe191b7349d22efda8634d38b862be7f8be065014/ob_tuner-5.0.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-07-30 05:29:09",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "svange",
"github_project": "openbrain",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "ob-tuner"
}