Voice to Lab AI via Mattermost
Talk to the lab — get an answer in the chat
Today the AI lives where you already talk. Mattermost (#lab-ai) is the chat surface where you post the question and read the reply; n8n is where the workflow that powers the bot lives. You'll try the bot in Mattermost first, then open the workflow in n8n to see how Whisper + the AI Agent are wired together.
- Open https://mattermost.32dots.de in a second tab, log in with the same email + cos2026, and join the channel #lab-ai if you are not already in it.
- Type any lab question in #lab-ai, e.g. 'What is PCR in two sentences?' and send it.
- Wait 2–5 seconds. The lab-bot replies in the channel with your question quoted and the answer below.
- On your phone or laptop: tap the microphone icon in Mattermost's message box, record a question out loud, send the voice clip.
- Watch the bot transcribe your speech and answer the transcribed question.
- Now click 'Copy credentials + open workflow in n8n' above — that's where the Mattermost webhook, Whisper call, AI Agent, Groq model, Simple Memory, and Post-to-Mattermost step are all wired together. You'll adapt it in the Build phase.
One agent, two input modes — voice and text through a single pipeline
Last session you met the AI Agent: prompt, model, memory, tools. Today the same anatomy shows up again, but now humans talk to it through Mattermost and can speak instead of type. Whisper sits in front of the Agent and turns voice into text; the Agent answers; a post-process step drops the reply back into the channel. Same Agent shape, wider surface.
Probe-Fragen
- Open the AI Agent node. Read its system prompt. Find the sentence that specifically addresses voice input. Why is that sentence there — and what would break without it?
- Open the Simple Memory node. The sessionKey is set to the Mattermost channel_id. What would break if you left it as the default — and what is the correct key for a 1:1 DM bot instead of a channel bot?
- Open the Whisper HTTP Request node. It POSTs to Groq's audio/transcriptions endpoint, while the Agent uses Groq's chat/completions. Why are these two different endpoints even though both are hosted by Groq?
- Now imagine you need to accept PDFs too. Where in this workflow would the PDF-reading step go — and which existing nodes would you leave completely untouched?
Extend the agent — personality, memory scope, one new capability
You will duplicate the workflow and make three changes: (1) rewrite the system prompt so the bot speaks in your voice, (2) verify memory is channel-scoped by running a two-turn conversation, and (3) add one small capability — pick a filter, a new pre-process step, or a new system-prompt rule.
Aufgabe: Duplicate the shared workflow. Personalise the Agent. Prove memory works. Add one small upgrade of your choice (details in steps).
- In n8n, open 'cos2-voice-to-lab-ai'. Click ⋯ → Duplicate. Work in your copy only.
- Open the AI Agent node. Rewrite the system prompt using the four-part anatomy from Card 01 (role / constraints / style / output format). Add one constraint specific to your field, e.g. 'Always mention at least one relevant technique when discussing protocols.' Keep under 150 words.
- Save. Open #lab-ai in Mattermost. Post a question (text or voice — voice comes from the microphone icon in the message bar). Wait for the reply. Then post a follow-up that only makes sense if the bot remembers turn 1 (e.g. 'What about the second step you mentioned?'). Confirm it answers without you re-explaining.
- Now post that same follow-up in a DIFFERENT Mattermost channel. The bot should have NO memory of the previous conversation there — that proves memory is correctly scoped to channel_id.
- Pick ONE small upgrade: (a) add an IF node in front of the Agent that drops messages containing a forbidden word of your choice; or (b) add a second pre-process step, e.g. detect the language of the input and pass it as context to the Agent; or (c) change the system prompt so the bot always ends its reply with a specific structured footer (⚠ Uncertainty / 📚 Suggested reading / 🔗 Related concept).
- Send five questions. Confirm your upgrade fires on every one.
Hast du das verstanden?
- I posted both a typed and a spoken question in Mattermost and got replies from the Lab AI.
- I can point at the Agent's three input ports in the diagram and name which sub-node plugs into each.
- I can explain why Whisper is a separate pre-process step and not a tool of the Agent.
- I verified memory is scoped to the Mattermost channel by testing across two different channels.
- I duplicated the workflow, rewrote the system prompt in four parts, and added one small upgrade.
- I can list one real-world change to this workflow (new input type, new output destination) and name which nodes I would touch.
Direkt ausprobieren
Diese Links öffnen die laufenden Demos auf n8n.32dots.de + dify.32dots.de.
Frag den Tutor zu dieser Karte
Sokratisch: der Tutor antwortet mit Leitfragen statt fertigen Antworten — du erarbeitest die Lösung selbst.
Stell eine erste Frage zu dieser Karte unten.