Agent built only on the LlamaStack API (llama-stack-client), without LlamaIndex. Uses AIAgent with chat, tools, and Action/Observation loop. Python 3.12+ required.
git clone <repository-url>
cd Agentic-Starter-Kitspython -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activateIf you want to install Ollama: Ollama site or Brew.
Install Llama Stack:
pip install llama-stack llama-stack-clientStep 1: Pull Required Models
ollama pull llama3.2:3bStep 2: Start Ollama Service
ollama serveKeep this terminal open – Ollama needs to keep running.
Step 3: Start Llama Stack Server
From the repository root directory:
llama stack run run_llama_server.yamlKeep this terminal open – server runs at
http://localhost:8321.
Step 4: Install Agent Dependencies
cd agents/base/llamastack_agent
pip install -r requirements.txtStep 5: Configure Environment Variables
Copy the template (from repo root: template.env) or create .env in the agent directory:
cp ../../../template.env .envEdit .env:
BASE_URL=http://localhost:8321
MODEL_ID=ollama/llama3.2:3b
API_KEY=not-neededStep 6: Run the Interactive Chat
cd examples
python execute_ai_service_locally.py⚡ Or with uv (from repo root):
- Create venv and activate:
uv venv --python 3.12
source .venv/bin/activate- Copy shared utils into the agent package:
cp utils.py agents/base/llamastack_agent/src/llamastack_agent_base/- Install agent (editable) and its requirements:
uv pip install -e agents/base/llamastack_agent/. -r agents/base/llamastack_agent/requirements.txt- Run the example:
uv run agents/base/llamastack_agent/examples/execute_ai_service_locally.pycd agents/base/llamastack_agent
chmod +x init.sh deploy.sh
./init.shThis loads .env, validates variables, and copies utils.py into the agent package.
./deploy.shThis creates the API key secret, builds and pushes the image, and deploys the agent (Deployment, Service, Route).
Get the route host:
oc get route llamastack-agent -o jsonpath='{.spec.host}'Send a test request:
curl -X POST https://<YOUR_ROUTE_URL>/chat \
-H "Content-Type: application/json" \
-d '{"message": "What is 2+2? Answer briefly."}'