<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/why-we-built-a-support-bot-that-investigates-tickets-before-drafting-a-reply-qczwmeklq" -->

---
title: Why we built a support bot that investigates tickets...
description: An engineering team describes building an internal support bot that investigates tickets before drafting replies, rather than generating text immediately. The...
canonical: https://daily.dev/posts/why-we-built-a-support-bot-that-investigates-tickets-before-drafting-a-reply-qczwmeklq
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Why we built a support bot that investigates tickets before drafting a reply | daily.dev
og:description: An engineering team describes building an internal support bot that investigates tickets before drafting replies, rather than generating text immediately. The...
og:url: https://daily.dev/posts/why-we-built-a-support-bot-that-investigates-tickets-before-drafting-a-reply-qczwmeklq
og:image: https://api.daily.dev/og/posts/QCZWmEklQ.png
og:image:alt: Why we built a support bot that investigates tickets before drafting a reply
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Why we built a support bot that investigates tickets before drafting a reply

**[Inngest Blog](https://daily.dev/sources/inngest)** · 11 min read · 0 upvotes · 0 comments

## Summary

An engineering team describes building an internal support bot that investigates tickets before drafting replies, rather than generating text immediately. The system pulls from three sources of truth: the live Plain support thread, semantically similar historical tickets found via pgvector embeddings, and a local git-submodule copy of docs searched with grep/glob/read tools. The whole thing runs as event-driven Inngest workflows, split into a live investigation path and a separate pipeline (orchestrator, embedding processor, database writer) that keeps the historical ticket index fresh. Guardrails include producing internal drafts only (no auto-send), bounded/stoppable research agents, and source citations for every draft. The team frames retrieval over recall, historical tickets as an underused knowledge base, and narrow explicit system design as the key lessons, with runtime/trace diagnosis (via ClickHouse) planned as a future extension.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.inngest.com/blog/why-we-built-a-support-bot-that-investigates-tickets>

## Questions this post answers

### How can I build an AI support bot that searches historical tickets for similar past issues?

Generate embeddings for incoming and historical tickets, store them in PostgreSQL with the pgvector extension, and query for nearest neighbors to find semantically similar past tickets even when wording differs. Fetching the full historical conversation (not just a summary) shows how similar issues were actually resolved, which proved to be one of the highest-leverage parts of a support investigation system built on Inngest.

_Teams designing retrieval-based support agents can follow architecture writeups like this one on daily.dev._

### Why keep a documentation corpus as a local git submodule instead of calling a docs API for an AI agent?

Keeping docs as a local git submodule lets search tools like grep_search, glob_search, and read_file run fast, repeated searches without hitting a remote API or separate indexing pipeline. It also constrains the agent to the docs directory so it cannot wander into unrelated code, and makes it easy to map file paths back to public docs URLs for attribution.

_Developers weighing local versus remote retrieval for AI agents can track these tradeoffs on daily.dev._

### Why should an AI support bot only draft internal notes instead of auto-replying to customers?

Drafting an internal note rather than sending a customer-facing reply keeps a human in the loop and lowers the trust bar needed for the bot to be useful, since a support engineer only needs it to save research time rather than be fully correct. Combined with bounded research tools, loop-detection, and source citations for every draft, this narrow scope made the system easier to trust than a broader autonomous agent.

_Teams designing human-in-the-loop AI agents can compare guardrail patterns like these on daily.dev._

## Similar posts on daily.dev

- [Optimizing Support Processes with AI: From Slack Bot to Learning System](https://daily.dev/posts/optimizing-support-processes-with-ai-from-slack-bot-to-learning-system-vfnbpblx8) · Trendyol Tech · 0 upvotes · 0 comments
- [How to Build an AI Support Agent That Knows When NOT to Answer Tickets](https://daily.dev/posts/how-to-build-an-ai-support-agent-that-knows-when-not-to-answer-tickets-9tbxvoqrp) · freeCodeCamp · 7 upvotes · 0 comments
- [Why better tickets help agents write better code](https://daily.dev/posts/why-better-tickets-help-agents-write-better-code-suwct5vww) · Atlassian · 1 upvotes · 0 comments
- [Building an Internal Developer Platform with Artificial Intelligence](https://daily.dev/posts/building-an-internal-developer-platform-with-artificial-intelligence-arvvvck6u) · InfoQ · 1 upvotes · 0 comments
- [Why We Rebuilt LangChain’s Chatbot and What We Learned](https://daily.dev/posts/why-we-rebuilt-langchain-s-chatbot-and-what-we-learned-pnjgfiljk) · LangChain · 0 upvotes · 0 comments

---

Tags: [#ai-agents](https://daily.dev/tags/ai-agents), [#architecture](https://daily.dev/tags/architecture), [#inngest](https://daily.dev/tags/inngest), [#pgvector](https://daily.dev/tags/pgvector), [#rag](https://daily.dev/tags/rag)

[View this post on daily.dev](https://daily.dev/posts/why-we-built-a-support-bot-that-investigates-tickets-before-drafting-a-reply-qczwmeklq)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Why we built a support bot that investigates tickets before drafting a reply","url":"https://daily.dev/posts/why-we-built-a-support-bot-that-investigates-tickets-before-drafting-a-reply-qczwmeklq","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/why-we-built-a-support-bot-that-investigates-tickets-before-drafting-a-reply-qczwmeklq"},"datePublished":"2026-09-13T19:57:34.115Z","dateModified":"2026-10-15T02:22:54.530Z","description":"An engineering team describes building an internal support bot that investigates tickets before drafting replies, rather than generating text immediately. The...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/5b7ec5b7c53de7eaad2cb93dfbaccdd9?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/5b7ec5b7c53de7eaad2cb93dfbaccdd9?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Inngest Blog","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Inngest Blog","logo":"https://media.daily.dev/image/upload/s--ieZKUa5y--/c_limit,w_256/f_auto,q_auto/v1789329423/logos/inngest?_a=BAMAMicg0","url":"https://daily.dev/sources/inngest"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/why-we-built-a-support-bot-that-investigates-tickets-before-drafting-a-reply-qczwmeklq","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"ai-agents,architecture,inngest,pgvector,rag","timeRequired":"PT11M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Inngest Blog","item":"https://daily.dev/sources/inngest"},{"@type":"ListItem","position":3,"name":"Why we built a support bot that investigates tickets before drafting a reply"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/why-we-built-a-support-bot-that-investigates-tickets-before-drafting-a-reply-qczwmeklq#faq","mainEntity":[{"@type":"Question","name":"How can I build an AI support bot that searches historical tickets for similar past issues?","acceptedAnswer":{"@type":"Answer","text":"Generate embeddings for incoming and historical tickets, store them in PostgreSQL with the pgvector extension, and query for nearest neighbors to find semantically similar past tickets even when wording differs. Fetching the full historical conversation (not just a summary) shows how similar issues were actually resolved, which proved to be one of the highest-leverage parts of a support investigation system built on Inngest. Teams designing retrieval-based support agents can follow architecture writeups like this one on daily.dev."}},{"@type":"Question","name":"Why keep a documentation corpus as a local git submodule instead of calling a docs API for an AI agent?","acceptedAnswer":{"@type":"Answer","text":"Keeping docs as a local git submodule lets search tools like grep_search, glob_search, and read_file run fast, repeated searches without hitting a remote API or separate indexing pipeline. It also constrains the agent to the docs directory so it cannot wander into unrelated code, and makes it easy to map file paths back to public docs URLs for attribution. Developers weighing local versus remote retrieval for AI agents can track these tradeoffs on daily.dev."}},{"@type":"Question","name":"Why should an AI support bot only draft internal notes instead of auto-replying to customers?","acceptedAnswer":{"@type":"Answer","text":"Drafting an internal note rather than sending a customer-facing reply keeps a human in the loop and lowers the trust bar needed for the bot to be useful, since a support engineer only needs it to save research time rather than be fully correct. Combined with bounded research tools, loop-detection, and source citations for every draft, this narrow scope made the system easier to trust than a broader autonomous agent. Teams designing human-in-the-loop AI agents can compare guardrail patterns like these on daily.dev."}}]}
```

