Always write tests for new features. If you implement something, write a corresponding test.
Always use the repo's .venv when running commands or tests. Activate it or call .venv/bin/python / .venv/bin/pytest directly.
Run specific tests, not the full suite. Target only the tests relevant to your changes:
# Run a single test file
pytest tests/test_action_extractor_filter.py -v
# Run a specific test function
pytest tests/test_history_logging.py::test_function_name -vIf you find untested features, write tests for them.
Always update the README.md and AGENTS.md files to reflect the changes you make.
pyproject.tomlpins the direct runtime dependencies.requirements.lockcaptures the full reference environment; refresh withpip freezewhen the venv changes.- The distribution name for installs is
pipecat-thin(repo name remainsllm-actor).
Action extraction updates that affect transcript/TTs behavior should be covered in tests/test_action_extractor_filter.py, tests/test_reasoning_trace_filter.py, and tests/test_macos_say_tts.py.
Action extraction suppresses action-adjacent commas/colons/semicolons in spoken output to avoid TTS reading stray punctuation.
tests/— Unit tests (action extractor, streaming, history)src/tests/— Integration tests (API readiness, full pipeline)
COFFEE_MACHINE/keepalive_stability.pyrandomizes cycle intervals between 1 and 20 minutes unless--interval-secondsis provided.COFFEE_MACHINE/boot.pysetspipeline.history_on_idletoresetso idle timeouts clear conversation history.COFFEE_MACHINE/boot.pystarts in listening mode while still pausing STT on idle by settingpipeline.pause_stt_on_idletoTrueandpipeline.start_stt_mutedtoFalse.COFFEE_MACHINE/boot.pysetsllm.thinking_leveltoMINIMALfor Gemini models.- Idle history resets clear the active LLM context so the next turn starts fresh.
COFFEE_MACHINE/boot.pylaunchesCOFFEE_MACHINE/arduino_bridge.pyto connect to the Arduino.- The bridge appends mapped button presses to
runtime/coffee_machine_buttons.txt. - Button press lines use the
[VISITOR PUSHED ... BUTTON]wording to match the prompt templates. - The bridge watches
runtime/coffee_machine_commands.txtfor<Make_Coffee>and sends the0/7/5/*serial sequence. pyserialis required for hardware IO.
- Coffee machine prompts live in
COFFEE_MACHINE/prompts/with the default profile atCOFFEE_MACHINE/prompts/venues/default.json. - Select a venue with
COFFEE_MACHINE_VENUE/COFFEE_MACHINE_PROMPT_FILEorCOFFEE_MACHINE/boot.py --venue/--prompt-file. - Use
template_nameforCOFFEE_MACHINE/prompts/templates/<name>.txtorprompt_templatefor an explicit template path. - Override templates separately with
COFFEE_MACHINE_TEMPLATE_NAME/COFFEE_MACHINE_TEMPLATE_FILEorCOFFEE_MACHINE/boot.py --template-name/--template-file. - Example copies:
COFFEE_MACHINE/prompts/venues/HNI.json(New Institute) andCOFFEE_MACHINE/prompts/templates/no_output.txt. {clean_time}in templates is refreshed right before each LLM request.
- Anthropic models use
llm.modelprefixed withanthropic-(for exampleanthropic-claude-3-5-sonnet-20241022) and requireANTHROPIC_API_KEY. - OpenAI models use
llm.modelprefixed withopenai-(for exampleopenai-gpt-5.2-chat-latest) and requireOPENAI_API_KEY. - OpenAI requests map
llm.max_tokenstomax_completion_tokensfor newer chat models. - Gemini
llm.thinking_levelis applied when supported bygoogle-genai;MINIMALmaps tothinking_budget=0on older versions.