Skip to main content
All use casesUse Case

Give your team an AI that actually knows your docs.

Index your internal documentation, Notion pages, or Confluence wikis, then expose a query endpoint your team can call from Slack bots, dashboards, or internal tools.

FastAPIpgvectorQdrantOpenAIPostgreSQLRedis

The usual pain points

  • Ingesting and keeping documentation indexes up to date
  • Controlling which teams can access which collections
  • Integrating with Slack or other internal tools
  • Tracking which queries consume the most resources

How the kit solves them

  • RAG ingestion pipeline with incremental re-indexing support
  • Per-API-key access controls for collection-level permissions
  • Webhook endpoint ready for Slack slash commands out of the box
  • Token usage tracking per team or integration

Example implementation

main.py
# Collection-scoped RAG query
@router.post("/v1/kb/query")
@require_api_key(tier=["internal"])
async def query_knowledge_base(
    body: KBQueryRequest,
    key: APIKey = Depends(get_api_key),
):
    # Access control: key must own the collection
    await verify_collection_access(key, body.collection)
    answer = await rag.query(
        question=body.question,
        collection=body.collection,
        top_k=body.top_k or 5,
    )
    return KBQueryResponse(
        answer=answer.text,
        sources=answer.sources,
        tokens=answer.tokens,
    )

Ready to build your internal knowledge base api?

FastAPI AI Kit ships with everything shown above, pre-configured and production-ready. Clone the repo and start building in minutes.

Ready to ship your AI backend this weekend?

Join developers who skipped weeks of boilerplate and went straight to building.

Read the docs
No subscriptions · One-time payment · Lifetime updates