Skip to content

zkit

zkit

Go packages for building agents: a streaming loop, tool dispatch, guardrails, compaction, and provider adapters.

Install
go get github.com/zarldev/zarlmono/zkit

Import what you need. Compose the rest.

zkit is a set of small Go packages for building agents. Take the pieces you need and ignore the rest. Each package has a narrow interface and no framework ceremony.

The runner is the streaming, tool-calling agent loop. Around it are tools, guardrails, compaction, providers, verified completion, and the foundation packages underneath.

package main
import (
"context"
"time"
"github.com/zarldev/zarlmono/zkit/agent/runner"
"github.com/zarldev/zarlmono/zkit/ai/llm/anthropic"
)
func main() {
provider, _ := anthropic.NewProvider(apiKey)
r := runner.New(runner.ClientFromProvider(provider),
runner.WithPromptText("You are a helpful coding assistant."),
runner.WithMaxIterations(20),
runner.WithToolTimeout(60*time.Second),
)
_, _ = r.Run(context.Background(), runner.TaskSpec{
Prompt: "Refactor the auth package to use context everywhere.",
})
}

These products share the same repo and the same packages.