🛠️ Tools & Functions
Tools, Functions, Pipes, Filters, and Pipelines execute arbitrary Python code on your server. This is by design—it's what makes them powerful. However, this also means:
-
Only install from trusted sources. Never import Tools or Functions from unknown or untrusted sources. Malicious code can compromise your entire system.
-
Review code before importing. Before installing any community Tool or Function, review its source code. If you don't understand what it does, don't install it.
-
Protect your data directory. The
datadirectory (mounted at/app/backend/datain Docker) contains your database, configurations, and cached Tools/Functions. If an attacker gains write access to this directory, they can inject malicious code that will execute on your server. -
Restrict Workspace access. Only trusted administrators should have permission to create, import, or modify Tools and Functions. Regular users should not have Workspace access unless explicitly required.
-
Audit installed plugins regularly. Periodically review the Tools and Functions installed in your instance via Workspace → Tools and Admin Panel → Functions.
What could go wrong? A malicious Tool or Function could exfiltrate data, install malware, mine cryptocurrency, pivot to other systems on your network, or corrupt your instance.
TL;DR
- Tools extend the abilities of LLMs, allowing them to collect real-world, real-time data like weather, stock prices, etc.
- Functions extend the capabilities of the Open WebUI itself, enabling you to add new AI model support (like Anthropic or Vertex AI) or improve usability (like creating custom buttons or filters).
- Pipelines are more for advanced users who want to transform Open WebUI features into API-compatible workflows—mainly for offloading heavy processing.
Getting started with Tools and Functions is easy because everything’s already built into the core system! You just click a button and import these features directly from the community, so there’s no coding or deep technical work required.
What are "Tools" and "Functions"?
Let's start by thinking of Open WebUI as a "base" software that can do many tasks related to using Large Language Models (LLMs). But sometimes, you need extra features or abilities that don't come out of the box—this is where tools and functions come into play.
Tools
Tools are an exciting feature because they allow LLMs to do more than just process text. They provide external abilities that LLMs wouldn't otherwise have on their own.
Example of a Tool:
Imagine you're chatting with an LLM and you want it to give you the latest weather update or stock prices in real time. Normally, the LLM can't do that because it's just working on pre-trained knowledge. This is where tools come in!
- Tools are like plugins that the LLM can use to gather real-world, real-time data. So, with a "weather tool" enabled, the model can go out on the internet, gather live weather data, and display it in your conversation.
Tools are essentially abilities you’re giving your AI to help it interact with the outside world. By adding these, the LLM can "grab" useful information or perform specialized tasks based on the context of the conversation.
Examples of Tools (extending LLM’s abilities):
- Real-time weather predictions 🛰️.
- Stock price retrievers 📈.
- Flight tracking information ✈️.
Functions
While tools are used by the AI during a conversation, functions help extend or customize the capabilities of Open WebUI itself. Imagine tools are like adding new ingredients to a dish, and functions are the process you use to control the kitchen! 🚪
Let's break that down:
- Functions give you the ability to tweak or add features inside Open WebUI itself.
- You’re not giving new abilities to the LLM, but instead, you’re extending the interface, behavior, or logic of the platform itself!
For instance, maybe you want to:
- Add a new AI model like Anthropic to the WebUI.
- Create a custom button in your toolbar that performs a frequently used command.
- Implement a better filter function that catches inappropriate or spammy messages from the incoming text.
Without functions, these would all be out of reach. But with this framework in Open WebUI, you can easily extend these features!
Where to Find and Manage Functions
Functions are not located in the same place as Tools.
- Tools are about model access and live in your Workspace tabs (where you add models, prompts, and knowledge collections). They can be added by users if granted permissions.
- Functions are about platform customization and are found in the Admin Panel. They are configured and managed only by admins who want to extend the platform interface or behavior for all users.