karthik.dev
Back to projects
AI

Kestrel

Autonomous AI software engineering platform — multi-agent orchestration from issue to pull request

TypeScriptNext.jsFastifyRedisBullMQDistributed SystemsMulti-Agent Orchestration

Overview

Kestrel is an open-source autonomous software engineering platform and multi-agent orchestrator. AI agents understand repositories, analyze GitHub issues, modify code, run tests, and create pull requests — automating the full path from issue to merged PR through a distributed orchestration engine.

Problem

Software engineering involves many repetitive tasks — triaging issues, writing boilerplate fixes, running tests, opening PRs — that follow predictable patterns. Manual execution is slow; existing AI coding tools only handle single-file edits without understanding repository context.

Solution

A distributed orchestration engine where specialized agents collaborate across the software lifecycle: a Repository Agent understands codebase structure, an Issue Analyst decomposes the problem, a Code Agent implements the fix, a Test Agent validates correctness, and a PR Agent opens the pull request with a coherent description.

Architecture

  1. 1Repository Agent — ingests and indexes codebase structure for context-aware editing
  2. 2Issue Analyst Agent — decomposes GitHub issues into actionable implementation steps
  3. 3Code Agent — implements fixes and new features with repository-aware edits
  4. 4Test Agent — runs existing tests and writes new ones for changed code paths
  5. 5PR Agent — opens pull requests with coherent descriptions and linked issue references
  6. 6BullMQ job queue — distributes agent tasks across the orchestration engine
  7. 7Redis — shared state and task queue persistence across distributed agents
  8. 8Fastify API — exposes orchestration endpoints for repository and issue ingestion
  9. 9Next.js dashboard — real-time view of agent tasks, PRs, and orchestration state

Technical Challenges

  • Repository-aware code editing requires understanding file dependencies and import graphs before making any change.
  • Coordinating multiple agents that modify overlapping files without introducing merge conflicts.
  • Designing a reliable BullMQ job queue that handles agent failures with retry and dead-letter semantics.

Results

  • Open-sourced autonomous software engineering platform demonstrating full issue-to-PR orchestration.
  • Distributed architecture scales agent workloads across multiple workers via BullMQ.
  • MIT licensed — actively used as a reference implementation for multi-agent coding systems.