Zenith:作者打造本地優先智能體編排平台及 Misa 助手
ZENITH: I Was Too Lazy to Manage My AI Agents, So I Built an AI to Manage Them
作者開發並開源 Zenith,一個本地優先的個人智能與智能體編排平台,並提供助手 Misa 管理專案記憶、協調編碼智能體及核驗工作。Misa 可透過 Ollama 在本地使用 Gemma 3 4B;約 3.6k–4k 個輸入 token 的回合耗時 7.7–11.2 秒,每次測試的 5 則模型回覆中有 2 則被證據式備援取代。
This is a submission for the Hacktoberfest Open-Source AI Challenge Week 3: Slow and Steady
What I Built
I have a terrible habit of starting interesting projects. I also have a less interesting habit of coming back to them and asking myself the same three questions:
What was I doing? Why did we make that decision? And when did "all tests pass" stop being true?
The answers were scattered across Git repositories, notes, task lists, and AI conversations. Every time I returned, I became the person responsible for reminding my tools what my other tools had done.
Which seemed like an unreasonable amount of work for someone trying to be lazy. 🦥
So I built Zenith, an open-source, local-first personal intelligence and agent-orchestration platform. And I built Misa, the assistant that sits on top of it.
Zenith is not another chatbot with a bigger prompt. Its memory belongs to the system, not the language model. It tracks projects, decisions, unfinished tasks, evidence, source freshness, and execution history. It also provides a bounded workflow for planning, implementing, and independently checking engineering work.
Two ideas hold the whole thing together:
- Memory should know the difference between a claim and a fact. "I think the feature is done" is a human report. "These tests passed at this revision" is verification. If the code changes afterward, that verification is no longer automatically current.
- Agents should not grade their own homework. An implementer can claim success. Zenith's verifier checks the actual result in an isolated environment, and an approval gate controls what happens next.
For natural-language reasoning, Misa can use Gemma 3 4B locally through Ollama, on my laptop's GPU. No hosted AI service is needed for that mode. When the model is unavailable or its answer fails validation, Misa can still respond from its records.
The goal isn't to work faster every waking minute. It's to be able to walk away from work—and come back without reconstructing my entire life first.
Demo
The demo uses fictional projects, Harbor and Lighthouse, in a disposable workspace. No personal repositories, private notes, or credentials are included.
Scene 1: Misa remembers what I no longer remember.
I ask:
Me: Harbor'da nerede kalmıştık?
Where did we leave off in Harbor?
Misa finds an optimistic old note, a passing test from an earlier revision, uncommitted changes, two open tasks, and a source directory it can no longer inspect.
It doesn't merge these into one confident "everything is fine." It tells me what I reported, what was actually verified, and what is now uncertain.
Then I ask show sources, and it shows the records behind the answer.
Scene 2: A small local model reasons over the evidence.
With Ollama running on 127.0.0.1:11434, I ask:
Me: Why did we stay on SQLite in Harbor?
In the recorded local Gemma run, Misa connects the question to the stored decision: SQLite was chosen for single-node personal use and simpler migration auditing.
It also mentions that the notes source is unavailable, that documentation remains unfinished, and that an earlier "done" claim is not verified.
The answer took 7.73 seconds with 3,928 input tokens and 316 output tokens in that recorded run.
This isn't a polished answer secretly written by a larger hosted model. It's a real 4B model, with all its limitations.
And those limitations matter.
In another recorded reply, Gemma produced a wildly incorrect day count and stray JSON-like text. Zenith's current lexical validator catches nonexistent citations and certain unsupported specifics, and can fall back to a deterministic answer.
It doesn't reliably detect incorrect arithmetic or every wrong attribution.
I kept those failures in the raw transcript instead of editing them out.
When I ask about a project named Orion, which isn't registered, Zenith refuses to invent its history—and doesn't even need to call the model.
Scene 3: An AI agent says the tests pass. Zenith disagrees.
Zenith includes an engineering workflow:
- A Director prepares a plan.
- An Implementer works in an isolated Git worktree.
- A sandboxed Verifier checks the result.
- A reviewer examines the evidence.
- The owner's approval controls execution.
The demo shows two outcomes.
In one, the verification passes and the run completes.
In another, the Implementer claims it fixed the issue—but the verifier finds a failing test and Zenith blocks the run.
Important: This orchestration demo uses scripted fake Director and Implementer adapters.
The state machine, approval handling, worktree isolation, and sandboxed verification are real code paths; the coding agents in this demonstration are simulated.
I have not demonstrated the complete loop using live Claude Code and Codex agents.
To reproduce the story on Linux after installing and starting Ollama:
git clone https://github.com/miclaldogan/zenith-v1
cd zenith-v1
scripts/install.sh
ollama pull gemma3:4b
zenith demo story --md transcript.md
The complete demo transcript includes the model's raw outputs, validation results, and measured timings.
The synthetic demo doesn't require access to anyone's real files.
Code
Zenith
I was too lazy to manage my AI agents, so I built an AI to manage them.
Zenith is an open-source, local-first personal intelligence and agent-orchestration platform. It remembers your projects with evidence and provenance, tells you where you left off, coordinates coding agents inside hard boundaries, verifies their claims independently, and never acts without your approval. Misa is the assistant you talk to on top of it, in Turkish or English, offline by default, with an optional local open-weight model (Google Gemma via Ollama) for natural reasoning and your own Claude Code login for engineering work.
Everything is a single Python package with zero dependencies (SQLite, stdlib only), tested by 243 unit and integration tests, running on Linux.
you ────────────── "Harbor'da nerede kalmıştık?"
│
┌───────▼────────┐ conversation port (provider-independent)
│ MISA │──► offline composer (deterministic, always available)
│ intents · │──► Gemma via Ollama (local, open-weight, nothing leaves…
Repository: github.com/miclaldogan/zenith-v1
License: MIT
Stack: Python, SQLite, Linux, bubblewrap, Ollama, Gemma 3
Test suite: 243 passing tests in the recorded project run (scripts/test.sh)
The repository was created on October 23, 2026, within this challenge's build window.
Zenith's Python package uses the standard library; Ollama and the Gemma model are separately installed runtime components.
How I Built It
I wanted to avoid two very tempting shortcuts:
Putting my entire history in an ever-growing system prompt, and letting an agent mark its own work as completed.
So I separated memory, reasoning, and execution.
ME
|
"Where did we leave off?"
|
MISA
intent + context + grounding
|
+-----------------+------------------+
| | |
Offline answer Local Gemma Native Claude Code
from records via Ollama (optional, cloud)
| | |
+-----------------+------------------+
|
ZENITH CORE
SQLite + append-only evidence
projects / decisions / tasks / sources
verification freshness / execution history
|
Approval boundary
|
Director -> Implementer -> Verifier
-> Review
An evidence ledger, not a collection of confident sentences
Zenith records where information came from:
-
HUMAN_REPORT— something the owner said happened. -
REPOSITORY_OBSERVATION— something actually observed in the repository. -
TEST_VERIFICATION— a test result tied to a particular revision. -
DOCUMENT— information obtained from an authorized document. -
MODEL_INFERENCE— an AI-generated interpretation, not independently established fact.
Test results are tied to revisions.
Unavailable sources remain unavailable. Old verification doesn't magically apply to new code.
A replaceable reasoning layer
Misa assembles a bounded, question-specific context and passes it through a provider-independent conversation contract.
The local adapter uses gemma3:4b (Q4_K_M) through Ollama, requests schema-constrained JSON, and validates the response before display.
Claude Code is also available as an optional, separately authenticated interface to read-only Zenith memory tools.
Unlike local Gemma, that route can use a remote service and has its own explicit sharing permissions.
The important part is that the memory doesn't disappear when the model changes.
An execution system that doesn't trust enthusiasm
Tasks and approvals survive process restarts.
The orchestration layer uses:
- Persistent execution states and leases.
- Idempotency keys to prevent duplicate execution.
- Scope-hashed, single-use approvals.
- Isolated Git worktrees.
- Bounded retries and explicit failure states.
- A network-disabled bubblewrap verifier.
- Immutable artifacts for plans, prompts, and verification results.
An implementer's "done" is a claim until verification supports it.
This engineering workflow has been exercised end-to-end with simulated agents. Live multi-agent execution remains a separate validation milestone.
Real measurements, not vibes
I tested the models locally on an RTX 4050 laptop GPU with 6 GiB VRAM, using Ollama 0.30.7.
| Model | Placement observed | Deterministic checks | Model replies accepted unchanged |
|---|---|---|---|
| Gemma 3 4B, Q4_K_M | Fully on GPU, ~2.75 GiB | 20/21 in each of 3 runs | 3/5 per run |
| Gemma 4 e4b-it-qat | Partly offloaded | 19/21 in 1 run | 2/5 |
| Gemma 3 12B | Partly CPU-offloaded | 20/21 in 1 run | 3/5 |
For Gemma 3 4B, recorded turns with around 3.6k–4k input tokens took 7.7–11.2 seconds, with generation around 50–53 tokens/second.
The measured 21 checks are lexical and structural checks on user-visible replies, not a 95% semantic accuracy score.
Two of five model replies per run were replaced by evidence-only fallbacks.
Which is precisely why I didn't want a model to be the system's source of truth.
The full setup, evaluation method, raw transcript, and known failures are documented in EVALUATION.md.
This is an early system, not an autonomous agent that has solved hallucinations.
Why Does Open Innovation Matter?
Because the most valuable thing here isn't the model.
It's the memory—and I want to own it.
A local open-weight model can reason over my authorized project context without uploading it to a model provider or charging for every token.
I can switch models, observe failures, disconnect the network, and still use Zenith's deterministic memory.
And because the architecture is open, other people can inspect the approval checks, evidence rules, and verification logic rather than trusting a black-box claim that an agent is "safe."
The comparison isn't that a 4B local model is automatically smarter than a hosted model.
It isn't.
The advantage is control.
I choose what the model sees, where it runs, what counts as evidence, and what happens when it is wrong.
An optional hosted-Claude path exists for users who want it, with explicit sharing controls.
It isn't required for the local Gemma demonstration.
My Agent Session
Claude Code helped implement Zenith during an iterative development process.
I designed the product direction, reviewed its decisions, and kept acceptance criteria and safety boundaries in the repository.
The commit history and docs/plans/ show the progression from an offline evidence ledger to orchestration tests, Misa, and local Gemma inference.
This post was prepared with AI writing assistance and human review.
The screenshots and model measurements are from recorded runs, not fabricated demos.
No optional DevRelay session is claimed here.
The Lazy Payoff
I can't honestly tell you Zenith saved me 43 minutes a day.
I haven't measured that.
What I can show is a smaller, more useful change.
I can leave a project for a while, come back, and ask one question instead of reopening several chat histories and guessing which notes are still true.
And if a coding agent says "all done," the system can demand evidence rather than asking me to take its word for it.
Maybe that's my version of Slow and Steady:
No productivity guilt.
No magical autonomous promises.
And no pretending that yesterday's green test proves today's code works.
I didn't build Zenith because I wanted to work more.
I built it because I was tired of doing the remembering for my tools.
Prize Categories
- Best Use of Gemma ($200) — Gemma 3 4B provides Misa's local, open-weight reasoning through Ollama. The submission includes a working integration, repeatable synthetic demo, recorded GPU measurements, raw responses, and documented failure cases.
來源:DEV Community · dev.to




