A local-first, Ollama-powered agent + automation library. Runs on your laptop (RTX 4050 6GB / 16GB RAM), no cloud, no API keys. Built for shipping Lantern and automating the boring parts.
foundry/
setup/ 00-install -> 01-models -> 02-verify (run in order)
core/ the agent engine (Ollama client, tool registry, ReAct loop)
foundry/ python package: python -m foundry "<task>"
config.yaml central config (model, tools, paths)
models/ Modelfile for the IQ4 Gemma (tuned for 6GB)
templates/ ready automations
dev-autopilot/ commit msgs, PR review, daily digest, crash triage
pc-automation/ organize downloads, folder watcher
makers/
template-maker/ scaffold new templates
software-maker/ spec -> scaffold -> test -> deploy -> maintain
data/ vector memory + generated builds (gitignored)
# 1. install (venv + deps)
powershell -ExecutionPolicy Bypass -File C:\AI\foundry\setup\00-install.ps1
# 2. models (embeddings now; Gemma GGUF when you download it)
powershell -ExecutionPolicy Bypass -File C:\AI\foundry\setup\01-models.ps1
# 3. verify the whole stack
powershell -ExecutionPolicy Bypass -File C:\AI\foundry\setup\02-verify.ps1
# run the agent on any task
cd C:\AI\foundry\core
..\.venv\Scripts\python -m foundry "summarize the README files under templates"- Default:
qwen2.5:7b— already installed, fits fully in 6GB VRAM, supports tools. Fast. - Upgrade:
gemma-foundry(REAP Gemma-4-19B @ IQ4_NL) — smarter, runs hybrid GPU+CPU (~10.7GB). Download the GGUF, run01-models.ps1, then setollama.model: gemma-foundryincore/config.yaml. - Avoid for agents: the Qwen3.6-35B @ IQ2_XXS — great chat ceiling, but 2-bit breaks tool-calls/JSON. Keep it as a separate chat model, not the agent brain.
read_file, write_file, list_dir (sandboxed to the foundry dir) ·
run_shell (allow-listed exes) · web_fetch (+ web_crawl if crawl4ai installed) ·
memory_add / memory_search (local numpy vector store).
Drop a register(reg, cfg) in core/foundry/tools/, wire it in tools/__init__.py.
Each tool is ~10 lines. Crawl4ai/turbovec/qdrant slot in the same way.
- crawl4ai:
.\.venv\Scripts\pip install -r core\requirements-extra.txtthenpython -m playwright install chromium.web_crawlappears automatically. - Bigger vector store (turbovec/qdrant/chroma): keep the
memory_add/memory_searchsignatures, swap the adapter incore/foundry/tools/vectorstore.py. - Docker services: add
dockertoconfig.tools.shell.allowand let the agent spin up containers (you have Docker installed).
Wrap any template in Windows Task Scheduler, or use the /schedule skill in
Claude Code for cloud cron. Example: daily-digest every evening.
schtasks /create /tn "FoundryDailyDigest" /tr "powershell -File C:\AI\foundry\templates\dev-autopilot\daily-digest.ps1" /sc daily /st 19:00