This repository provides JupyterLab notebooks built with Python, leveraging LangChain and LangGraph. They demonstrate patterns for connecting to a variety of services—such as large language models, data services, and vector databases deployed on to Tanzu Platform, formerly know as Tanzu Application Services (TAS) or Pivotal Cloud Foundry (PCF), while incorporating service discovery and credential management.
- Data Scientists can prototype AI models and analyze results interactively
- ML Engineers can test model integrations and performance
- Application Developers can experiment with AI features before building production apps
- Platform Teams maintain governance and cost control across all usage
When JupyterLab is bound to multiple services, you get:
- Data Services connectivity with advanced caching and Retrieval Augmented Generation (RAG) with Tanzu GemFire or Tanzu Valkey, event streaming with Tanzu RabbitMQ, or simplied RAG usecases for data exploration and feature engineering
- Pre-approved LLM access for natural language processing and generation experiments
- Vector database capabilities (GemFire, Valkey, Postgres, or MySQL) for embedding storage and similarity search
- Automatic service discovery and credential management through Tanzu Platform
- Built-in observability for tracking resource usage and model performance
- git clone repository https://github.com/yannicklevederpvtl/cf-jupyterlab-uv
- Add Python Packages by editing pyproject.toml:
langgraph-checkpoint-sqlite tavily-python langchain-mcp-adapters matplotlib unstructured pydub modal ollama
or use command in a JupyterLab Terminal
uv pip add
- Deploy JupyterLab for Cloud Foundry into your Tanzu Platform environment using the repository https://github.com/yannicklevederpvtl/cf-jupyterlab-uv
cf push -f manifest.yml
- Open Jupyter Lab console and use git menu to clone the cf-jupyterlab-samples and start coding
- Install uv with the official guide https://docs.astral.sh/uv/getting-started/installation/
- Clone the github repository
- project already has pyproject.toml file
uv sync
- Launch Jupyter notebook with uv
uv run --with jupyter jupyter lab
- Open the notebooks
- Navigate to langChainNotebooks
- start with `langchain_agent.ipynb file
- you may need to comment out following lines
chat_service = env.get_service(name="gen-ai-qwen3-ultra") chat_credentials = chat_service.credentials
- Update model credentials with your credentials
llm = ChatOpenAI( temperature=0.9, model=your_model_name, base_url=your_model_base, api_key=your_api_key, http_client=httpx_client
)
- Run notebook locally instead of only on Tanzu Platform