ZediaLabs / Guides / Agent Loops with Local AI
Guides ยท Local AI

Make a local model finish the job.

A free guide to agent loops โ€” the Plan โ†’ Act โ†’ Observe โ†’ Reflect cycle that turns a small model on your own machine into something that sorts files, extracts data, and checks its own work. Written for LM-Studio, Ollama, and oMLX, with Pi and OpenCode.

No subscription. The paid add-on includes 50+ templates, an agent loop generator, and advanced patterns.

Start free8 chapters + 4 appendices. No email wall, no subscription.
Runs on your hardwareWorks with 3Bโ€“13B models on consumer RAM. Private by default.
$29 complete add-on50+ templates, a loop generator, and advanced patterns.
What you get

Free guide + paid add-on.

The free guide covers the fundamentals: what agent loops are, setting up your local stack, the core loop pattern, prompts written for small-model constraints, tool use, and what to do when the model fails. The paid add-on turns the pattern into reusable parts.

FREE

The Core Guide

Learn the Plan โ†’ Act โ†’ Observe โ†’ Reflect loop, write prompts small models can follow, wire up tools, and recover from failures. 8 chapters + 4 appendices.

ADD-ON

50+ Templates

Copy-paste prompt templates for summarization, extraction, code review, translation, and more โ€” every one written for local-model constraints.

ADD-ON

Loop Generator

Pick your tools, constraints, and output format; generate a ready-to-run loop template. No framework to install.

What you'll learn

From first install to recovered failures.

Each chapter builds on the last โ€” the same path the terminal above walks: define done, act once, check the result, decide the next step.

  • 01What agent loops are and why they matter
  • 02Your local stack: LM-Studio, Ollama, or oMLX
  • 03The core loop pattern, step by step
  • 04Prompts that small models can actually follow
  • 05Tool use: commands, files, and APIs
  • 06When the model fails โ€” detect, diagnose, recover
  • 07Worked examples: coding, research, automation
  • 08Next steps: advanced patterns and tuning

The appendices are the reference shelf: model recommendations by RAM budget, Pi skill files, OpenCode configuration, and a troubleshooting checklist you work through in order.

The paid add-on goes further: self-correction loops, multi-agent setups, memory management, and performance tuning for context, quantization, and temperature.

Who it is for

Developers, makers, and power users.

Do I need to know AI?

No. The guide starts from scratch: what a loop is, how to install a model runner, and how to run your first loop the same day.

Do I need a powerful computer?

No. The examples run on 3Bโ€“7B models that fit in 8GB of RAM. You can start small and upgrade the model later โ€” the loop stays the same.

What tools do I need?

One local model runner (LM-Studio, Ollama, or oMLX) and one agent harness (Pi or OpenCode). The guide covers installing and connecting both.

What's free and what costs $29?

The full guide โ€” 8 chapters and 4 appendices โ€” is free. The $29 add-on adds 50+ templates, the loop generator, and advanced patterns.

Start with the free guide

Run your first loop this week.

Read the free guide, install one model runner, and walk the first loop yourself. If the pattern earns its keep, the add-on is there when you want templates and the generator.

Read the free guide โ†’

Related reading: why we build operating layers for agents, tool gates for agents, and how context drives agent cost.