From 0b79f8acb842b8674ac9b3d72a8984adac88ed0f Mon Sep 17 00:00:00 2001 From: Mark Sturdevant Date: Tue, 18 Nov 2025 18:51:23 -0800 Subject: [PATCH] OpenTech version of BeeAI Framework lab * Part of series * Using Ollama and running locally Signed-off-by: Mark Sturdevant --- docs/opentech/beeaiframework/lab-1/README.md | 24 ++++--- .../beeaiframework/overview/README.md | 20 ++---- .../opentech/beeaiframework/prework/README.md | 65 +++++++++++++++++++ docs/opentech/docling/prework/README.md | 2 +- mkdocs.yml | 1 + 5 files changed, 90 insertions(+), 22 deletions(-) create mode 100644 docs/opentech/beeaiframework/prework/README.md diff --git a/docs/opentech/beeaiframework/lab-1/README.md b/docs/opentech/beeaiframework/lab-1/README.md index e25e21d..bab85ad 100644 --- a/docs/opentech/beeaiframework/lab-1/README.md +++ b/docs/opentech/beeaiframework/lab-1/README.md @@ -1,6 +1,6 @@ --- -title: Lab 1 -description: Build an agent with BeeAI Framework +title: BeeAI Framework Lab +description: BeeAI Framework Lab logo: images/BeeAI-Logo-White.png --- @@ -8,23 +8,31 @@ logo: images/BeeAI-Logo-White.png ## Prerequisites -This lab is a [Jupyter notebook](https://jupyter.org/). Please follow the instructions in [prework](../../prework/README.md) before you run the lab. +This lab is a [Jupyter notebook](https://jupyter.org/). Please follow the instructions in [prework](../prework/README.md) for the prerequisites to run the lab. ## Lab -1. Run the following commands to create `beekernel` which has the dependencies from our `pyproject.toml` venv and launch Jupyter Lab. +Launch Jupyter Lab by running the following commands from the `opentech` directory of your `beeai-workshop` cloned repo. + +1. Create `beekernel` which will have the dependencies preinstalled in your virtual environment. + + ```shell + uv run --directory docling ipython kernel install --user --env VIRTUAL_ENV .venv --name=beekernel + ``` + +2. Use `uv` to run Jupyter Lab. The directory and allow_hidden gives us access to `.venv` modules. ```shell - uv run --directory beeai-framework ipython kernel install --user --env VIRTUAL_ENV .venv --name=beekernel - uv run --directory beeai-framework jupyter lab + uv run --directory docling jupyter lab --ContentsManager.allow_hidden=True ``` -1. In Jupyter Lab in your browser, walk through the notebook: +3. In Jupyter Lab in your browser, walk through the notebook: 1. Jupyter Lab will open in your browser 1. Navigate to the `notebooks` folder 1. Open `beeai.ipynb` 1. Use the play button to walk through the notebook 1. Be sure to read the text, the code, and the output + 1. Close your browser tab when done -1. Exit the Jupyter Lab server by typing CTRL-C, CTRL-C (twice) in the terminal window where you started Jupyter Lab. +4. Exit the Jupyter Lab server by typing CTRL-C, CTRL-C (twice) in the terminal window where you started Jupyter Lab. diff --git a/docs/opentech/beeaiframework/overview/README.md b/docs/opentech/beeaiframework/overview/README.md index 6d2ded3..65a4c01 100644 --- a/docs/opentech/beeaiframework/overview/README.md +++ b/docs/opentech/beeaiframework/overview/README.md @@ -1,12 +1,12 @@ --- -title: Overview -description: Workshop Goals and Learning Objectives +title: BeeAI Framework Workshop Overview +description: Overview logo: images/BeeAI-Logo-White.png --- -# Workshop Overview: Introduction to the BeeAI Framework +# Introduction to the BeeAI Framework -In this workshop, you'll master the fundamental components of the **BeeAI Framework** by building a Conference Prep Agent that helps field marketing teams prepare for conference season. Through hands-on exercises, you'll learn how to create intelligent agents with real-world applications. +In this workshop, you'll master the fundamental components of the **BeeAI Framework** by building a Conference Prep Agent that helps field marketing teams prepare for conference season. Through hands-on exercises in `Jupyter Lab`, you'll learn how to create intelligent agents with real-world applications.
@@ -45,15 +45,9 @@ Through interactive coding exercises, you'll gain hands-on experience with: This workshop is designed for immediate hands-on learning through interactive exercises: -1. **Quick Setup** - - Google Account – Required for accessing Google Colab - - Workshop Notebook – Open the notebook Open In Colab - - Personal Copy – If you'd like to save your changes, please copy this notebook and create your own version - -2. **Interactive Exercises** - - Build your Conference Prep Agent step-by-step - - Complete fill-in-the-blank coding challenges - - Test your agent with real conference scenarios +- Build your Conference Prep Agent step-by-step +- Complete fill-in-the-blank coding challenges +- Test your agent with real conference scenarios
diff --git a/docs/opentech/beeaiframework/prework/README.md b/docs/opentech/beeaiframework/prework/README.md new file mode 100644 index 0000000..19781de --- /dev/null +++ b/docs/opentech/beeaiframework/prework/README.md @@ -0,0 +1,65 @@ +--- +title: BeeAI Framework Workshop Prework +description: Preparation for the lab +logo: images/BeeAI-Logo-White.png +--- + +These are the required applications and general installation notes for this lab. + +## Required Software and Models + +- [Ollama](#install-ollama) - Allows you to locally host LLM models on your computer. +- [Models](#pull-models-with-ollama) - Pull models to run with Ollama. +- [uv](#install-uv) - Provides Python, packages, and virtual environments. + +## Install Ollama + +Most users can simply download from the Ollama [website](https://ollama.com/download). + +## Pull models with Ollama + +Please pull the models to be used in the workshop before arriving at the workshop! + +```shell +ollama pull granite4:micro-h +``` + +## Chat with the model + +For a quick test, you can use the ollama CLI to ask the model a question. + +```shell +ollama run granite4:micro-h "what model am I chatting with and and who created you?" +``` + +## Install `uv` + +We will be using [`uv`](https://github.com/astral-sh/uv) as your Python package and environment manager. If you’re unfamiliar with `uv`, refer to the [uv installation guide](https://github.com/astral-sh/uv#installation). `uv` is a fast and modern alternative to pip and virtualenv, fully compatible with both. + +### macOS/Linux + +```shell +curl -LsSf https://astral.sh/uv/install.sh | sh +``` + +### Windows + +```shell +powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex" +``` + +## Install project Python dependencies + +Preinstall all the packages used in the demo, installed in the correct virtual environment using `uv`. + +1. Navigate to the specific demo folder for this workshop: + + ```bash + cd beeai-workshop/opentech + ``` + +2. Install all required python dependencies for the project: + + ```bash + uv sync --directory beeaiframework + ``` diff --git a/docs/opentech/docling/prework/README.md b/docs/opentech/docling/prework/README.md index 6f79979..e9bb67d 100644 --- a/docs/opentech/docling/prework/README.md +++ b/docs/opentech/docling/prework/README.md @@ -50,7 +50,7 @@ Preinstall all the packages used in the demo, installed in the correct virtual e cd beeai-workshop/opentech ``` -2. Install all required python dependencies for the 4 sub-projects: +2. Install all required python dependencies for the project: ```bash uv sync --directory docling diff --git a/mkdocs.yml b/mkdocs.yml index a75689e..a2d4d1a 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -46,6 +46,7 @@ nav: - Agentic AI Labs: - BeeAI Framework: - Overview: opentech/beeaiframework/overview/README.md + - Prework: opentech/beeaiframework/prework/README.md - Lab: opentech/beeaiframework/lab-1/README.md - Agent Stack: - Overview: opentech/agentstack/overview/README.md