Skip to main content

Turn your Confluence docs into an AI chatbot in 5 minutes. Smart chunking, diagram support, and local or AWS deployment.

Project description

confluence-chatbot

Turn your Confluence docs into a searchable AI chatbot in 5 minutes.

confluence-chatbot ingests your Confluence spaces — text, tables, and architecture diagrams — into a local vector store, then answers questions using RAG (Retrieval-Augmented Generation) with source attribution.

Features

  • Smart chunking — splits by headings, keeps tables whole, handles pages without structure
  • Diagram understanding — uses a vision model (LLaVA) to describe architecture diagrams as searchable text
  • Fully local — runs with FAISS + Ollama, zero cloud costs for development
  • Production-ready — swap to S3 Vectors + Bedrock for AWS deployment
  • Incremental sync — only re-processes changed pages (coming in v0.2)
  • Source attribution — every answer cites exactly which page and section it came from

Quick Start

Install

pip install confluence-chatbot[all]

Configure

Create a .env file:

CONFLUENCE_URL=https://yourcompany.atlassian.net
CONFLUENCE_EMAIL=you@company.com
CONFLUENCE_API_TOKEN=your-api-token

Prerequisites

# Install and start Ollama (for local LLM)
brew install ollama
ollama serve  # in a separate terminal

# Pull the models
ollama pull llama3.1:8b    # for answer generation
ollama pull llava:13b      # for diagram description (optional)

Use as a Library

from confluence_chatbot import ConfluenceChatbot

rag = ConfluenceChatbot(
    confluence_url="https://yourcompany.atlassian.net",
    confluence_email="you@company.com",
    confluence_token="your-token",
    vector_store="faiss",
    embedding_model="BAAI/bge-large-en-v1.5",
    llm="ollama/llama3.1:8b",
)

# Ingest a space
rag.sync(spaces=["ENG"])

# Ask questions
answer = rag.ask("How does our caching layer work?")
print(answer.text)
print(answer.sources)

Use as CLI

# Sync a Confluence space
confluence-chatbot sync --space ENG

# Sync specific pages
confluence-chatbot sync --page-id 1234567890

# Ask a question
confluence-chatbot ask "How does caching work?"

# Interactive mode
confluence-chatbot ask

Configuration Options

Parameter Default Description
vector_store "faiss" "faiss" (local) or "s3vectors" (AWS)
embedding_model "BAAI/bge-large-en-v1.5" Any sentence-transformers model
llm "ollama/llama3.1:8b" Ollama model for answer generation
enable_image_description False Describe diagrams with vision model
image_model "llava:13b" Vision model for diagrams
top_k 5 Number of chunks to retrieve per query

How It Works

Confluence → Fetch pages → Smart chunk (text/tables/images)
                                    ↓
                         Embed (BAAI/bge-large-en-v1.5)
                                    ↓
                         Store in FAISS (local) or S3 Vectors (AWS)
                                    ↓
User question → Embed → Similarity search → Top-K chunks
                                    ↓
                         LLM generates grounded answer
                                    ↓
                         Answer + source citations

Install Options

# Lightweight (no local models, for use with Bedrock APIs)
pip install confluence-chatbot

# With local embedding model (BAAI, requires PyTorch ~800MB)
pip install confluence-chatbot[local]

# With local LLM via Ollama
pip install confluence-chatbot[ollama]

# Full local setup (recommended for development)
pip install confluence-chatbot[all]

Project Structure

src/confluence_chatbot/
├── core.py                  # Main ConfluenceChatbot orchestrator
├── models.py                # Data models (Page, Chunk, Answer)
├── cli.py                   # Command-line interface
├── ingest/
│   ├── confluence_client.py # Confluence API integration
│   ├── html_parser.py       # Parse Confluence HTML
│   ├── chunker.py           # Smart content-aware chunking
│   └── image_describer.py   # Vision model for diagrams
├── embedding/
│   ├── base.py              # Abstract embedding interface
│   └── sentence_transformer.py  # Local embedding (BAAI)
├── vector_store/
│   ├── base.py              # Abstract vector store interface
│   ├── faiss_store.py       # Local FAISS implementation
│   └── s3_vectors.py        # AWS S3 Vectors implementation
└── generation/
    ├── base.py              # Abstract LLM interface
    └── ollama_llm.py        # Local Ollama implementation

Roadmap

  • v0.1 — Core pipeline: sync, chunk, embed, query, answer (local)
  • v0.2 — Incremental sync, Bedrock LLM + embeddings, CLI improvements
  • v0.3 — Slack bot example, Streamlit UI, evaluation tooling
  • v1.0 — Production deployment guide, CDK infrastructure

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

confluence_chatbot-0.1.0.tar.gz (31.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

confluence_chatbot-0.1.0-py3-none-any.whl (40.4 kB view details)

Uploaded Python 3

File details

Details for the file confluence_chatbot-0.1.0.tar.gz.

File metadata

  • Download URL: confluence_chatbot-0.1.0.tar.gz
  • Upload date:
  • Size: 31.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.7

File hashes

Hashes for confluence_chatbot-0.1.0.tar.gz
Algorithm Hash digest
SHA256 4d5fa717ca09e0610b9da0b06794353965f7924fef9319ed675dfe22c75d4ba5
MD5 40456e58447a13c3d5197c4836fe22c6
BLAKE2b-256 efe1892d373fce28f10a56ac6ad8c5ccdf6a9f21e51af55859b6fd65f8df0178

See more details on using hashes here.

File details

Details for the file confluence_chatbot-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for confluence_chatbot-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ba8d8da282c7f9f6375cd2cfb9b2cf765afd75a0f3cd0af920738ea7f5d86b0b
MD5 27c71017f9ba5b2d0df0bf47ca350862
BLAKE2b-256 6299732ee69a998ea70cf5e08ac4ecd257d4a1b756e997a31ba565c7773ee271

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page