DEV Community

Cover image for Building an Open-Source Support Tool That Turns Answers into Reusable Knowledge
Nathan Tarbert
Nathan Tarbert

Posted on

Building an Open-Source Support Tool That Turns Answers into Reusable Knowledge

I built a tool to help with community support. Then I kept building.

I spend a good part of my day working with the community at CopilotKit, answering questions in Discord, GitHub, and Slack, helping people get unstuck, and pointing them to the right resources.

I started building answerLoops to help me with that work. As it took shape, I added more integrations that fold in additional communities so other teams could use it too.

It’s open source, and I’m building it in public.
Check out answerLoops GitHub ⭐️

A big part of the work has been deciding how knowledge gets into the system. Some answers are in the docs. Others come out of a support conversation or are things someone on the team just knows.

For an agent to use those answers, the team needs a straightforward way to save them, review them, and keep them current. That’s what I’ve been building into the knowledge base.

Answering the question is only part of the work

A question comes in. You find the relevant documentation or resource, figure out how it applies to that person’s setup, and write a reply.

During that conversation, you might discover something the docs don’t cover. A missing setup step, a confusing default, or a workaround that deserves its own article.

You resolve the question, but that useful detail stays buried in the conversation. When someone else asks, the team has to find it again.

I want answerLoops to help with both parts: preparing a useful answer now and saving what the team learns for future questions.

What answerLoops does

Product Flows

answerLoops brings support questions from connected channels (GitHub, Discord, Telegram, etc.) into a dashboard and uses your knowledge base to help prepare answers.

For knowledge-based replies in the ticket pipeline, a Mastra agent generates a draft and a separate agent assesses it. The second agent is only a reviewer and is there to make sure the draft is concise and accurate. The team can then review, edit, or dismiss the draft in the dashboard.

There’s also an embeddable website chat widget built with CopilotKit and connected to a Mastra support agent. Visitors can ask questions directly, with published knowledge-base articles supplied as reference material.

The widget now supports richer responses, including step-by-step guides, quick replies, callouts, link cards, and contact options.

But the quality of those answers depends on the information available to the agent. That’s why much of the recent work has been on the knowledge base.

Add the answer that isn’t in your docs

Add Knowledge

Sometimes you don’t need to import a documentation site. You just need to write down something the agent should know.

An owner or admin can open Knowledge Base → Manage and use Write an answer by hand:

  1. Enter a question or title.
  2. Write the answer or context.
  3. Click Add to knowledge base.

For example, a customer might ask whether changing a configuration requires a restart. Someone on your team knows the answer, but it isn’t documented anywhere.

They can add that explanation directly.

The article is published and indexed when it’s saved, making it available for subsequent questions. There’s no draft step in this form, so the answer should be suitable for customers to read.

Articles added this way appear under Added by hand in the Knowledge coverage tab.

It’s a small feature, but it gives the person with the answer a direct way to improve what the agent knows.

Bring in the knowledge you already have

Knowledge sources

You can also populate the knowledge base from existing content:

  • Documentation URLs: import a page or crawl a documentation site.
  • Files: upload PDF, DOCX, Markdown, text, or CSV files.
  • GitHub: sync Markdown and MDX files, with optional syncs when changes are pushed to the default branch.
  • Notion: connect pages and databases your team wants to use.

Notion content imports unpublished. Your team can inspect it before making it available for customer-facing answers, and that publishing choice is preserved across syncs.

The manual-entry form sits alongside these sources. If an answer already exists in your docs, import it. If it only exists in someone’s head, write it down.

Turn a resolved ticket into reusable knowledge

A resolved ticket can contain an explanation worth keeping.

The Promote to KB action lets an owner or admin turn that ticket’s question and answer into a knowledge-base article.

Before promoting it, check that the answer applies beyond the original conversation. Remove account-specific details and make the explanation useful to someone encountering the same problem later.

This matters for the website widget in particular. Its retrieved reference material comes from published KB articles, rather than raw resolved tickets.

Promoting an answer gives it a place in the shared knowledge base where the widget can find it.

Let customer questions help you decide what to write

You won’t know every gap in your documentation ahead of time.

The Review tab captures questions that weren’t covered by the available knowledge. On hosted plans, this queue is available on Pro and above.

A usable draft can come along as a starting point. If there isn’t one, the item is marked No usable answer, and someone can write it.

Owners and admins can:

  1. Edit the question and answer.
  2. Click Approve and add to knowledge base.
  3. Or reject the item.

Nothing in the queue becomes searchable customer-facing knowledge until it’s approved.

When the same question comes in again, its counter increases instead of creating another copy. The most-asked questions appear first.

That gives the team a practical place to start. If several people are asking about the same setup step, writing one good answer is probably worth the time.

Go from a knowledge gap to a new article

Review and gaps

The Knowledge Gaps page provides another view of where support needs attention.

It surfaces tickets with low-confidence answers, tickets that need a person, and resolved questions without a covering KB article.

Repeated questions are grouped with an Asked N times badge, so you can see recurring topics without reading every ticket separately.

The + KB action opens the manual-entry form with the ticket’s question and any existing answer filled in. Review the text, add the article, and it’s linked back to the ticket to close that gap.

You don’t have to leave the question behind and start a blank document somewhere else.

Check what the agent can actually find

Coverage

Importing a document doesn’t tell you whether it will help with a particular question.

The Knowledge coverage tab shows articles grouped by source, including whether they’re live, unpublished, or not searchable.

There’s also a Try a customer question field. It runs the same lookup the website widget uses and shows which articles match—or that nothing covers the question.

After adding an answer, you can try a few ways a customer might ask about it and inspect the results.

This checks retrieval, not whether every generated reply will be correct. You still need to review the answers themselves. But it gives you a way to investigate whether the intended information is being found.

The KB is the source of product knowledge your team maintains for the agent. If no article matches, the assistant can fall back to general knowledge, which may not fit your product. Finding those gaps and adding the right material is part of maintaining it.

See which articles are being used

Article usage

The latest release also adds article usage tracking.

answerLoops counts when an article is supplied as context for an answer that is actually produced, including website replies and ticket drafts.

The distinction matters: this means the article was given to the agent, not necessarily that the final reply quoted it.

Searches and simulations don’t increase the count.

Together with the coverage view and repeated-question counts, this helps you understand what information is being retrieved and where more work might be useful.

Where CopilotKit and Mastra fit

I work in DevRel at CopilotKit, so part of building answerLoops is putting the tools I work with into a product and sharing what I learn.

Mastra runs the agents behind the support drafts and website conversation, including the chat agent’s thread memory.

CopilotKit provides the foundation for the custom widget interface. The application connects that interface to the agent and supplies the relevant knowledge-base context.

The product also has its own workflows around those pieces: importing sources, reviewing unanswered questions, publishing articles, and handling staff actions on tickets.

Those workflows are where the team gets to improve the information the agent uses. Someone can spot a missing answer, write it, publish it, and check whether a future question retrieves it.

That’s become a much bigger part of answerLoops as I’ve kept building.

Try it and tell me what’s missing

I started this to help with my own community work. I’m sharing it so other developers and support teams can try it in theirs.

The code and setup instructions are on GitHub, and the knowledge-base documentation walks through these workflows.

If it looks useful, give the repo a ⭐️ star which helps others find it. If you try it, I’d like to hear all of your feedback.

If you're new to open source, just reach out, I'd love to help. I've

Where does your team keep the useful answers that haven’t made it into the docs yet?

Top comments (14)

Collapse
 
morgan-123 profile image
Morgan •

Thanks for sharing. How difficult is it to connect to Discord and start replying to support queries? My support lives in Discord, and we are a very small team but it tends to be time consuming, if I have to find the answers in the source code.

Collapse
 
nathan_tarbert profile image
Nathan Tarbert •

I designed it so it's only one click to connect to your Discord. This authenticates, then you choose the server you want the answerLoops bot added to, then choose the channels you want it to listen, and respond in. I'd love to get your feedback if you try it out.

Collapse
 
james0123 profile image
James •

I just found this, and I'm intrigued. I'm curious, If you’ve connected an AI assistant to your docs, how do you check that it’s finding the right information?

Collapse
 
nathan_tarbert profile image
Nathan Tarbert •

Hey James, one important detail is adding the correct info to your KB. How I validate is that I start with questions people have actually asked and check which articles come back, not just whether the generated answer sounds right. I want to make sure it's accurate.

In answerLoops, the Knowledge coverage tab runs the same lookup as the website widget, so I can see the matching articles or spot a question with no coverage. Then I review the generated reply separately: did it use that information correctly and actually answer the question?
If something’s missing, I can add the answer directly to the KB and try the question again.

Collapse
 
fliin_0788 profile image
Fliin •

Ok, so on the platform, someone can manually add to the Knowledge Source, then?

Thread Thread
 
nathan_tarbert profile image
Nathan Tarbert •

That's correct, you can manually add to the KB, so let's say someone on your team is the Product Expert, you can add notes from a meeting notetaker or just type them out, etc. Here's the docs reference: answerloops.com/docs/product/knowl...

Collapse
 
steven0121 profile image
Steve •

I've been needing something like this for a while. Really appreciate the share.

Collapse
 
luis_prott profile image
Luis Prott •

I'm always worries of AI slop so when you fix an incorrect AI answer, do you have a way to make that correction useful for the next person?

Collapse
 
nathan_tarbert profile image
Nathan Tarbert •

Hey Luis, in AnswerLoops, automatic replies are off by default, and that's by design. I’d start by reviewing drafts against the KB and seeing how they handle actual community questions before enabling them for an integration or GitHub repo. The important part is trusting that the answer is going to be correct and accurate.

For knowledge-based replies, one agent writes the draft and a second assesses its confidence and whether it fully answers the question. The default threshold is 0.8, and both conditions have to pass. Otherwise, the draft gets escalated for human review.

That score isn’t a guarantee of correctness. I’d use the Knowledge coverage tab to check what the agent can retrieve, fix missing information, and review the resulting answers before trusting it with more automatic replies.

Collapse
 
luis_prott profile image
Luis Prott •

Ok, it sounds like it's worth giving it a shot. Can I self host it?

Thread Thread
 
nathan_tarbert profile image
Nathan Tarbert •

Yep, and bring your own LLM, even local models.

Collapse
 
andrew_osada profile image
Andrew •

What about local LLMs - Do you support those, and if so, is it recommended?

Collapse
 
nathan_tarbert profile image
Nathan Tarbert •

Yes, you can use local LLMs with answerLoops. I would just do your research because the answer quality might vary if you're using a small light weight model.

Collapse
 
zender_h_97834 profile image
Zender •

Nice one, I'm definitely checking this out. I would also love to contribute.