Functions
Functions are modular Python components that extend IntraLLM AI capabilities. They can add support for new model providers (e.g., Anthropic, Vertex AI), modify how messages are processed, and introduce interface actions such as custom buttons.
Unlike external integrations that may require separate services or complex deployment, Functions run inside the IntraLLM AI environment. This makes them fast, self-contained, and easier to maintain. Functions are written in pure Python and can be used to implement new AI-powered workflows or integrate with systems you already use (e.g., search APIs or home automation platforms).
Types of Functions
IntraLLM AI supports three Function types, each designed for a distinct role in the workflow.
1. Pipe Function
A Pipe Function creates a custom agent or integration that appears in the UI as a selectable model.
What it does:
- Composable workflows: route requests across multiple models, combine results, and return a unified response.
- Non-AI workflows: connect to external APIs (e.g., search, weather, automation systems) and return results as model-like outputs.
- Model-like experience: once enabled, Pipes appear as standalone models in the interface.
Use case example:
- Google Search integration
- Treats the user message as a search query
- Sends the query to a search API
- Processes the response and returns it as a normal model response in IntraLLM AI
2. Filter Function
A Filter Function modifies data before it is sent to a model and/or after a model returns a response.
What it does:
- Inlet: adjusts the input sent to the model (e.g., adds instructions, keywords, or formatting).
- Outlet: modifies the output returned to the user (e.g., cleans text, changes tone, enforces structure).
Use case example:
- Formatting enforcement
- Converts user input into a required format automatically
- Normalizes or reformats model output before display
Operational notes: Filters can be applied to specific models or enabled globally, depending on configuration.
3. Action Function
An Action Function adds custom buttons to the chat interface, typically under individual messages.
What it does:
- One-click actions: triggers a predefined function on a target message.
- UI shortcuts: provides consistent, user-friendly controls for frequent operations.
Use case example:
- Summarize button
- Adds a "Summarize" button under messages
- Clicking the button triggers the function and returns a summary as a response
How to Use Functions
1. Install Functions
Functions can be installed through the IntraLLM AI interface or imported manually. Community-contributed Functions may also be available via IntraLLM AI community resources.
Security note:
- Only install Functions from trusted sources. Functions run code within your environment and should be reviewed before production use.
2. Enable Functions
Functions must be explicitly enabled after installation.
- Pipe Functions: enabling makes the Pipe available as its own model in the UI.
- Filter and Action Functions: enabling is necessary, but you must also assign them to models or enable them globally.
3. Assign Filters or Actions to Models
- Assign at Workspace → Models by attaching Filters or Actions to a specific model, or
- Enable globally at Workspace → Functions using the per-function global toggle.
Quick Summary
- Pipes: appear as selectable models and can implement complex workflows or integrations.
- Filters: modify inputs and outputs to enforce format, tone, or structure.
- Actions: add UI buttons for common operations and one-click workflows.
Why Use Functions?
Functions enable controlled customization of IntraLLM AI:
- Extend: add new model backends or integrate APIs, databases, and automation platforms.
- Optimize: standardize inputs and outputs for specific business rules or formatting requirements.
- Simplify: improve usability with buttons and workflow shortcuts.
Notes
- Install Functions only from trusted sources.
- Choose the correct Function type (Pipe, Filter, Action) for your workflow.
Explore the official guides:
- Pipe Functions Guide
- Filter Functions Guide
- Action Functions Guide
By leveraging Functions, you’ll bring entirely new capabilities to your IntraLLM AI setup. Start experimenting today!