Skip to content

Latest commit

 

History

History
125 lines (102 loc) · 4.52 KB

File metadata and controls

125 lines (102 loc) · 4.52 KB
description Extend Umbraco.AI with custom providers, middleware, and tools.

Extending Umbraco.AI

Umbraco.AI is designed to be extensible. You can add support for new AI providers, customize the request pipeline with middleware, and create custom tools for AI agents.

Extension Points

Custom Providers Add support for AI services not included out of the box
Middleware Add logging, caching, rate limiting, and custom behavior
Custom Tools Create tools that AI agents can use to perform actions
Agent Workflows Create multi-agent orchestration workflows for orchestrated agents
Custom Guardrail Evaluators Create evaluators for domain-specific safety and compliance rules
Notifications Subscribe to entity lifecycle events for validation and automation

When to Extend

Create a Custom Provider When

  • You need to connect to an AI service without an existing provider
  • You want to use a self-hosted AI model
  • You need custom authentication or API handling

Create Middleware When

  • You want to log all AI requests and responses
  • You need to cache responses for identical requests
  • You want to add rate limiting or retry logic
  • You need to modify requests or responses globally

Create Custom Tools When

  • You want AI agents to interact with your systems
  • You need to expose business logic to AI
  • You want to enable AI to query databases or APIs

Create Agent Workflows When

  • You need multi-agent orchestration (e.g., writer + editor pipelines)
  • You want to compose agents into sequential or parallel workflows
  • You need custom agent collaboration patterns

Subscribe to Notifications When

  • You need to validate operations before they execute
  • You want to audit changes for compliance
  • You need to trigger automation in response to events
  • You want to maintain data consistency across systems

Architecture Overview

┌─────────────────────────────────────────────────────────────┐
│                        Your Code                            │
│         IAIChatService / IAIEmbeddingService                │
└─────────────────────────────────────────────────────────────┘
                              │
                              ▼
┌─────────────────────────────────────────────────────────────┐
│                     Middleware Pipeline                     │
│    [Your Middleware] → [Logging] → [Caching] → ...          │
└─────────────────────────────────────────────────────────────┘
                              │
                              ▼
┌─────────────────────────────────────────────────────────────┐
│                        Provider                             │
│         OpenAI / Azure / [Your Provider]                    │
└─────────────────────────────────────────────────────────────┘
                              │
                              ▼
                        AI Service API

In This Section

{% content-ref url="providers/README.md" %} Custom Providers {% endcontent-ref %}

{% content-ref url="middleware/README.md" %} Middleware {% endcontent-ref %}

{% content-ref url="tools/README.md" %} Custom Tools {% endcontent-ref %}

{% content-ref url="../../add-ons/agent/workflows.md" %} Agent Workflows {% endcontent-ref %}

{% content-ref url="notifications/README.md" %} Notifications {% endcontent-ref %}