Yumi is equipped with tool-calling capabilities. When she needs to fetch external data or run a task, she can execute functional tools in the background before formulating her final spoken response.
🛠️ The Time Tool Example
Yumi's default system tool is get_current_time, which is loaded inside src/yumi/tools/ and exposed to the LLM agent registry inside llm.py.
How it operates under the hood:
- User Input: "Hey Yumi, what time is it?"
- LLM Decision: The model realizes it does not know the current time. It halts text generation and requests a function call:
get_current_time(). - Local Execution: Yumi's backend catches this request, runs the local Python utility (
datetime.now()), and returns the raw string time:15:15:32. - Final Response: The LLM consumes the time value, packages it inside the Pydantic
YumiResponsecontainer, and outputs:response_text: "It's exactly 3:15 PM! Hope your afternoon is going well."expression:"smile"motion:"nod"
Modifying Existing Tools
Tools are declared inside src/yumi/tools/ as standard LangChain structured tools. You can adjust parameters or update prompts easily.
To see how to write completely new custom tools (like weather checkers or computer controls), proceed to the Writing Custom Tools page!