⚗️ 32dots Learn ist ein experimenteller Prototyp — Inhalte und Funktionen ändern sich kurzfristig.
Karte 01 · Kapitel getting-started

Your first AI agent

n8n easy 90 min
🟢 USE — Run first
0 - 15 min

Run it — before we explain anything

You are about to talk to an AI agent running on our university server. You did not build it. You do not know how it works yet. That is fine. Run it first.

  1. Open https://n8n.32dots.de in your browser. Log in with your own student email + password cos2026. (No demo? Sign up at https://curriculum.32dots.de/signup or use demo@cos.uni-heidelberg.de.)
  2. Log in with the credentials shown above.
  3. In the left sidebar, click Workflows. Find 'Session 01 — Your first AI agent'.
  4. Click the ⋯ menu on the workflow → Duplicate. Edit your copy (not the shared original).
  5. Open the workflow. Click the Chat button in the bottom-right corner.
  6. Ask: 'What is CRISPR and how does it work?'
  7. Ask a follow-up: 'What are the main ethical concerns about using CRISPR in humans?'
  8. Ask something it probably cannot answer well: 'What did Professor Müller publish last week?'
Done-Signal: You got a response to all three questions. The third answer was vague or wrong — and that is the most important result of this exercise.
🔵 UNDERSTAND — Look inside
15 - 60 min

Anatomy of an AI agent — every node explained

Go back to the workflow canvas. Click on each node to inspect it. The Agent node is the centre: everything else is plugged into it. Your goal here is to understand what each piece does and why it is there — not to memorise settings.

💬 When chat message received
Trigger
Listens for a message from the chat UI and starts the workflow. Nothing happens until a message arrives. In production, triggers are webhooks, schedules, or inbox listeners — here it is just the chat box.
🧠 AI Agent
Orchestrator
The brain of the workflow. It receives your message, stitches it together with the system prompt and memory, decides whether to call a tool, and produces the final reply. It does not generate text itself — it delegates that to the chat model plugged in underneath.
⚡ Groq gpt-oss-120b (Chat Model)
Language model
The actual text generator. gpt-oss-120b is an open-weights reasoning model from OpenAI (released Aug 2025, Apache 2.0): 117B total parameters but only ~5.1B active per token thanks to its Mixture-of-Experts design — which is why it is fast and cheap to run. Groq hosts it on custom LPU silicon; replies usually come back in a fraction of a second. The model has no memory and no internet of its own.
📜 System prompt — anatomy of a good one
Concept
The system prompt is the hidden message sent before every user message. It sets the rules. A good one has four parts: (1) ROLE — who the agent is ('You are LabBot, a research assistant for molecular biology'); (2) CONSTRAINTS — what it must or must not do ('Only answer questions about wet-lab protocols. Refuse clinical or political questions'); (3) STYLE — tone and length ('Concise. Bullet points. No marketing language'); (4) OUTPUT FORMAT — structure ('Always end with a one-sentence caveat about uncertainty'). Longer is not better — 50-150 words beats 500 almost every time.
🧵 Simple Memory (window buffer)
Short-term memory
Plugged into the Agent as its memory. This is a sliding window that keeps the last N chat turns (default: 5) and prepends them to every new call. That is why the agent remembers what you said two messages ago. It is RAM, not a hard drive — when the window slides, older turns are gone forever. Every new chat session starts empty.
💾 Long-term memory — what you can plug in here instead
Concept
The memory slot also accepts persistent backends: Postgres, Redis, MongoDB, or vector stores like Pinecone / Qdrant. Postgres/Redis = exact conversation history across sessions. Vector stores = semantic recall ('what did we discuss about CRISPR weeks ago?') by embedding and nearest-neighbour search. Today we use the simple window because it has zero setup. Session 03 will swap it for a vector store.
🌐 HTTP Request Tool
Tool
A tool is a function the agent can choose to call. This one makes HTTP calls to any URL — a public API, a colleague's service, a data source. The agent reads the tool's description, decides if the user's question needs it, and fills in the URL + parameters itself. You are giving the model hands.
🪆 AI Agent Tool (sub-agent)
Delegation
A tool that is itself another agent. Useful when a sub-task is complex enough to need its own system prompt, its own tools, and its own focus. Pattern: main agent handles conversation; sub-agent handles a specialised job (e.g. 'search literature', 'plan an experiment'). Keeps each agent's tool list small and its prompt focused.
📏 The 3-5 tools rule
Design principle
An agent with 3-5 well-described tools picks the right one reliably. An agent with 15 tools gets confused, picks wrong, or ignores half of them. Rule of thumb: if you need more than 5 tools, split into a main agent + sub-agents. Each sub-agent gets its own 3-5 tools and its own narrow system prompt. This is how real production AI systems scale.
An AI agent is four things wired together: (1) a language model — the pattern engine that writes text but knows nothing of today's world, (2) a system prompt — the rules that shape its behaviour, (3) memory — what it remembers between turns, (4) tools — how it reaches out of its own head and into the real world. Change any of the four and you get a different agent. The model is the smallest part of the job — the plumbing around it is where the engineering happens.

Probe-Fragen

  • Open the AI Agent node. Read its system prompt. Can you identify the four parts (role, constraints, style, output format)? Which part is strongest, which is weakest?
  • Open the Simple Memory node. How many turns does it keep? What would break if you set it to 1? What would become expensive if you set it to 100?
  • The agent has three tools wired to it. How does the agent decide which one to call — and how does the tool's description influence that decision?
  • Why would you split an agent with 10 tools into a main agent + 2 sub-agents instead of just giving it all 10 tools?
🟠 BUILD — Make it yours
60 - 90 min

Make it yours — prompt, tools, memory

You will duplicate the workflow and change three things: the system prompt (to shape personality), one tool (to change what it can do), and then you will test that memory actually works across turns.

Aufgabe: Duplicate the shared workflow. Then (1) rewrite the system prompt using the four-part anatomy, (2) add or remove one tool, (3) run a two-turn chat that proves memory is working.

  1. In n8n, open the workflow. Click ⋯ → Duplicate. Work in your copy only — never edit the shared original.
  2. Click the AI Agent node. Rewrite the system prompt with all four parts: ROLE (who am I?), CONSTRAINTS (what is off-limits?), STYLE (how do I sound?), OUTPUT FORMAT (how is the answer structured?). Keep it under 150 words. Example: 'You are LabBot, a specialist in protein folding. Only answer structural-biology questions — refuse clinical, legal, or political questions. Reply in 3-6 bullet points, no marketing language. End every answer with: ⚠ Uncertainty: <one sentence>.'
  3. Pick ONE tool change: either (a) remove a tool you will not use, or (b) add a new HTTP Request Tool pointing at a public API you care about (PubMed, UniProt, a weather API — anything). Give it a clear description — the description is what the agent reads to decide when to call it.
  4. Save (Ctrl+S) and open the chat.
  5. Turn 1: ask a question inside your domain (e.g. 'What are the main steps of protein folding?'). Turn 2: ask a follow-up that only makes sense with memory (e.g. 'Which of those steps is most error-prone?'). The agent should answer turn 2 without you re-explaining what 'those steps' refers to — that proves the memory node is feeding previous turns back in.
  6. Turn 3: ask something your constraints forbid (e.g. a clinical question). Confirm the agent refuses politely.
  7. Take one screenshot of the new system prompt and one screenshot showing all three turns in the chat.
Deliverable: Your system prompt (showing the four parts) + screenshot of the two-turn memory test + screenshot of a refused out-of-scope question.
✓ SELF-CHECK

Hast du das verstanden?

  • I can open n8n, find the workflow, duplicate it, and edit my copy safely.
  • I can point at the four parts of a good system prompt (role, constraints, style, output format) in my own prompt.
  • I can explain in one sentence what gpt-oss-120b is and why Groq runs it fast (LPU hardware, MoE model with ~5B active params).
  • I can explain the difference between the Simple Memory window and a Postgres/vector-store memory — and when I would use each.
  • I can describe the 3-5 tools rule and explain when it is time to spawn a sub-agent instead of adding another tool.
  • I personalised the agent's prompt, changed one tool, and verified memory works across at least two turns.
🔗 LIVE-DEMO

Direkt ausprobieren

What would you need to add to this workflow so the agent can only answer questions it can verify against a specific document? Keep that question in mind — we will answer it in session 03.
💬 KI-TUTOR

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.