Aerostack
edit

Docs Q&A Bot Edge Function — Content

Content

RAG-powered Q&A over your documentation with citations. Ingest docs via /ingest, ask questions via /chat, search semantically via /search.

aerostack @aerostack verified
Updated Mar 6, 2025
GitHub

Edge function Docs Q&A Bot RAG-powered Q&A over your documentation with citations. Ingest docs via /ingest, ask questions via /chat, search semantically via /search.. Deployed on Cloudflare Workers — zero cold starts, globally distributed. Mount it via your Aerostack workspace to call it from any AI agent.

terminal — aerostack cli
$ npx aerostack add aerostack/docs-qa-bot
smart_toy

Use with AI Assistants

MCP

Connect Claude, Cursor, or any MCP-compatible client — then call this function by slug

① Add MCP Server

Add this once — access all Aerostack functions from your AI tool.

claude_desktop_config.json
{
  "mcpServers": {
    "aerostack": {
      "url": "https://mcp.aerostack.dev",
      "type": "http"
    }
  }
}

② Call this function

Ask your AI to use the call_function tool with this slug:

call_function
call_function({
  slug: "docs-qa-bot",
  args: {}
})

Docs Q&A Bot

Upload your documentation and let users ask questions. Powered by Aerostack RAG + Workers AI.

Endpoints

Method Path Description
POST /ingest Upload text or fetch from URL
POST /chat Multi-turn Q&A with citations
POST /search Semantic search (no LLM)
GET /docs List indexed documents
DELETE /docs/:docId Remove a document
GET /health Status check

Ingest text

curl -X POST {endpoint}/ingest \
  -H "Authorization: Bearer {key}" \
  -H "Content-Type: application/json" \
  -d '{"filename":"guide.txt","content":"Your documentation text here..."}'

Chat

curl -X POST {endpoint}/chat \
  -H "Authorization: Bearer {key}" \
  -H "Content-Type: application/json" \
  -d '{"message":"How do I reset my password?"}'

Metadata

upgrade Version 1.0.0
gavel License MIT
language Language javascript
cloud Provider cloudflare-worker

Tags

rag docs qa search citations
deployed_code

Build and publish your own functions

Write a TypeScript function, deploy it to the edge, and share it with thousands of developers — in minutes.

More Content Functions

Browse Content Functions →

Frequently asked questions

What does the Docs Q&A Bot function do? +

Docs Q&A Bot is a serverless edge function for content automation written in cloudflare-worker. Deploy it to Cloudflare Workers via your Aerostack workspace.

How do I deploy the Docs Q&A Bot function? +

Install the Aerostack CLI and run: ```bash aerostack deploy function @aerostack/docs-qa-bot ``` It will be live on Cloudflare Workers in seconds.

What runtime does Docs Q&A Bot use? +

Docs Q&A Bot runs on cloudflare-worker on the Cloudflare Workers edge runtime — zero cold starts, globally distributed.

Can I customise the Docs Q&A Bot function? +

Yes. Fork the function from your Aerostack dashboard, modify the source, and redeploy. All changes are version-controlled.