{"slug": "autonomous-repository-support-agent", "title": "Autonomous-Repository-Support-Agent", "summary": "A developer built an Autonomous GitHub Issue Debugger Agent that uses Temporal workflows to orchestrate a Mastra AI agent, local RAG via MongoDB Atlas and Ollama embeddings, SerpApi web search, and Qwen through OpenRouter to investigate bug reports and produce TypeScript code fixes. The agent ingests repository files into MongoDB with nomic-embed-text embeddings and retries failed activities up to five times, with Sentry tracking execution spans. The developer said keeping the embedding pipeline local and the orchestration open-weight preserves codebase privacy and avoids licensing costs.", "body_md": "*This is a submission for the [Hacktoberfest Weekend Challenge: Build for a Friend](https://dev.to/challenges/hacktoberfest-weekend-2026-10-01)*\n\nI 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. \n\nInstead 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.\n\nA 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.\n\n`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\n`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…\nWorkflow Orchestration: Used Temporal to guarantee durable, reliable agent state transitions and task queues (worker.ts and trigger.ts).\n\nAgentic Framework: Built on Mastra to manage tools, agent instructions, and execution steps.\n\nLocal RAG: Embedded repository files into MongoDB Atlas using RecursiveCharacterTextSplitter and local Ollama embeddings (nomic-embed-text).\n\nExternal Tooling: Integrated SerpApi for real-time web debugging when issues involve outdated third-party library specs.\n\nObservability: Tracked performance and execution spans using Sentry.\n\nBuilding 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.\n\nBest Use of Gemma / Open-Weight Models\n\nBest Use of Temporal\n\nBest Use of MongoDB\n\nBest Use of Sentry", "url": "https://wpnews.pro/news/autonomous-repository-support-agent", "canonical_source": "https://dev.to/harshmangukia123/autonomous-repository-support-agent-2cd", "published_at": "2026-10-05 00:36:09+00:00", "updated_at": "2026-10-05 00:42:09.827068+00:00", "lang": "en", "topics": ["ai-agents", "ai-tools", "large-language-models", "mlops", "developer-tools"], "entities": ["GitHub", "Temporal", "MongoDB Atlas", "Ollama", "SerpApi", "OpenRouter", "Qwen", "Sentry"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/autonomous-repository-support-agent", "markdown": "https://wpnews.pro/news/autonomous-repository-support-agent.md", "text": "https://wpnews.pro/news/autonomous-repository-support-agent.txt", "jsonld": "https://wpnews.pro/news/autonomous-repository-support-agent.jsonld"}}