Skip to content

Commit fbd3908

Browse files
committed
chore: update README
1 parent 6e878d3 commit fbd3908

File tree

1 file changed

+46
-24
lines changed

1 file changed

+46
-24
lines changed

README.md

Lines changed: 46 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,71 @@
1-
# 🤖 bobrapet - Kubernetes-Native AI Workflow Engine
1+
# 🤖 bobrapet - A Declarative, Kubernetes-Native AI Workflow Engine
22

3-
> **Declarative, Composable, Cloud-Native AI Workflows**
4-
5-
Bobrapet is a Kubernetes-native workflow engine designed specifically for AI and data processing workloads. It uses Custom Resource Definitions (CRDs) to define, execute, and manage complex, multi-step workflows directly within your Kubernetes cluster.
3+
Bobrapet is a powerful, cloud-native workflow engine for orchestrating complex AI and data processing pipelines on Kubernetes. It leverages the declarative power of Custom Resource Definitions (CRDs) to let you define, manage, and execute multi-step, event-driven workflows with unparalleled flexibility and control.
64

75
## 🌟 Key Features
86

9-
- **Declarative Workflows**: Define complex pipelines as Kubernetes resources (`Story`).
10-
- **Composable Components**: Package reusable tasks as `Engrams`, backed by versioned, cluster-scoped `EngramTemplates`.
11-
- **Flexible Triggers**: Initiate workflows from events using `Impulses`, backed by `ImpulseTemplates`.
12-
- **Full Observability**: Track the state of every workflow (`StoryRun`) and each individual step (`StepRun`).
13-
- **Cross-Namespace Support**: Orchestrate workflows that span multiple Kubernetes namespaces, enabling multi-tenant and shared service models.
7+
- **Declarative & GitOps-Friendly**: Define your entire workflow as a `Story` resource. Treat your AI pipelines as code and manage them through GitOps.
8+
- **Advanced DAG Orchestration**: A sophisticated Directed Acyclic Graph (DAG) engine orchestrates your steps, enabling complex dependencies and execution flows.
9+
- **Parallel-by-Default Execution**: For maximum performance, independent steps run in parallel automatically. Use the `needs` keyword to define an explicit execution order.
10+
- **Dynamic Control Flow**: Implement powerful logic directly in your workflows with built-in primitives and Common Expression Language (CEL) for `if` conditions.
11+
- **Composable & Reusable Components**: Package reusable tasks as `Engrams`, backed by versioned, cluster-scoped `EngramTemplates` for consistency.
12+
- **Flexible Streaming Strategies**: Optimize for long-running tasks with `PerStory` (always-on) or `PerStoryRun` (on-demand) resource allocation.
13+
- **Cross-Namespace Orchestration**: Securely reference resources and orchestrate workflows across multiple Kubernetes namespaces.
14+
- **Event-Driven Triggers**: Initiate workflows from various event sources using `Impulses`.
15+
16+
## 🏗️ Architecture
17+
18+
The `bobrapet` operator is engineered for robustness and maintainability, following best practices for Kubernetes controller design. The core `StoryRun` controller, for example, is built on a modular, sub-reconciler pattern:
19+
20+
- **Main Controller**: Acts as a lean, high-level orchestrator.
21+
- **RBAC Manager**: Manages all RBAC-related resources (`ServiceAccount`, `Role`, `RoleBinding`).
22+
- **DAG Reconciler**: Contains the entire workflow state machine, handling state synchronization, dependency analysis, and scheduling.
23+
- **Step Executor**: Manages the specific logic for launching different types of steps (`engram`, `executeStory`, etc.).
24+
25+
This clean separation of concerns makes the operator highly scalable, testable, and easy to extend.
1426

1527
## 📚 Core Concepts
1628

1729
- **`Story`**: The top-level definition of a workflow, composed of steps.
1830
- **`Engram`**: A configured, runnable instance of a component (a "worker").
1931
- **`Impulse`**: A trigger that creates workflow instances based on external events.
2032
- **`StoryRun`**: An instance of an executing `Story`.
21-
- **`StepRun`**: An instance of a single step executing within a `StoryRun`.
33+
- **`StepRun`**: An instance of a single `engram` step executing within a `StoryRun`.
2234
- **`EngramTemplate` & `ImpulseTemplate`**: Reusable, cluster-scoped definitions for `Engrams` and `Impulses`.
2335

36+
## 🧰 Workflow Primitives
37+
38+
Beyond running custom `Engrams`, `Story` resources can use a rich set of built-in primitives for advanced control flow:
39+
40+
- **`executeStory`**: Run another `Story` as a sub-workflow, either synchronously or asynchronously.
41+
- **`if` condition**: Use CEL expressions to conditionally execute steps.
42+
- **`switch`**: Implement multi-way branching (like a switch/case statement).
43+
- **`loop`**: Iterate over arrays or repeat actions.
44+
- **`parallel`**: Group steps to be executed concurrently.
45+
- And many more for flow control, data transformation, and state management (`sleep`, `stop`, `filter`, `transform`, `setData`, etc.).
46+
2447
## 🚀 Quick Start
2548

2649
### Prerequisites
27-
- A running Kubernetes cluster (e.g., KinD, Minikube, or a cloud provider).
50+
- A running Kubernetes cluster (e.g., KinD, Minikube).
2851
- `kubectl` configured to access your cluster.
2952

3053
### 1. Install the Operator
3154

32-
First, install the Custom Resource Definitions (CRDs) that define the `bobrapet` resources:
55+
First, install the Custom Resource Definitions (CRDs):
3356
```bash
3457
make install
3558
```
3659

3760
Next, deploy the operator controller to your cluster:
3861
```bash
39-
make deploy
62+
make deploy IMG=<your-repo>/bobrapet:latest
4063
```
64+
*(Replace `<your-repo>` with your container registry)*
4165

4266
### 2. Deploy a Sample Workflow
4367

44-
This example defines a two-step workflow that fetches content from a URL and uses an AI model to summarize it.
68+
The following example defines a two-step workflow that fetches content from a URL and uses an AI model to summarize it. Notice how the `summarize` step implicitly depends on the output of the `fetch-content` step.
4569

4670
Apply the sample manifests, which include the necessary `EngramTemplates`, `Engrams`, and the `Story` definition:
4771
```bash
@@ -51,11 +75,11 @@ kubectl apply -k config/samples
5175
This creates:
5276
- An `Engram` named `http-request-engram` to fetch web content.
5377
- An `Engram` named `openai-summarizer-engram` to summarize text.
54-
- A `Story` named `summarize-website-story` that chains them together.
78+
- A `Story` named `summarize-website-story` that defines the workflow.
5579

5680
### 3. Run the Workflow
5781

58-
Create a `StoryRun` resource to trigger the workflow with a specific URL:
82+
Create a `StoryRun` resource to trigger the workflow. This `StoryRun` provides the initial input `url` required by the `Story`.
5983

6084
```yaml
6185
# ./run.yaml
@@ -64,10 +88,10 @@ kind: StoryRun
6488
metadata:
6589
name: summarize-k8s-docs
6690
spec:
67-
inputs:
68-
url: https://kubernetes.io/docs/concepts/overview/
6991
storyRef:
7092
name: summarize-website-story
93+
inputs:
94+
url: https://kubernetes.io/docs/concepts/overview/
7195
```
7296
7397
Apply it:
@@ -77,7 +101,7 @@ kubectl apply -f ./run.yaml
77101

78102
### 4. Observe the Results
79103

80-
You can monitor the execution of the workflow by checking the `StoryRun` and its child `StepRuns`.
104+
Monitor the execution of the workflow by checking the `StoryRun` and its child `StepRuns`.
81105

82106
```bash
83107
# Check the overall status of the workflow
@@ -87,18 +111,16 @@ kubectl get storyrun summarize-k8s-docs -o yaml
87111
kubectl get stepruns -l bubu.sh/storyrun=summarize-k8s-docs
88112
```
89113

90-
## 🛠️ Development
91-
92-
To develop the operator locally:
114+
## 🛠️ Local Development
93115

94116
1. **Clone the repository:**
95117
```bash
96118
git clone https://github.com/bubustack/bobrapet.git
97119
cd bobrapet
98120
```
99121

100-
2. **Run the controller:**
101-
This command will run the operator on your local machine, using your local `kubeconfig` to communicate with the cluster.
122+
2. **Run the controller locally:**
123+
This command runs the operator on your machine, using your local `kubeconfig` to communicate with the cluster. This is great for rapid development and debugging.
102124
```bash
103125
make run
104126
```

0 commit comments

Comments
 (0)