DEV Community

Harsh Mangukia
Harsh Mangukia

Posted on

Autonomous-Repository-Support-Agent

Hacktoberfest Weekend Challenge: Build for a Friend Submission 🤝

This is a submission for the Hacktoberfest Weekend Challenge: Build for a Friend

What I Built

I built an Autonomous GitHub Issue Debugger Agent for a close friend of mine who maintains an open-source library and constantly gets overwhelmed sorting through bug reports.

Instead of manually digging through repositories or guessing error traces, my friend can trigger an autonomous agent via Temporal workflows. The agent uses Local RAG (MongoDB Atlas + Ollama) to scan the local codebase context, queries live data via SerpApi when external package updates break things, reasons through multi-step logic using Qwen via OpenRouter, and writes out a precise TypeScript code fix.

Code

GitHub logo harsh-mangukia44 / Autonomous-Repository-Support-Agent

A TypeScript prototype that combines a Mastra AI agent, Temporal workflows, MongoDB Atlas Vector Search, Ollama embeddings, SerpApi web search, and Sentry monitoring. The agent is designed to investigate a technical issue using repository context and web search, then return a suggested fix.

Autonomous Repository Support Agent

A TypeScript prototype that combines a Mastra AI agent, Temporal workflows, MongoDB Atlas Vector Search, Ollama embeddings, SerpApi web search, and Sentry monitoring. The agent is designed to investigate a technical issue using repository context and web search, then return a suggested fix.

How it works

  1. ingest.ts reads TypeScript files from src/, splits them into overlapping chunks, creates embeddings with the local Ollama nomic-embed-text model, and stores the chunks in MongoDB.
  2. The techSupportAgent in src/mastra/index.ts can use
    • Search Codebase to find relevant chunks in MongoDB Atlas Vector Search.
    • Web Search to retrieve current technical references through SerpApi.
  3. src/workflows/workflow.ts defines a Temporal workflow that calls the agent activity. Temporal retries activity failures up to five times.
  4. src/worker.ts starts the Temporal worker on the agent-tasks task queue and reports uncaught worker failures to Sentry.

Requirements

  • Node.js with npm
  • A running Temporal server, reachable at localhost:7233 unless configured…

How I Built It

  • Workflow Orchestration: Used Temporal to guarantee durable, reliable agent state transitions and task queues (worker.ts and trigger.ts).

  • Agentic Framework: Built on Mastra to manage tools, agent instructions, and execution steps.

  • Local RAG: Embedded repository files into MongoDB Atlas using RecursiveCharacterTextSplitter and local Ollama embeddings (nomic-embed-text).

  • External Tooling: Integrated SerpApi for real-time web debugging when issues involve outdated third-party library specs.

  • Observability: Tracked performance and execution spans using Sentry.

Why Does Open Innovation Matter?

Building this with open-source and open-weight AI was essential. Relying on closed, proprietary cloud APIs exposes developer repositories to strict key-validation blocks, rate limits, and opaque error structures.By keeping the embedding pipeline local and the agent orchestration open my friend maintains total privacy over their codebase context, can swap models instantly without rewriting code, and runs the entire diagnostic engine with zero licensing costs.

Prize Categories

Best Use of Gemma / Open-Weight Models
Best Use of Temporal
Best Use of MongoDB
Best Use of Sentry

Top comments (0)