Skip to main content

๐Ÿ› ๏ธ Tools & Functions

โš ๏ธ Critical Security Warning

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:

  1. Only install from trusted sources. Never import Tools or Functions from unknown or untrusted sources. Malicious code can compromise your entire system.

  2. 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.

  3. Protect your data directory. The data directory (mounted at /app/backend/data in 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.

  4. 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.

  5. 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.

The plugin system is more capable than these docs can show

The pages that follow document the full plugin API surface: class shapes, lifecycle methods, arguments, event types, return contracts and every hook into the pipeline. The reference is complete.

What these docs cannot cover is the range of things people actually build with it. Community plugins have been used for live-streaming HTML dashboards, per-user cost enforcement, context managers that summarize and replace older turns, bidirectional interactive UIs, in-chat MCP apps, forensic watermarking and much more.

If you are considering a feature request and thinking "this needs a core change," first ask whether it can be done as a plugin. The plugin system has access to the full request/response lifecycle, persistent state, user metadata, the event emitter and the admin-configurable valves system. In practice, most features that feel like they need core changes (custom authentication logic, per-user rate limiting, response post-processing, provider-specific routing, cost tracking, context management strategies) can be implemented entirely as a plugin without touching the core codebase. Filing a plugin on the community site also means other users benefit immediately, without waiting for a release cycle.

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):โ€‹

  1. Real-time weather predictions ๐Ÿ›ฐ๏ธ.
  2. Stock price retrievers ๐Ÿ“ˆ.
  3. 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:

  1. Add a new AI model like Anthropic to the WebUI.
  2. Create a custom button in your toolbar that performs a frequently used command.
  3. 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.

Summary of Differences:โ€‹

  • Tools are things that allow LLMs to do more things outside their default abilities (such as retrieving live info or performing custom tasks based on external data).
  • Functions help the WebUI itself do more things, like adding new AI models or creating smarter ways to filter data.

Both are designed to be pluggable, meaning you can easily import them into your system with just one click from the community! ๐ŸŽ‰ You wonโ€™t have to spend hours coding or tinkering with them.

What are Pipelines?โ€‹

And then, we have Pipelinesโ€ฆ Hereโ€™s where things start to sound pretty technicalโ€”but donโ€™t despair.

Pipelines are part of an Open WebUI initiative focused on making every piece of the WebUI inter-operable with OpenAIโ€™s API system. Essentially, they extend what both Tools and Functions can already do, but now with even more flexibility. They allow you to turn features into OpenAI API-compatible formats. ๐Ÿง 

But hereโ€™s the thingโ€ฆโ€‹

You likely won't need pipelines unless you're dealing with super-advanced setups.

  • Who are pipelines for? Typically, experts or people running more complicated use cases.
  • When do you need them? If you're trying to offload processing from your primary Open WebUI instance to a different machine (so you donโ€™t overload your primary system).

In most cases, as a beginner or even an intermediate user, you wonโ€™t have to worry about pipelines. Just focus on enjoying the benefits that tools and functions bring to your Open WebUI experience!

Want to Try? ๐Ÿš€โ€‹

Jump into Open WebUI, head over to the community section, and try importing a tool like weather updates or maybe adding a new feature to the toolbar with a function. Exploring these tools will show you how powerful and flexible Open WebUI can be!

๐ŸŒŸ There's always more to learn, so stay curious and keep experimenting!

This content is for informational purposes only and does not constitute a warranty, guarantee, or contractual commitment. Open WebUI is provided "as is." See your license for applicable terms.