Tilbake til Admin

Admin Håndbok

Teknisk dokumentasjon og utvikler-kommandoer

Kommandoer

Clarqo Assistant

Clarqo Assistant is the UK property management chat assistant. It answers questions about properties, contracts, parties, compliance and H&S, adapting to the page the user is on.

Architecture

Backend

  • Service: backend/app/services/intelligence/ki_kollega/service.py
  • API router: backend/app/api/v1/ai/chat.py

Frontend

  • Route: /assistant (redirect from /ki-kollega)
  • Widget: frontend/app/components/features/ChatWidget.tsx
  • Interface: frontend/app/components/features/ChatInterface.tsx

API endpoints

EndpointMethodDescription
/api/v1/ai/chatPOSTMain chat endpoint
/api/v1/ai/chat/streamPOSTStreaming responses (SSE)
/api/v1/ai/suggestionsGETContext-based suggestions
/api/v1/ai/healthGETHealth check

Context from URL

Frontend reads context from the URL path:

  • /properties/123 → { entity_type: "property", entity_id: "123" }
  • /contracts/456 → { entity_type: "contract", entity_id: "456" }
  • /parties/789 → { entity_type: "party", entity_id: "789" }

Brukere kan stille spørsmål som «What is the floor area?» uten å navngi eiendommen eksplisitt.

Query types

TypeDescription
lookupFind specific data
comparisonCompare entities
analysisTrends and aggregations
explanationExplain concepts and scores
actionTrigger workflows
generalGeneral questions

Key features

  1. Hybrid retrieval – searches database and documents
  2. Follow-up questions – suggests relevant next questions
  3. Source references – shows which entities were used
  4. Conversation history – maintains context between messages