Skip to content

Homelab Architect - LangChain Version

This is a LangChain/LangGraph implementation of the Homelab Architect workflow. It can be used to test the inference service on a practical use-case.

Overview

The workflow consists of three agents working sequentially:

  1. Solution Architect - Analyzes user requirements and produces technical specifications
  2. DevOps Engineer - Generates production-ready docker-compose.yaml files
  3. Security Auditor - Reviews configurations for vulnerabilities and best practices

Setup

Copy .env.example to .env and configure your access to the service:

cd examples/python
cp homelab-architect-langchain/.env.example homelab-architect-langchain/.env

The .env file will be loaded automatically by the example script:

OPENAI_BASE_URL=https://chat.exa4mind.eu/<project_id>/v1
OPENAI_API_KEY=<your-lexis-platform-access-token>
OPENAI_MODEL_NAME=Qwen/Qwen3-Coder-30B-A3B-Instruct

Get a LEXIS Platform Access Token

Visit the LEXIS Platform AI app and select your inference project. Go to the Inference service page and copy the Authentication Token. Paste it into the example's OPENAI_API_KEY env variable. The token should be valid for several hours.

OPENAI_MODEL_NAME can be picked from the OpenAI API models endpoint. For simplicity it's pre-configured to use Qwen/Qwen3-Coder-30B-A3B-Instruct.

Run using uv

uv is a fast Python package and project manager. All examples share a single virtual environment under examples/python/.

  1. Create the virtual environment and install all dependencies:

bash cd examples/python uv sync

  1. Run the workflow:

bash uv run python homelab-architect-langchain/main.py

Comparison with CrewAI

Feature CrewAI LangChain/LangGraph
Agent Definition Agent class ChatPromptTemplate + Chain
Task Definition Task class Function + prompt template
Workflow Crew with Process.sequential StateGraph with edges
Context Passing Via context parameter Via WorkflowState dict
Execution crew.kickoff() workflow.invoke()

Environment Variables

  • OPENAI_BASE_URL - Base URL for OpenAI-compatible API
  • OPENAI_API_KEY - API key for authentication
  • OPENAI_MODEL_NAME - Model name to use