The AI assistant of Twake Workplace as a standalone Cozy app.
#/assistant/:conversationId: a conversation.- Any other route opens a new conversation.
Another app opens the assistant with the OPEN intent on
io.cozy.ai.chat.conversations, in a modal or in a side panel. The
assistant opens as a scribe, whatever its data: it offers prompts about the
text of the app, hands its answers back for the app to insert them, and calls
the capabilities of the app, what it can do beside taking an answer, when a
request needs one. See
the Assistant intent.
- The flag
cozy.assistant.enabled. - A RAG server configured in cozy-stack (
rag:incozy.yml). - For the scribe, a cozy-stack that knows the
documentsandinstructionsoptions ofPOST /ai/chat/conversations/:id, and itsactionsfor the capabilities. - For the answers of the scribe,
cozy-interapp0.20.0 or later in the app that opens it. - Optional:
cozy.assistant.autoprovisionlists the assistants to create. The app sets them up when it opens, and a service once a day to follow the changes of the flag, with therag-indextriggers that index their folders. An entry names an existing folder bydirId(a folder id or a magic folder likeio.cozy.apps/meet), bydirName(a path from the root), or both:dirNameis then used whendirIddoes not resolve, and the assistant stays on it afterwards. An entry whose folder does not exist is retried later, unless it setsautoCreateFolder: true: thedirNamefolder is then created or, for a magic folder, a folder at the root named aftername(dirNameif none), referenced by its app, which then uses it.
yarn install
yarn build
cozy-stack apps install aiassistant file://$PWD/build --domain cozy.localhost:8080Use yarn watch to rebuild on change, yarn lint and yarn test before
committing.