What you will learn
  • Explain a modular local assistant in plain language.
  • Trace information from input to output.
  • Test one subsystem independently.
  • Recognize a common failure and respond safely.
  • Modify the example without changing several variables at once.

The central idea: a modular local assistant

An assistant is a pipeline that receives text or speech, interprets an allowed request, calls a bounded tool, and returns a result. The language interface should not receive unlimited operating-system access.

Treat the system as a chain of observable inputs, explicit processing, a decision, and an output. That makes the design easier to explain and gives you a place to test when something fails. A working result is not enough: record what input produced it and what evidence shows the result is correct.

Follow the information through the system

Read the diagram from left to right. Each arrow is a boundary where data, electrical signals, or commands move between parts. Test those boundaries separately before combining the whole system.

A local text assistant recognizes a weather-sensor question, reads an approved data file, and summarizes the latest observation without executing arbitrary shell commands.

  • Start with typed input before audio.
  • Allowlist every tool and argument.
  • Require confirmation before external actions.
text or speech → intent/model → allowlisted tool → result → response

Parts and responsibilities

Use beginner-safe, low-voltage parts and confirm the exact pinout and voltage for your board revision. Disconnect power before changing wiring. Motors need a suitable driver and separate motor power; never draw motor current from a GPIO pin.

PartPurpose
Raspberry Pi 4 or 5 with approved power supplyRuns the assistant
microSD storage and network connectionStores the OS and installs software
Optional USB microphone and speakerAdds speech after text is tested

Test before you trust the result

Start with a normal case, then test a boundary case and a failure case. For software, try empty, unexpected, and extreme inputs. For hardware, begin with wheels raised or actuators disconnected, keep a physical power switch within reach, and verify safe stopping behavior.

Write down the expected result before each test. If the observation differs, stop and find the first boundary where the expected signal disappeared. This method is slower than changing many things at once, but it produces evidence instead of guesses.

  • Test one input with a known value.
  • Observe the intermediate value before the final action.
  • Confirm a safe response when input is missing or invalid.
  • Repeat the same test to check consistency.

Important terms

Intent
The goal inferred from a user's request.
Tool call
A structured request for a program to perform an action.
Allowlist
An explicit set of permitted operations.
Confirmation
A user approval required before a consequential action.
Audit log
A record of requests, decisions, and tool results.

Mini project: prototype a modular local assistant

  1. Define three allowed requests.
  2. Write one function per tool.
  3. Reject an unknown request.
  4. Log the decision.
  5. Test a request that needs confirmation.

Common mistakes and debugging

  • Giving the model unrestricted shell access.
  • Adding microphones before text works.
  • Logging private content unnecessarily.
  • Treating generated parameters as trusted.

Independent challenge

Add a timer tool that accepts only 1–30 minutes and explain how invalid values are rejected.

Check your understanding: 10 questions

  1. What is the main purpose of a modular local assistant?

  2. What does “Intent” mean in this lesson?

  3. How is “Tool call” used?

  4. Why should you test one boundary or subsystem at a time?

  5. What should the system do when an input is missing or invalid?

  6. In your own words, what does “Intent” mean?

  7. In your own words, what does “Tool call” mean?

  8. In your own words, what does “Allowlist” mean?

  9. In your own words, what does “Confirmation” mean?

  10. In your own words, what does “Audit log” mean?

Quiz answers

Reveal all 10 answers after your attempt
  1. An assistant is a pipeline that receives text or speech, interprets an allowed request, calls a bounded tool, and returns a result. The language interface should not receive unlimited operating-system access.
  2. The goal inferred from a user's request.
  3. A structured request for a program to perform an action.
  4. It reveals where the expected value or behavior first changes, so debugging is based on evidence.
  5. It should reject the input, report the problem, or move to a documented safe state instead of guessing.
  6. The goal inferred from a user's request.
  7. A structured request for a program to perform an action.
  8. An explicit set of permitted operations.
  9. A user approval required before a consequential action.
  10. A record of requests, decisions, and tool results.

Summary

a modular local assistant becomes manageable when you identify the input, processing, decision, output, and evidence of success. Build the smallest version, test it, then make one measured change.

Continue learning

Continue to the next lesson, which builds on this model with one additional capability.

Choose a connected learning path

Sources and further reading

Prepared 2026-10-02. Editorially completed for the course. Software examples are designed for current Python 3; verify board, operating-system, library, and hardware details against the linked primary documentation before a physical build.