# Autonomous-Repository-Support-Agent

> Source: <https://dev.to/harshmangukia123/autonomous-repository-support-agent-2cd>
> Published: 2026-10-05 00:36:09+00:00

*This is a submission for the [Hacktoberfest Weekend Challenge: Build for a Friend](https://dev.to/challenges/hacktoberfest-weekend-2026-10-01)*

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.

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.

`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.`techSupportAgent` in `src/mastra/index.ts` can use
`src/workflows/workflow.ts` defines a Temporal workflow that calls the agent activity. Temporal retries activity failures up to five times.`src/worker.ts` starts the Temporal worker on the `agent-tasks` task queue and reports uncaught worker failures to Sentry.`localhost:7233` unless configured…
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.

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.

Best Use of Gemma / Open-Weight Models

Best Use of Temporal

Best Use of MongoDB

Best Use of Sentry
