L3 Dashboard Pages

Auto-registered dashboard pages for workflow monitoring and bot health status

L3 dashboard pages provide workflow monitoring and system health status that auto-register when using the integrated host configuration.

Diagram

L3 Dashboard Pages

📋 User Request

⚙️ L3 Dashboard Pages

✅ Result

python
from praisonaiagents import Agent
from praisonai.integration import configure_host

agent = Agent(name="Assistant", instructions="Run workflows you can monitor in the dashboard")
configure_host(title="My Dashboard", agent=agent)

The user opens the dashboard in a browser; workflow runs and bot health pages update from live gateway data.

Diagram

L3 Dashboard Pages

📝 Open Dashboard

⚙️ Live Bridges

🤖 Agent / Gateway

✅ Live Pages

Dashboard Architecture

Diagram

L3 Dashboard Architecture

🖥️ Dashboard

🔄 Workflow Runs

🤖 Bot Health

🔗 Workflows Bridge

🔗 Gateway Bridge

📊 Live Data

📊 Status Data

Quick Start

  1. Configure Host with Pages

    The L3 pages auto-register when you configure the host:

    python
    from praisonaiagents import Agent
    from praisonai.integration import configure_host
    
    agent = Agent(
        name="Assistant",
        instructions="You are a helpful assistant"
    )
    
    configure_host(
        title="My Dashboard",
        style="dashboard",
        agents=[agent]
    )
  2. Access Dashboard Pages

    Navigate to the integrated UI to see the new pages:

    • Workflow Runs (/workflow-runs) – View workflow execution history
    • Bot Health (/bot-health) – Monitor gateway and channel status
    bash
    praisonai serve ui-gateway --port 8765
    # Open http://localhost:8765

How It Works

The L3 pages are automatically imported and registered during host configuration:

Diagram
DashboardData BridgeL3 Pagesconfigure_host()UserDashboardData BridgeL3 Pagesconfigure_host()Userconfigure_host()Import & RegisterSetup Data SourcesProvide Live DataView DashboardQuery DataReturn Results

Available Pages

Workflow Runs

The workflow runs page displays execution history and status for all workflows:

FeatureDescription
Route/workflow-runs
Icon🔄
Data Sourcepraisonai.integration.bridges.workflows_service
StatusLive data when bridge available, stub otherwise

Bot Health

The bot health page shows gateway and channel connection status:

FeatureDescription
Route/bot-health
Icon🤖
Data SourceGateway reference via praisonaiui.features._gateway_ref
StatusReal-time when gateway active

Configuration

The pages automatically configure based on available bridges and services:

python
from praisonai.integration import configure_host

# Basic configuration (pages auto-register)
configure_host(
    title="Agent Dashboard",
    style="dashboard"
)

# Pages appear automatically in navigation
# No additional setup required

Data Sources

Workflow Bridge

python
# Automatically wired when available
from praisonai.integration.bridges.workflows_service import run_workflow

# Powers the Workflow Runs page
workflow_backend = lambda wf_id, **kwargs: run_workflow(
    wf_id, 
    input_text=kwargs.get("text", ""),
    workflow_config=kwargs.get("workflow")
)

Gateway Bridge

python
# Auto-detected from gateway reference
from praisonaiui.features._gateway_ref import get_gateway

gateway = get_gateway()
if gateway:
    # Powers Bot Health page
    status = {
        "gateway": "running",
        "agents": gateway.list_agents()
    }

Best Practices

Page Availability

The L3 pages gracefully handle missing dependencies:

python
# Canonical (post PR #3829 — matches praisonai_bot.integration.host_app):
try:
    from praisonai_bot.integration.pages import workflow_runs, bot_health
except ImportError:
    # Pages won't register when praisonai_bot is not installed — no error
    pass

# The pre-C9 path `praisonai.integration.pages.workflow_runs` still resolves
# via a backward-compat shim, so existing imports keep working unchanged.
Custom Data Sources

You can override the default backends for custom data:

python
import praisonaiui.backends as backends

# Custom workflow data source
def my_workflow_backend(wf_id, **kwargs):
    return {"custom": "workflow_data"}

backends.set_backend("workflows", my_workflow_backend)
Monitoring Integration

Connect the pages to your monitoring systems:

python
# Custom usage tracking
def usage_monitor(usage_data):
    # Send to your monitoring service
    send_to_datadog(usage_data)

backends.set_backend("usage_sink", usage_monitor)
Production Deployment

For production, ensure proper bridge configuration:

python
configure_host(
    title="Production Dashboard",
    style="dashboard",
    # Ensures all bridges are available
    agents=[production_agent],
    gateway=gateway_instance
)

Related