惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
WordPress大学
WordPress大学
人人都是产品经理
人人都是产品经理
Engineering at Meta
Engineering at Meta
小众软件
小众软件
I
InfoQ
有赞技术团队
有赞技术团队
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Martin Fowler
Martin Fowler
月光博客
月光博客
雷峰网
雷峰网
aimingoo的专栏
aimingoo的专栏
云风的 BLOG
云风的 BLOG
Last Week in AI
Last Week in AI
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
S
SegmentFault 最新的问题
The GitHub Blog
The GitHub Blog
Y
Y Combinator Blog
V
Visual Studio Blog
博客园 - 叶小钗
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
GbyAI
GbyAI
P
Proofpoint News Feed
Apple Machine Learning Research
Apple Machine Learning Research

Show HN

Show HN: AI agents for UK GDAD PCF roles and their skills The Two Pillars: Mixer Mode and Meta-Software in the Reorganization of Software Work After AI GitHub - JaiCode08/teleport-env What 1,000+ Harness Experiments Taught Me About Self-Improving Agents Show HN: Liiists, a Markdown-first, iOS and CLI list app SwiperTab – Get this Extension for 🦊 Firefox (en-US) GitHub - kouhxp/fftext: Summarize, explain, fact-check, or translate any text, URL, or file. No GPU. No cloud. One command GitHub - sweetpad-dev/sweetpad: Develop Swift/iOS projects using VSCode GitHub - dogmaticdev/IRON: IRON a.k.a. Intermediate Representation Object Notation is a Interpreter/Database that is used to create Programming Languages. GitHub - sjhalani7/vaen: Package your AI coding harness into a portable .agent file, and share it across repos, teams, & the community without ever having to copy-paste instructions, skills, MCP config, or secrets. Show HN: Gandalf the Grader Show HN: Citadeld – replay any CI failure locally from a single file GitHub - tdortman/cuSBF: High-Performance GPU Super Bloom Filter coral-ai/claude-code-token-xray at main · Coral-Bricks-AI/coral-ai GitHub - ulyssestenn/funes: Funes is a Git-based framework for LLM-managed knowledge work: an AI Librarian ingests raw sources, builds an interlinked Markdown knowledge base, and uses it to produce cited reports, analyses, and other outputs. GitHub - ThatXliner/gah: Git Add Hunk, built for agents to use GitHub - harmont-dev/harmont-cli: Command-line client for the Harmont CI platform GitHub - brooksmcmillin/mcp-authflow: OAuth 2.0 Authorization Server framework for MCP servers GitHub - javaid-codes/audit-supply-chain-agents GitHub - amorey/gochan: A small library of common channel architectures for Go, inspired by Rust GitHub - arifozgun/OpenGem: Free, Open-Source AI API Gateway with Gemini, OpenAI & Anthropic Compatibility in 1 file GitHub - Pranesh950/BioPetals: 🌸 Run BIOxAI models at home, BitTorrent-style. Fine-tuning and inference up to 10x faster than offloading GitHub - cnguyen14/bounty-doctor: Diagnose a GitHub bounty issue before you waste hours: detects honeypot scam repos, AI-bot attempt swarms, and stale contests. Show HN: CoreMCP – MCP Server for On-Prem DBs Show HN: KittyHTML – Render HTML/CSS as an inline image in your terminal GitHub - bingud/filemat: Web-based file manager Show HN: TruthLens – Free multi-signal deepfake image detector GitHub - apexlocal-jz/claude-usage-tray: Windows system-tray app showing your Claude Code rate-limit usage at a glance. Zero deps, ~300 lines of PowerShell. Cross-IDE (works regardless of VS Code, Cursor, plain terminal). Release v0.1.2.1 · kouhxp/yapsnap GitHub - noopolis/moltnet: Self-hostable chat network for AI agents. Pre-built bridges for Claude Code, Codex, and the Claws. Rooms, DMs, history. No Slack bots, no Matrix, no glue code.
Building Your Own Coding Agent on Top of zot
Patric Eckhart · 2026-06-17 · via Show HN

How zot ships its internals as importable Go packages, so you can write a working coding agent harness in about a hundred lines.

Most "AI coding agent" projects spend 90% of their code on plumbing: streaming protocol parsing, provider auth, tool schemas, a file sandbox, a system prompt. The interesting 10% (what your agent actually does) gets buried. zot flips that ratio. It hands you the plumbing as importable Go packages so you can write a working harness in about a hundred lines.

This article walks through coil, a tiny harness built on zot, and shows how the pieces fit together.

What zot gives you

zot ships its internals as ordinary Go packages under github.com/patriceckhart/zot/packages/...:

  • provider: clients for Anthropic, OpenAI (Chat Completions and Responses), Gemini, and more, all behind one provider.Client interface.
  • core: the agent loop, tool registry, and event stream.
  • agent: helpers like a sane default system prompt builder.
  • agent/tools: ready-made read, write, edit, and bash tools plus a path sandbox.

You import what you need and ignore the rest. There is no daemon, no config format you have to adopt, no TUI you are forced to render.

The whole harness

Here is the core of coil. The shape is the same for any harness you build.

prov := env("COIL_PROVIDER", "anthropic")
model := env("COIL_MODEL", defaultModel(prov))
client := newClient(prov, apiKey(prov))
 
sb := tools.NewSandbox(cwd)
sb.Lock() // confine file tools to the current directory
 
reg := core.NewRegistry(
    &tools.ReadTool{CWD: cwd, Sandbox: sb},
    &tools.WriteTool{CWD: cwd, Sandbox: sb},
    &tools.EditTool{CWD: cwd, Sandbox: sb},
    &tools.BashTool{CWD: cwd, Sandbox: sb},
)
 
system := zotagent.BuildSystemPrompt(zotagent.SystemPromptOpts{
    CWD: cwd,
    Custom: "You are coil, a small coding agent harness. Be concise.",
})
 
ag := core.NewAgent(client, model, system, reg)
ag.MaxSteps = 20

Four building blocks: a provider client, a tool registry, a system prompt, and an agent that ties them together.

Picking a provider

Every provider is constructed the same way and returns the same interface, so swapping models is a one-line change:

func newClient(name, key string) provider.Client {
    switch name {
    case "anthropic":
        return provider.NewAnthropic(key, "")
    case "openai":
        return provider.NewOpenAI(key, "")
    case "gemini", "google":
        return provider.NewGemini(key, "")
    default:
        panic("unknown provider: " + name)
    }
}

Because the agent loop only talks to provider.Client, your harness does not care whether the bytes on the wire are Anthropic's Messages format or OpenAI's Chat Completions format. zot normalizes streaming, tool calls, and usage for you.

Tools and the sandbox

Tools are just values that implement zot's tool interface. The built-in ones cover the common cases, and the sandbox keeps file access honest:

sb := tools.NewSandbox(cwd)
sb.Lock() // reads and writes outside cwd are rejected

Adding your own tool is the same pattern as the built-ins: implement the interface, register it. The model sees its JSON schema and can call it like any other.

Running the loop

zot's agent emits a stream of typed events. You decide how to render them. A CLI just prints; a TUI would draw. coil prints:

ag.Prompt(ctx, prompt, nil, func(ev core.AgentEvent) {
    switch e := ev.(type) {
    case core.EvTextDelta:
        fmt.Print(e.Delta)
    case core.EvToolCall:
        fmt.Printf("\n[tool] %s %s\n", e.Name, string(e.Args))
    case core.EvError:
        fmt.Fprintf(os.Stderr, "\nerror: %v\n", e.Err)
    }
})

That callback is the entire UI layer. The agent handles the request, parses tool calls, runs the registered tools, feeds results back, and loops until the model is done or MaxSteps is reached.

Why build your own instead of using the TUI

zot has a full interactive TUI, so why write a harness at all? Because a custom harness lets you:

  • Hard-code a workflow (one-shot prompts, batch jobs, CI checks) instead of an interactive session.
  • Lock down the tool set and sandbox to exactly what a task needs.
  • Embed agent behavior inside a larger Go program.
  • Pin a system prompt and persona without user-visible configuration.

You get zot's battle-tested provider and tool layer while keeping full control of the surface your users (or your CI pipeline) actually touch.

Want your own vibe? Build your own TUI on top of it and make it yours.

Getting started

go mod init yourharness
go get github.com/patriceckhart/zot

Then copy the four-block skeleton above, register the tools you want, write your system prompt, and run. You will have a working agent before you finish your coffee, and every line you add from there is about your product, not about reimplementing streaming parsers.

That is the point of building on zot: spend your effort on the 10% that makes your agent yours.

References