How vivek-c29/zenith works
Zenith is an autonomous code-bug fixing agent, also usable from CI: it takes a bug report or failed-test context, investigates repository code, proposes and reviews patches, runs tests in an isolated sandbox, and can prepare a pull request. Its separate audit mode looks for silent logic bugs in a diff after tests pass. The graph and node excerpts establish the agent stages; parser/indexer excerpts establish code indexing and retrieval capabilities. Wiring for some internal integrations is not shown, so those connections are omitted where uncertain.
Main entry points: graph.py Agent graph · indexer.py Code indexer · cli.py CLI and CI · nodes.py Test runner node
Components 25
Entry and control
- CLI and CI
zenith/cli.py - Agent graph
zenith/agent/graph.py
Fix workflow
- Manager
zenith/agent/nodes.py - Researcher
zenith/agent/nodes.py - Coder
zenith/agent/nodes.py - Reviewer
zenith/agent/nodes.py - Silent-bug auditor
zenith/agent/nodes.py - Test runner node
zenith/agent/nodes.py - Error analyzer
zenith/agent/nodes.py - Patch and PR node
zenith/agent/nodes.py
Code intelligence
- Code parser
zenith/parser/tree_sitter_parser.py - Language detection
zenith/parser/language_map.py - Code indexer
zenith/vector_store/indexer.py - Embedding and reranking
zenith/vector_store/embedding_engine.py - Vector storage
zenith/vector_store/vector_store.py - Neo4j backend
zenith/vector_store/neo4j_store.py
Repository integrations
- Git operations
zenith/git_manager/git_manager.py - Docker sandbox
zenith/sandbox/docker_manager.py - GitHub PR client
zenith/github/github_client.py
Other components
- CLI user
- LLM service
- Docker daemon
- GitHub
- Target repository
- Test command
Connections 36
- CLI user → CLI and CI: invokes
- CLI and CI → Agent graph: starts agent
- CLI and CI → Git operations: reads diff
- CLI and CI → Silent-bug auditor: starts audit
- CLI and CI → Test command: runs
- Agent graph → Manager: dispatches
- Agent graph → Researcher: dispatches
- Agent graph → Coder: dispatches
- Agent graph → Reviewer: dispatches
- Agent graph → Test runner node: dispatches
- Agent graph → Error analyzer: dispatches
- Agent graph → Patch and PR node: dispatches
- Reviewer → Coder: retries
- Test runner node → Error analyzer: routes failures
- Error analyzer → Coder: feeds errors
- Test runner node → Patch and PR node: routes success
- Silent-bug auditor → LLM service: requests analysis
- Coder → LLM service: requests patches
- Reviewer → LLM service: requests review
- Error analyzer → LLM service: requests analysis
- Manager → Git operations: inspects repository
- Researcher → Code indexer: retrieves context
- Code indexer → Code parser: parses files
- Code parser → Language detection: detects language
- Code indexer → Embedding and reranking: embeds chunks
- Code indexer → Vector storage: indexes and searches
- Code indexer → Git operations: reads commit history
- Code indexer → Neo4j backend: writes graph index
- Docker sandbox → Docker daemon: starts and executes
- Test runner node → Docker sandbox: runs tests
- Test runner node → Test command: executes
- Patch and PR node → Git operations: applies and commits
- Patch and PR node → GitHub PR client: creates pull request
- GitHub PR client → GitHub: calls API
- Git operations → Target repository: reads and writes
- Docker sandbox → Target repository: mounts workspace