Skip to main content

ob-tuner

CI Status CI Status

PyPI - Version License: AGPL v3 Code style: black Conventional Commits pre-commit Made with GH Actions 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

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 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

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.

🚧 The following procedures are not guaranteed to work, it's where the project is going though. 🚧

Quick Start

Installation

Install ob-tuner and its dependencies using pip:

pip install ob-tuner

Setting Up Your Environment

To set up your environment, create a .env file:

cp .env.example .env

Edit the .env file with your own values.

Running ob-tuner

To launch the ob-tuner interface:

ob-tuner

Contributing

Contributions are welcome! Please see 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.

  2. 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.

  3. 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.

  4. Before deploying, create a custom domain in your cognito user pool. This requires the record above to be created first.

  5. Before deploying you must creaet a certificate in ACM for the custom domain.

  6. 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.

  7. Befoer deploying, add EBS admin access policy.pngpolicy2.png

After deploying

  1. After deploying, create a Route 53 record set pointing your callback URL domain to the EBS URL. 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

Metadata

Release files for ob-tuner 5.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ob-tuner 5.1.0
File Size Uploaded
ob_tuner-5.1.0.tar.gz 623.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ob-tuner 5.1.0
File Interpreter ABI Platform
ob_tuner-5.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 1.2 MB

Release files / ob_tuner-5.1.0.tar.gz

Download URL ob_tuner-5.1.0.tar.gz
Size 623.0 kB
Tags Source
SHA-256 checksum
How to use checksums
88bde91a4bef27e3ab886b959205e5f624848738a367f085786ad20743860c6e
BLAKE2b-256 checksum
How to use checksums
67cc5772df1995ac5bbb16badbb216fe31e276546dbfe9676c203c0f1b38a264
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.1.1 CPython/3.10.16 Linux/6.8.0-1021-azure

Release files / ob_tuner-5.1.0-py3-none-any.whl

Download URL ob_tuner-5.1.0-py3-none-any.whl
Size 623.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b19bdbd8f4768b895ef7098745cab5e0760e81db5822cde43026c73d99158fa8
BLAKE2b-256 checksum
How to use checksums
0255d028045fc43e78a2f327ab2f09259f406436b1e478dd556879d1bc9786bf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.1.1 CPython/3.10.16 Linux/6.8.0-1021-azure

Release history Release notifications | RSS feed

This release

5.1.0 This release

2 release files

5.0.3

2 release files

5.0.2

2 release files

5.0.1

2 release files

5.0.0

2 release files

4.8.0

2 release files

4.7.0

2 release files

4.6.0

2 release files

4.5.0

2 release files

4.4.0

2 release files

4.3.0

2 release files

4.2.0

2 release files

4.1.0

2 release files

4.0.0

2 release files

1.1.0

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page