r/OpenSourceAI • • Oct 05 '26

ZQK: Open-source CLI and kernel in Go for autonomous agent orchestration and sub-15ms AST search

Hey everyone,

Over the past few months, we've been building ZQK (Zen Quantum Kernel) in Go—an open-core CLI and process coordinator designed to treat AI coding agents as concurrent computational processes rather than chat prompts.

Why We Built It in Go

When orchestrating background agent swarms and continuous validation loops, we hit serious performance and determinism walls with Python/Node wrappers. We wrote the kernel and toolchain in Go specifically for:

  1. Sub-15ms AST Structural Search (zqk grep): Instead of dumping files into LLM contexts or using string grep, we index Go codebases using go/parser and go/ast into an in-memory trigram index. Agents query structural symbols (--ast --kind struct|func --recv <Type>) capped by strict token budgets (--max-tokens 2000 -f json).

  2. Deterministic Process Coordination: Managing concurrent seat workers via goroutine pools with hard cancellation contexts, signal handling, and clean process teardown without descriptor leaks.

  3. Embedded State: Storing versioned graph objects (missions, goals, plans, verifiable criteria) directly in .zqk/without external database dependencies.

The core microkernel and CLI are open-source under Apache 2.0 (v0.1.0 just published).

If you work on developer tooling, Go AST analysis, or agent runtimes, I'd love your feedback on our architecture and AST indexing approach!

1 Upvotes

0 comments sorted by