Skip to main content
Wire your own backend services into PraisonAIUI using the dependency injection API for custom data sources and business logic. The user wires custom services into PraisonAIUI; the agent streams responses while injected backends supply data and hooks.

How It Works

A UI page calls the agent, which resolves the injected backend to fetch data before responding.

Choose a Backend

Pick which backend key to override based on the service you are wiring in.

Quick Start

1

Auto-wire Default Backends

Let bridges auto-configure available services:
2

Custom Backend Override

Replace specific backends with your implementations:

Available Backend Keys

The injection API supports these standard backend keys:

Backend Interfaces

Hooks Backend

List registered hooks for UI consumption:

Workflows Backend

Execute YAML-driven workflows:

Usage Tracking Backends

Wire custom analytics services:

Approvals Backends

Integrate with approval workflow systems:

Auto-wired Bridges

The setup_bridges() function automatically wires available services:

Custom Integration Example

Complete example integrating with external systems:

Backend Discovery

Check what backends are currently registered:

Error Handling

Backends should handle errors gracefully:

Best Practices

Let auto-wiring handle standard cases, override specific backends:
Handle missing external services gracefully:
Backends are called frequently - keep them fast and stateless:

Host Integration

Main integration module

L3 Dashboard Pages

Auto-registered pages backed by custom backends
L3 dashboard pages can be backed by custom backends via set_backend(). For example, set a custom "workflows" backend to power the Workflow Runs page with your own data.