Aller au contenu principal

minicloud Copilot

EPIC: #260 Β· Status: πŸ“‹ Backlog (5 connectors) Β· Sprint: TBD

minicloud Copilot is the self-hosted equivalent of Microsoft 365 Copilot. Every data source and AI component already exists on the platform β€” these 5 connectors wire them together so that AI assistance is embedded in the daily tools employees already use (email, chat, meetings, documents, search).


Stack mapping β€” minicloud vs M365 Copilot​

M365 Copilot capabilityminicloud equivalentStatus
Outlook β€” email summarization, triageStalwart mail + n8n + LiteLLMπŸ“‹ #261
Teams β€” meeting notes, action itemsJitsi + Whisper + LiteLLM + NextcloudπŸ“‹ #262
SharePoint / OneDrive groundingNextcloud webhook β†’ RAG β†’ QdrantπŸ“‹ #263
Copilot Chat in TeamsMatrix @ai bot β†’ LiteLLM β†’ ElementπŸ“‹ #264
Enterprise SearchUnified RAG in Open WebUI (Qdrant backend)πŸ“‹ #265
AI gatewayLiteLLMβœ… live
AI observabilityLangfuseβœ… live
Document conversionmarkitdown-proxyβœ… live
Vector searchQdrantβœ… live
Automationn8n + minicloud-crew-agentβœ… live

Architecture​

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ minicloud Copilot β”‚
β”‚ β”‚
β”‚ Data Sources Connectors AI Layer β”‚
β”‚ ────────── ────────── ──────── β”‚
β”‚ Stalwart IMAP ──→ n8n ──────────────────────→ LiteLLM β”‚
β”‚ Nextcloud files ──→ markitdown-proxy β†’ RAG ──→ β”‚ β”‚
β”‚ Jitsi recording ──→ Whisper ────────────────→ β”‚ β”‚
β”‚ ERPNext API ────────────────────────────────→ β”‚ β”‚
β”‚ Matrix history ─────────────────────────────→ ↓ β”‚
β”‚ Qdrant (vector DB) β”‚
β”‚ β”‚ β”‚
β”‚ Open WebUI β”‚
β”‚ (Enterprise Search) β”‚
β”‚ β”‚ β”‚
β”‚ Langfuse (traces) β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

All connectors write to the same Qdrant instance. Open WebUI becomes the unified Enterprise Search interface β€” no separate search tool needed.


Connector 1 β€” Email AI (#261)​

Stalwart IMAP β†’ n8n β†’ LiteLLM β†’ Matrix + ERPNext + SMTP

StepComponentDetail
Triggern8n IMAP nodePolls shared mailboxes (sinistres@, courtiers@, production@) every 2 min
ClassificationLiteLLMUrgency P1/P2/P3 + type (dΓ©claration / rΓ©siliation / avenant / autre)
ExtractionLiteLLMInsured name, policy number, date of loss, 3-sentence summary
AlertMatrix webhookPosted to #sinistres: room; P1 triggers @room
CRM creationERPNext REST APILead/Opportunity with extracted fields
AcknowledgementSMTP via StalwartAuto-reply with SLA: P1=4h / P2=24h / P3=48h
Draft assistLiteLLMReply draft saved to Stalwart Drafts (human sends)

Value for insurance IS: Eliminates manual triage of sinistres@ β€” every claim email is classified, logged in ERPNext, and acknowledged within 5 minutes.


Connector 2 β€” Meeting Notes (#262)​

Jitsi β†’ Whisper β†’ LiteLLM β†’ Nextcloud + Matrix

StepComponentDetail
RecordingJibri (to deploy)Saves .mp4 to Nextcloud Meetings/recordings/
Triggern8n WebDAV pollDetects new recording file
TranscriptionWhisper large-v3OpenAI-compatible endpoint in ai namespace
SummarizationLiteLLMStructured output: participants, decisions, action items, summary
StorageNextcloudNotes saved to Meetings/notes/<date>-<room>.md
NotificationMatrixSummary posted to corresponding Matrix room

Action item format: - [ ] @owner: task description (due: YYYY-MM-DD)


Connector 3 β€” Document Grounding (#263)​

Nextcloud webhook β†’ markitdown-proxy β†’ rag-ingest β†’ Qdrant

This is the fastest connector to ship β€” no new containers, just wiring existing services.

Collection mapping:

Nextcloud folderQdrant collectiondoc_type
/Company/Policies/company-policiespolicy
/Company/Procedures/company-proceduresinternal
/Company/Sinistres/sinistresclaim
/Company/Contracts/contractscontract

Trigger: Nextcloud Flow app fires webhook on file create/update/delete β†’ n8n β†’ rag-ingest service.


Connector 4 β€” Chat AI Assistant (#264)​

Matrix @ai bot β†’ LiteLLM β†’ Element Web

Deployed as maubot in chat namespace. Users mention @ai in any Element room.

CommandAction
@ai <question>AI reply with last 10 messages as context
@ai /search <query>RAG search across all Qdrant collections β†’ top 3 sources
@ai /summarizeSummarize last 20 messages in the room
@ai /action-itemsExtract action items from last 20 messages

For document questions (message contains ? + policy keywords) β†’ RAG lookup first β†’ LiteLLM with retrieved context.


Connector 5 β€” Enterprise Search UI (#265)​

Open WebUI + Qdrant β†’ unified search across all 4 data sources

Open WebUI is reconfigured to use the shared Qdrant instance (VECTOR_DB=qdrant) instead of its default Chroma. Five Knowledge Bases are pre-configured:

Knowledge BaseCollectionsAccess
πŸ“§ Emailsemailsmanagement
πŸ“ Company Documentscompany-policies, procedures, contractsall
πŸŽ₯ Meeting Notesmeeting-transcriptsall
πŸ’¬ Chat Historymatrix-historycollab
πŸ” All Sourcesall collections (re-ranked)management

Hybrid search: BM25 keyword + dense vector, French BM25 tokenizer already in the minicloud-open-webui custom image.

Source citation: every response includes filename + collection + chunk score.


Build order​

StepIssueEffortDepends on
1Email AI (#261)~3 days (n8n workflow + LiteLLM prompt)nothing
2Document grounding (#263)~1 day (webhook + existing rag-ingest)nothing
3Chat AI (#264)~2 days (maubot deploy + plugin)nothing
4Meeting notes (#262)~4 days (Jibri + Whisper + n8n)Jibri
5Enterprise Search (#265)~2 days (Open WebUI config + KB setup)#261 #262 #263

Total estimate: ~12 days for full minicloud Copilot. No new infrastructure except Jibri (Jitsi recording) and Whisper (both lightweight).


Observability​

Every LLM call in all 5 connectors flows through LiteLLM β†’ traced in Langfuse with:

  • tags: connector name (email-ai, meeting-notes, etc.)
  • metadata: source document / email subject / room name
  • session_id: tied to the source event for full trace

A Grafana dashboard minicloud-copilot-v1 will show: calls per connector / p95 latency / classification distribution.