Skip to main content

BotsOnRails

BotsOnRails was born out of a frustration with the challenges of building complex workflows involving large language models (LLMs), human interaction, and custom logic. As LLMs like GPT-3 and GPT-4 have become more powerful and accessible, there's been an explosion of interest in building applications that leverage their capabilities. However, building these applications often requires orchestrating a complex dance between AI-generated content, human review and approval, and custom processing logic.

Existing workflow orchestration tools, while powerful, often feel overly complex and rigid for these kinds of AI-driven workflows. They require a lot of upfront design and don't easily accommodate the kinds of dynamic, human-in-the-loop workflows that are common when working with LLMs.

At the same time, building these workflows from scratch using raw Python code quickly becomes unmanageable. The flow of data and control between different parts of the system becomes hard to follow, and it's easy for subtle bugs and inconsistencies to creep in.

BotsOnRails was created to provide a sweet spot between these two extremes. It offers a simple, flexible, and expressive way to define workflows as trees of nodes, where each node represents a single step or decision point. Crucially, it has first-class support for human interaction, allowing you to easily designate any node as a pause point for human review or approval.

Key Features:

  1. Tree-based orchestration: Define complex workflows as execution trees with nodes representing tasks or decisions.
  2. Human-in-the-loop: Seamlessly integrate human input and approvals into automated workflows.
  3. Dynamic routing: Route execution flow based on runtime data or conditions using functions or static mappings.
  4. Type checking: Ensure type safety and compatibility between nodes for robust execution.
  5. Visualization: Generate visual representations of your execution trees for analysis and debugging.
  6. Resumable execution: Restart or continue execution from specific nodes for iterative review and modification.
  7. Lightweight and flexible: Easy to integrate into existing projects and adapt to various use cases.

Installation:

Prerequisites

You need to install graphviz, which has different installation methods depending on your system.

Windows

We'd suggest using the .exe installer from the official graphviz website.

Linux

If you're using Ubuntu or another Debian derivative, try using apt like so:

sudo apt install graphviz 

MacOS

There are a number of ways to install graphviz on Mac. For example, you can use homebrew:

brew install graphviz

Install BotsOnRails

You can install the package directly from PyPi using pip:

pip install BotsOnRails

Docs & Quickstart:

Check out our extensive documentation (still a work in progress).

Examples

We have a number of examples that illustrate how to build some common LLM-powered applications using BotsOnRails:

  1. Document Processing Pipeline
  2. Human-in-the-loop Content Moderation
  3. LLM-Powered Interface

Contributing:

Contributions are welcome! Please see the contributing guidelines in the GitHub repository.

License:

BotsOnRails is licensed under the MIT License.

Metadata

Release files for BotsOnRails 0.1.2

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

Source distribution (sdist)

Source distribution for BotsOnRails 0.1.2
File Size Uploaded
botsonrails-0.1.2.tar.gz 408.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for BotsOnRails 0.1.2
File Interpreter ABI Platform
botsonrails-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 434.8 kB

Release files / botsonrails-0.1.2.tar.gz

Download URL botsonrails-0.1.2.tar.gz
Size 408.9 kB
Tags Source
SHA-256 checksum
How to use checksums
6f115e40cde4a594e4f1ef054320b6d594af4369b411967914ca43dd930c26b3
BLAKE2b-256 checksum
How to use checksums
025cc427b5622cfc150f505653158a3a2ed4232168d70f17aa51c01dd9feddd8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-httpx/0.27.0

Release files / botsonrails-0.1.2-py3-none-any.whl

Download URL botsonrails-0.1.2-py3-none-any.whl
Size 25.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9369118075573d04268f7b9bcf20325ed1ece5b58aec4a1f18cb357020fb0fd6
BLAKE2b-256 checksum
How to use checksums
6272cdd95ec6db8d0075022dcfe97e54587b41682b705a603d22a33bfa25c6a3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-httpx/0.27.0

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

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