Relevance
SQL Agent

SQL Agent

agent Agent

Tools

HTML to PNG

Description

An expert data analyst to help you analyse the DB

Clones

Clone
61

Example Task

Give me a detailed 30‑day report across all agent runs, filtering by the following conditions:

  • Status: completed or took_action
  • Time window: last 30 days
  • Users must have non‑empty emails
  • Runs must have at least one user message
  • Includes counts of user messages, agent messages, and actions
  • Includes last action type + timestamp per run
  • Sorted by most recent run, limited to 100 runs
SQL Agent
execute_sql
SQL Agent

SQL Agent

provided an update

Here’s your 30‑day report based on all agent runs that match your criteria.

Query (for reference)

WITH recent_runs AS (
  SELECT ar.*
  FROM agent_run ar
  WHERE ar.status IN ('completed', 'took_action')
    AND ar.created_at >= NOW() - INTERVAL '30 days'
),
runs_with_user_messages AS (
  SELECT DISTINCT arm.agent_run_id
  FROM agent_run_user_message arm
),
message_counts AS (
  SELECT 
    ar.id AS agent_run_id,
    COUNT(DISTINCT urm.id) AS user_message_count,
    COUNT(DISTINCT arm.id) AS agent_message_count
  FROM recent_runs ar
  LEFT JOIN agent_run_user_message urm ON urm.agent_run_id = ar.id
  LEFT JOIN agent_run_message arm ON arm.agent_run_id = ar.id
  GROUP BY ar.id
),
action_stats AS (
  SELECT 
    ara.agent_run_id,
    COUNT(*) AS action_count,
    MAX(ara.created_at) AS last_action_at
  FROM agent_run_action ara
  GROUP BY ara.agent_run_id
),
last_action_detail AS (
  SELECT DISTINCT ON (ara.agent_run_id)
    ara.agent_run_id,
    aa.name AS last_action_name,
    ara.created_at AS last_action_at
  FROM agent_run_action ara
  JOIN agent_action aa ON aa.id = ara.agent_action_id
  ORDER BY ara.agent_run_id, ara.created_at DESC
)
SELECT 
  ar.id AS agent_run_id,
  ar.created_at,
  ar.updated_at,
  ar.status,
  u.id AS user_id,
  u.email AS user_email,
  u.name AS user_name,
  ag.id AS agent_id,
  ag.name AS agent_name,
  mc.user_message_count,
  mc.agent_message_count,
  COALESCE(ast.action_count, 0) AS action_count,
  lad.last_action_name,
  lad.last_action_at
FROM recent_runs ar
JOIN runs_with_user_messages rwm ON rwm.agent_run_id = ar.id
JOIN "user" u ON u.id = ar.user_id AND COALESCE(NULLIF(TRIM(u.email), ''), NULL) IS NOT NULL
JOIN agent ag ON ag.id = ar.agent_id
LEFT JOIN message_counts mc ON mc.agent_run_id = ar.id
LEFT JOIN action_stats ast ON ast.agent_run_id = ar.id
LEFT JOIN last_action_detail lad ON lad.agent_run_id = ar.id
ORDER BY ar.created_at DESC
LIMIT 100;

30‑Day Run‑Level Report (top 100 runs, most recent first)

# agent_run_id created_at (UTC) updated_at (UTC) status user_name user_email agent_name user_msgs agent_msgs actions last_action_name last_action_at (UTC)
1 ID456 2025-11-27 01:56:59.095+00 2025-11-27 02:03:56.608+00 completed John Doe user@example.com Acme Bot 3 10 0 null null
2 ID456 2025-11-27 01:36:11.899+00 2025-11-27 01:39:41.437+00 completed Jane Smith user@example.com Acme Bot 2 6 2 create_spreadsheet 2025-11-27 01:39:34.57+00
3 ID456 2025-11-27 00:59:32.533+00 2025-11-27 01:03:35.575+00 completed John Doe user@example.com Acme Bot 4 6 0 null null
4 ID456 2025-11-27 00:50:29.35+00 2025-11-27 00:51:35.148+00 completed Jane Smith user@example.com Acme Bot 6 10 0 null null
5 ID456 2025-11-27 00:42:48.409+00 2025-11-27 00:49:53.109+00 completed John Doe user@example.com Acme Bot 5 7 0 null null
6 ID456 2025-11-27 00:42:00.785+00 2025-11-27 00:46:36.683+00 took_action Jane Smith user@example.com Acme Bot 5 8 1 generate_report 2025-11-27 00:43:03.46+00
7 ID456 2025-11-27 00:26:11.978+00 2025-11-27 00:27:27.748+00 completed John Doe user@example.com Acme Bot 7 3 0 null null
8 ID456 2025-11-26 23:31:22.543+00 2025-11-26 23:40:09.835+00 completed Jane Smith user@example.com Acme Bot 4 5 0 null null
9 ID456 2025-11-26 21:49:59.011+00 2025-11-26 21:55:25.795+00 completed John Doe user@example.com Acme Bot 6 8 2 generate_report 2025-11-26 21:53:39.596+00
10 ID456 2025-11-26 21:24:16.305+00 2025-11-26 21:27:06.42+00 completed Jane Smith user@example.com Acme Bot 6 4 0 null null

…results continue through a total of 100 runs (you already have the full JSON payload; I’ve truncated here for readability).

Each row includes:

  • Run metadata: agent_run_id, created_at, updated_at, status
  • User info: user_id, user_name, user_email (non‑empty only)
  • Agent info: agent_id, agent_name
  • Message counts: user_message_count, agent_message_count
  • Action stats: total action_count, plus last_action_name and last_action_at (null if no actions)

Sanity checks against your requirements

  • Status filter: only completed and took_action runs are included.
  • Time window: created_at is within the last 30 days (relative to the DB NOW()).
  • Users with emails: joined only on users with non‑blank email.
  • At least one user message: enforced via runs_with_user_messages.
  • Counts and last action: computed via message_counts, action_stats, and last_action_detail.
  • Sorting & limit: ordered by created_at descending, limited to 100 runs.

If you’d like, I can next:

  • Add a summary section (totals, averages, per‑agent breakdowns) over this 30‑day window, and/or
  • Generate chart HTML (e.g., runs per agent, average messages per run, actions by type) you can drop into a dashboard or convert to PNG.

Turn your raw platform data into instant, board-ready insights with this AI SQL Analyst Agent that automatically translates plain-English questions into optimized queries, clean tables, and compelling visual reports. Perfect for growth, product, and ops teams, it uncovers trends, user behavior, and agent performance in seconds—no SQL expertise required.

How to use this SQL Agent

This assistant helps you analyze your AI agent platform data using plain English. You ask business questions (e.g. “Top agents by completed runs last 7 days?”), and it turns them into SQL, runs them on your Postgres database, and returns clean tables (and charts if you ask).

How to connect your agent to your data

You can connect your database in two main ways:

  1. MCP database tool (preferred)

Configure an MCP “database” tool with your Postgres connection (host, port, database, user, password, SSL). Use a read‑only analytics user with SELECT on your tables. Once configured, just ask questions like “Show daily runs by status for the last 30 days” and I’ll query live data and respond with results.

  1. Postgres: SQL query tool

Configure this tool with the same Postgres connection. Then use me as a SQL generator: say “Generate SQL (don’t execute) to compute error rate per agent over the past month.” I’ll return an optimized query you paste into the Postgres tool yourself. You can bring results back here for interpretation or chart generation.

You don’t need to know SQL; you just describe what you want analyzed. I handle query design, debugging, and summarizing insights.

You might also like

Flux, the Universal Flow Diagram Generator
HTML/CSS to Image - Create Image From HTML
WorkFlowDiagramGen
Mistral OCR

Flux, the Universal Flow Diagram Generator

agent Agent
Clone
0

Flux – Universal Flow Diagram Generator Executive Description (Relevance Marketplace) Flux is an AI-assisted workflow analysis and diagram design tool that helps organizations convert process descriptions, system logic, and operational flows into clear, structured workflow representations and supporting documentation. Designed for use within the Relevance Marketplace, Flux enables teams to describe how a process works and receive consistent, readable outputs that improve understanding, communication, and documentation quality across business and technical audiences. Flux focuses on interpretation, structuring, and clarity—not automated decision-making or execution—making it suitable for planning, documentation, review, and knowledge-sharing use cases. Key Features Flexible Input Support Accepts structured or unstructured descriptions of: Business processes System workflows User journeys Decision logic Data and operational flows Flux analyzes the input and organizes it into a normalized workflow structure. Text-Based Diagram Descriptions Generates precise, tool-ready text descriptions of workflows that can be consumed by downstream flow diagram rendering tools (e.g., text-to-image or diagram drawers). Multiple Output Forms Diagram-ready textual specifications Email-safe ASCII workflow summaries Structured JSON flow models for automation or reuse High-level summaries for documentation or presentations Documentation-Oriented Design Produces outputs that support: Internal process documentation Design reviews Compliance discussions Knowledge transfer and onboarding Security-Aware Guidance (Advisory) Where relevant, Flux can include non-prescriptive best-practice considerations (e.g., access boundaries, approval points, and control steps) as part of workflow descriptions. Flux does not enforce security controls or perform compliance validation. Why Organizations Use Flux 1. Improve Process Clarity Flux helps teams express complex workflows in a consistent structure, reducing ambiguity and misinterpretation across technical and non-technical stakeholders. 2. Support Risk Awareness By making decision points, dependencies, and handoffs explicit, Flux assists teams in identifying operational risks, gaps, and bottlenecks during planning and review phases. 3. Save Documentation Time Flux reduces the manual effort required to draft workflow documentation, allowing teams to focus on refinement and execution rather than diagram construction. 4. Broad Accessibility Text-based outputs ensure workflows can be reviewed in emails, tickets, documents, and systems where visual rendering may not be available. 5. Native Fit for Relevance Marketplace Flux integrates naturally into agent-based workflows, enabling organizations to standardize how processes are described, reviewed, and handed off between tools and teams. Executive Summary Flux is a workflow interpretation and diagram-design assistant built for clarity, consistency, and documentation quality. By transforming process descriptions into structured, tool-ready representations, Flux helps organizations communicate how work gets done—clearly and reliably. For teams seeking a practical, scalable way to document workflows, support reviews, and improve shared understanding across the organization, Flux provides a focused and dependable solution within the Relevance Marketplace ecosystem.

tbigs
$5.99
PandaDoc Agent
PandaDoc - API Call

PandaDoc Agent

agent Agent
Clone
0

PandaDoc Agent – Automate Document Creation, Sending, and Tracking Streamline your document workflows with the PandaDoc Agent. Instantly create, manage, send, and track proposals, contracts, agreements, and more—directly within PandaDoc. Perfect for sales, legal, HR, and operations teams looking to save time, reduce errors, and accelerate deal cycles. 🚀 Key Features & Value Propositions Automated Document Creation from Templates Seamless Sending & Status Tracking Advanced Recipient & Contact Management Comprehensive Document Organization Custom API Actions & Error Handling 💼 Who Is This Agent For? Sales Teams: Automate proposals, quotes, and contracts to close deals faster Legal Departments: Streamline contract generation, approvals, and e-signatures HR Teams: Manage offer letters, onboarding documents, and agreements Operations & Admin: Organize, send, and track any client-facing or internal documents Anyone using PandaDoc who wants to eliminate manual document handling and reduce errors 📊 ROI (Output from One Run): A fully prepared, sent, and trackable PandaDoc document with all recipient and template details handled automatically. Immediate visibility into document status and next steps, reducing manual effort and turnaround time. Ready to automate your PandaDoc workflows and save hours every week?

Relevance AI
Free
Trello Project Manager
Trello - Archive Card

Trello Project Manager

agent Agent
Clone
0

A fully-featured Trello automation agent that handles end-to-end project management workflows — from setting up boards, lists, and labels, to creating and tracking cards, managing checklists, assigning members, searching across your workspace, and archiving completed work. Powered by all 28 Trello integrations. Here's a Loom video showing setup workflow. https://www.loom.com/share/2f01811e09ab466bb718c437aac73323

Relevance AI
Free