N
NexusDigitalLabs
← Back to Academy

Phase 2 — Working with LLMs · Lesson 26 · 40 XP

Project: streaming chatbot with tools and memory

The Phase 2 capstone: combine every piece from this phase into one real chatbot — messages and system prompts (Lesson 20), streaming (Lesson 21), at least one working tool (Lesson 23), and conversation memory that survives across turns.

The trickiest part is usually the interaction between streaming and tool use: a streamed response can itself contain a tool-call request partway through, which means your code has to finish consuming that stream, execute the tool, and then continue the conversation with a fresh request — not just print tokens blindly.

Exercise

Build a CLI or simple web chatbot that streams responses token-by-token, has at least one working tool, and keeps conversation memory across turns — the Phase 2 capstone project.

Check yourself

1. Where does "memory" actually live in your chatbot — in the model, or in your code?

2. If the model requests a tool call mid-stream, what has to happen before your code can execute the tool and continue the conversation?

← Previous lesson

Cost, latency, and prompt caching

Answer the check-yourself questions to unlock this