Skip to content
divmoraPublic

About

Autonomous coding agent: give it a task and a repo, get back a tested branch and pull request. Plan approval, worktrees, personas, GitHub/GitLab. Any LLM: OpenAI, Anthropic, Gemini, Bedrock, Ollama. Apache 2.0.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Zenith

CI License: Apache 2.0 Website

Zenith is an autonomous coding agent. Give it a task and a repository: it plans the change, waits for your approval if you ask it to, edits the code, runs the project's tests and linters, and hands back a branch ready for a pull request.

  • One task per process, built to run inside a sandbox (Docker or Kubernetes).
  • Any model provider: OpenAI and compatible servers, Anthropic, Google Gemini, AWS Bedrock.
  • Plan first: an optional read-only planning phase you approve before any file changes.
  • Safe by design: the model's tools never see your API keys or git credentials; pushing is a separate step.

Status: early development. run, resume and publish work; the CLI contract may still change before 1.0. The roadmap and design are in docs/DESIGN.md.

Usage

export ZENITH_MODEL=bedrock:qwen.qwen3-coder-next   # or anthropic:<model>, openai:<model>, gemini:<model>, ...

# Do a task: zenith creates a branch, works, tests, and commits there.
zenith run --workspace ./repo --task "Fix the off-by-one in pagination and add a test"

# Same, but in a new git worktree: your checkout (branch, uncommitted changes) is never touched.
zenith run --worktree --workspace ./repo --task "..."

# Or let a built-in specialist pick and do one focused improvement (no task text needed):
zenith personas                                  # sentinel, bolt, palette, sweeper, probe, scribe
zenith run --persona sentinel --worktree --workspace ./repo

# Or review a plan first: planning is read-only and exits 10 with a checkpoint.
zenith run --workspace ./repo --approve-plan --checkpoint /tmp/plan.json --task "..."
zenith resume --checkpoint /tmp/plan.json --feedback "Keep the public API unchanged"   # revised plan, exit 10 again
zenith resume --checkpoint /tmp/plan.json --approve --note "Name the helper clampPage"  # implement + commit, exit 0

After the agent says it is done, zenith runs the project's own checks (make test, go test, npm test, ...; override with --verify CMD) and sends failures back to the agent to fix (--max-fix-attempts, default 3). Each fix round gets --max-fix-steps model calls (default 15) before zenith checks again and counts the attempt.

  • Detected checks that already failed before the change don't block the run, but it is then not verified. Checks given with --verify are required: they always have to pass.
  • A check that can't run at all (command not found) verified nothing. A required one fails the run.
  • The result's verified field is true only when every check ran and passed on the committed work. Read it rather than the agent's summary.
  • A run that stops early (budget, timeout, model failure) still commits its work as zenith (incomplete), with the checks run on it, a generated summary and UNVERIFIED in the commit message.
  • Files in a language with no toolchain in the sandbox are listed in uncovered_files; the agent is told which toolchains exist.

Long runs are compacted to fit --context-tokens; when the provider doesn't cache prompts, old tool output is trimmed sooner. Without --worktree, your checkout is switched back to its branch at the end; the work stays on the zenith/ branch, and a branch that got no commit is deleted.

Progress goes to stderr; the result JSON to stdout (or --result FILE); --events FILE writes one JSON event per line (--events-level summary leaves out tool and check output). Secret values are replaced with [REDACTED] in events and the result (--no-redact to keep them). steps counts the model calls of this invocation; usage.model_calls counts the whole task, including planning. Exit codes: 0 done, 10 awaiting approval, 20 budget exceeded, 30 failed, 1 internal error, 2 usage (with --result, a result with status usage_error is still written).

Open the pull request

run never gets push credentials. Publishing is a separate step without a model, so run it outside the agent's sandbox:

zenith run --worktree --workspace ./repo --result /tmp/result.json --task "..."
GITHUB_TOKEN=... zenith publish --result /tmp/result.json            # GitLab: GITLAB_TOKEN

It pushes the commit zenith verified to the run's branch over HTTPS and opens a pull request (a merge request on GitLab) against the run's base branch, or the default branch if the remote doesn't have it. The description says an agent wrote it and lists the agent's summary, files, the checks zenith ran (before and after), and the commands the agent ran; @mentions and GitLab quick actions in it are neutralised. Running it again reports the pull request that is already open. An unverified run opens as a draft, and a commit with lines that look like credentials (secret_findings) is refused without --allow-secrets. Other flags: --remote URL (default: origin), --base, --title, --draft, --allow-incomplete (a failed run, as a draft), --platform and --api-url for GitHub Enterprise and self-managed GitLab.

Install

go install github.com/divmora/zenith/cmd/zenith@latest
zenith version

Or use the container image, which also has Go, Node.js (npm, pnpm, Yarn 1), Python with pytest, make and gcc, for building and testing the repository:

docker run --rm --user "$(id -u):$(id -g)" -v "$PWD:/workspace" \
  -e ZENITH_MODEL -e ANTHROPIC_API_KEY ghcr.io/divmora/zenith run --task "..."

For other stacks, build FROM ghcr.io/divmora/zenith and add yours. Limit the container's network to the model provider and package registries.

Or build from source:

make build
./bin/zenith version

Zenith Console

Zenith Console (separate repository) runs Zenith for teams: task intake from issues and chat, a queue, sandboxed runs, plan approval in the browser, and history. This repository is the agent and its CLI only.

Contributing

See CONTRIBUTING.md and AGENTS.md. Report security issues privately as described in SECURITY.md.

License

Apache License 2.0. Copyright 2026 DIVMORA Technologies.

About

Autonomous coding agent: give it a task and a repo, get back a tested branch and pull request. Plan approval, worktrees, personas, GitHub/GitLab. Any LLM: OpenAI, Anthropic, Gemini, Bedrock, Ollama. Apache 2.0.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages