Skip to content

BlueBirdBack/askclaw

Repository files navigation

AskClaw

Knowledge, alive.
Turn any knowledge base into an AI agent that understands, responds, and acts.
Self-hosted · MIT License

Desktop

English · 中文


Why AskClaw exists

Most knowledge bases are dead — static docs that nobody reads, wikis that rot, FAQs that answer questions nobody asked. AskClaw brings them to life.

Feed it your knowledge. Ask it anything. It doesn't just search — it understands.

AskClaw is a self-hosted AI support agent powered by OpenClaw. Point it at any knowledge base — product docs, internal runbooks, community fixes — and it becomes an expert that your users can talk to.

For open-source projects: replace your Discord support channel with an AI that actually knows the codebase.
For teams: stop answering the same onboarding questions. Let AskClaw handle it.
For products: give your users instant, accurate support without hiring a support team.

Built on standard web infrastructure — no WebSocket auth headaches, no device pairing, no WebCrypto. Just HTTPS and it works.

Features

  • 🧠 Knowledge Base — feed it docs, fixes, runbooks → it becomes the expert
  • 💬 Real-time streaming chat — responses stream as they're generated
  • 🔍 Search — full-text search across all conversations and KB entries (SQLite FTS5)
  • 👥 Multi-user — per-user isolated sessions, shared infrastructure
  • 📄 Export — save conversations as PDF or DOCX
  • 🌐 Bilingual — English + Chinese (i18n built-in)
  • 📱 Responsive — desktop, tablet, and mobile
  • 🌙 Dark mode — auto-follows your OS/browser theme (prefers-color-scheme)
  • 🔒 Auth — HTTP Basic Auth with per-user session isolation
  • 📊 Gap analytics — see what users ask that the KB can't answer, then fill the gaps

How it works

Your knowledge base (docs, fixes, runbooks)
        ↓ seed / import
   AskClaw KB (SQLite FTS5)
        ↓ context injection
   AI agent (OpenClaw) — understands, responds, acts
        ↓
   Your users get answers
  1. Curate — add KB entries: fix, workaround, guide, faq, tip
  2. Ask — users ask questions in natural language
  3. Match — AskClaw searches the KB and injects relevant context into the AI
  4. Answer — the AI responds with accurate, sourced answers
  5. Learn — feedback loop (helpful / not helpful) + gap analytics improve coverage over time

Screenshots

Solve real problems — actionable answers with tables, code blocks, and cost breakdowns Cost optimization

Dark mode — auto-follows your OS/browser theme Telegram debugging

Quick deploy guides — step-by-step with copy-paste commands VPS install

Full-text search — find any conversation instantly Search

Stack

Layer Technology
Frontend Svelte 5 + TypeScript + Vite
Backend FastAPI + Python 3.13
Database SQLite (WAL mode, FTS5 full-text search)
Auth HTTP Basic Auth (htpasswd)
Export PDF (html2pdf) + DOCX (docx.js)
i18n Custom (en + zh)

Architecture

Browser
  └─▶ nginx (TLS termination + Basic Auth)
        ├─▶ FastAPI backend (:8000)  ← chat history, files, search
        └─▶ OpenClaw gateway (:18789) ← AI models, agents, tools

Each user gets an isolated session. The backend stores conversations in SQLite with full-text search. OpenClaw handles model routing, agent orchestration, and tool execution.

Quick Start

Prerequisites

  • Python 3.13+
  • Node.js 18+
  • A running OpenClaw gateway

Backend

cd server
python -m venv .venv && source .venv/bin/activate
pip install -e .
uvicorn askclaw.main:app --host 127.0.0.1 --port 8000

Frontend

npm install
npm run dev        # development
npm run build      # production → dist/

Environment

# Copy the example and edit
cp server/.env.example server/.env

Point to your OpenClaw config:

ASKCLAW_OPENCLAW_CONFIG=/root/.openclaw/openclaw.json

OpenClaw agent

AskClaw uses a dedicated OpenClaw agent (openclaw:askclaw) with a minimal workspace to prevent the main agent's system prompt from leaking into user responses. See docs/openclaw-agent.md for full setup details.

Production (nginx)

See nginx-config-example for a full nginx + TLS setup with Basic Auth.

Project Structure

/
├── src/                    # Svelte 5 frontend
│   ├── components/         # Chat UI components
│   └── lib/               # API client, i18n, export, state
├── server/
│   └── askclaw/           # FastAPI backend
│       ├── routers/       # API routes (chats, files, auth, search, kb)
│       ├── main.py        # App entry point
│       ├── models.py      # Pydantic models
│       ├── kb.py          # Knowledge base helpers + analytics queries
│       └── db.py          # SQLite + FTS5
└── public/                # Static assets

Live Demo

askclaw.top — live deployment powering OpenClaw support.

Roadmap

  • Docker Compose one-command deploy
  • KB import from Markdown directories, GitHub Issues, Slack exports
  • Multi-model support (OpenAI, Anthropic, local models)
  • Image upload + paste (drag-and-drop, Cmd+V)
  • Usage analytics dashboard
  • Team/organization support
  • Webhook integrations (Slack, Discord, email escalation)

License

MIT — see LICENSE

Built with

  • OpenClaw — multi-agent AI framework powering the backend
  • Svelte — frontend framework
  • FastAPI — backend framework

About

Knowledge, alive. Turn any knowledge base into an AI support agent.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors