Riwaq is open-source multi-tenant infrastructure for AI agents. Each organization gets API-key isolation; each agent has a private knowledge base, memory, analytics, and optional shared KBs. Chat runs through a RAG + memory pipeline, with async self-learning and dated reminders—Docker-first and OpenAI-compatible on the inbound side.
Key Features
- Tenancy: Organizations, API keys, and hard isolation across orgs.
- RAG: Upload PDFs/text/markdown into private or shared knowledge bases.
- Memory: Per-agent (and end-user) durable facts recalled into prompts.
- Self-Learning: Thumbs-up answers can promote into the knowledge base.
- Reminders: Extract or schedule due dates; fire signed webhooks.
- Provider Flexible: Anthropic or any OpenAI-compatible LLM outbound; OpenAI-shaped inbound
/v1/chat/completions.
Why Choose Riwaq?
- You need multi-tenant agent backends, not a single-user notebook RAG.
- Hindsight/Cognee cover memory/graphs; Riwaq focuses on ops-ready multi-agent hosting.
- You want Open WebUI / LangChain clients to speak a familiar OpenAI API.
- Docker Compose should stand up API + Postgres (pgvector) + cache quickly.
Docker Deployment
git clone https://github.com/fathah/riwaq.git
cd riwaq
cp .env.example .env
# set LLM keys (Anthropic or OpenAI-compatible)
docker compose up --build
# API http://localhost:3000 · optional console :3001
Production compose and GHCR images are documented in DOCKER.md.
Getting Started
- Boot the stack and
curl /health. - Create an organization (store the one-time API key).
- Create an agent and upload documents.
- Chat via native API or OpenAI-compatible client.
- Enable feedback → learning and optional reminder webhooks.
Full Setup Guide
github.com/fathah/riwaq. Related ToolHunt entries: Hindsight, Cognee, LiteLLM, Open WebUI. VPS deploy patterns: Dokploy.

