Build with AI · GDG Lokoja 2026
# Building Secure AI Agents in Go
**Build with AI · GDG Lokoja 2026**
Startechone, Lokoja — April 11 · Prince Audu Abubakar University, Anyigba — April 18
A 20-minute hands-on workshop. Build a complete AI agent in Go, then break it and fix it — live.
Stack: eino + Gemma via Ollama — no API key, no internet required, runs on a ₦30k laptop.
---
## Prerequisites
**1. Install Go** (1.21+)
go.dev
```bash
go version
```
**2. Install Ollama**
ollama.ai
**3. Pull the Gemma model**
```bash
ollama pull gemma4:e2b
```
**4. Clone and install dependencies**
```bash
git clone
github.com
cd bwai-agent-go
go mod download
```
**5. Verify your setup**
```bash
ollama run gemma4:e2b "Hello"
go run ./demos/00_intro_golang/
```
---
## Workshop — 4 Demos
| Demo | Folder | Title | What you see |
|------|--------|-------|-------------|
| 00 | `00_intro_golang` | Intro to Go | Variables, functions, if statements — your first Go programme |
| 01 | `01_gemini_intro` | Gemini API | Call Google Gemini from Go with a single API key |
| 02 | `02_farming_agent` | AI Farming Agent | Multi-agent · Tool calling · Memory · PII vulnerability |
| 03 | `03_secure_patterns` | Secure AI Agents | OWASP LLM Top 10 — fix the vulnerabilities from Demo 02 |
---
## Demo 00 — Intro to Go
The simplest possible Go programme. No frameworks, no API keys — just Go.
```bash
go run ./demos/00_intro_golang/
```
Covers: `fmt.Println`, variables (`string`, `int`, `float64`), functions, `if/else`.
---
## Demo 01 — Gemini API
Call Google's Gemini model from Go. Requires a free API key from aistudio.google.com.
Add your key to `.env`:
```
GEMINI_API_KEY=your_key_here
```
```bash
go run ./demos/01_gemini_intro/
```
---
## Demo 02 — AI Farming Agent
A complete Nigerian farming assistant built on two collaborating agents:
**ScoutAgent** — gathers all data using tools and reads/writes memory.
**PlannerAgent** — receives Scout's data and produces an …