Gregius Data – Abilities API

Overview

AI agents and automation tools need a contract — not a conversation. The WordPress Abilities API (WP 6.9+) provides exactly that: a central registry where functional capabilities are defined, permissioned, and discoverable through a single REST endpoint.

Gregius Data registers its full engine surface — RAG pipeline, data connections, and model inventory — as three discrete abilities. Each ability maps to a machine-readable tool contract that AI agents can discover via GET /wp-json/wp-abilities/v1/abilities and invoke with well-defined inputs. Site administrators control which engine capabilities are exposed and who can call them.

By the end of this page, you will know what abilities Gregius Data exposes, how to configure data connections, browse available models, and run AI-powered site searches through a single standardized interface.

Prerequisites

  • WordPress 6.9+ with Gregius Data plugin installed and activated
  • At least one AI model registered and active on the site
  • At least one data connection configured and active

Understanding Abilities

Each ability is a discrete unit of functionality — namespace, name, JSON Schema inputs and outputs, a permission callback, and a category assignment — all discoverable through a single REST endpoint.

Gregius Data registers three abilities that expose its engine capabilities:

AbilityDescriptionCategoryPermission
gregius-data/answerSearches site content via the RAG pipeline and returns an answer with sourcesairead
gregius-data/list-connectionsReturns configured data connections with optional embedding model contextaimanage_options
gregius-data/list-modelsReturns registered AI models with optional type filteringaimanage_options

WordPress Core ships additional abilities in WP 6.9 — core/get-site-info, core/get-user-info, and core/get-environment-info — following the same contract pattern and exposed through the same REST endpoint.


How to: Configure Data Connections

Data connections tell the AI which data sources it can search. Each connection links to a database or API. Think of connections as instrument sections in an orchestration: individually tuned, collectively ready for performance. They surface through the gregius-data/list-connections ability.

View connections

Listing your connections returns four fields per entry:

  • Name — A label identifying the connection
  • Type — The data source type (PostgreSQL database or Supabase-style REST API)
  • Description — What data this connection provides
  • Active status — Whether the connection is currently enabled
{
  "include_embedding_models": false,
  "include_model_details": false
}
Success!
{
  "message": "Ability invoked successfully.",
  "data": {
    "connections": [
      {
        "name": "gregius-data-wordpress",
        "type": "postgrest",
        "description": "",
        "is_active": true
      }
    ]
  }
}

Get optional details

Request additional detail per connection to surface the models powering it:

  • Embedding model overview — Which embedding model keys are active and how many
  • Full model details — Model ID, type, provider, label, active status, and optional dimensions or description
{
  "include_embedding_models": true,
  "include_model_details": true
}
Success!
{
  "message": "Ability invoked successfully.",
  "data": {
    "connections": [
      {
        "name": "gregius-data-wordpress",
        "type": "postgrest",
        "description": "",
        "is_active": true,
        "embedding_models": {
          "active_keys": [
            "text-embedding-3-small",
            "tfidf-300",
            "hashingtf-murmur3-1024"
          ],
          "active_count": 3,
          "active": [
            {
              "id": "text-embedding-3-small",
              "type": "embeddings",
              "provider": "openai",
              "label": "",
              "is_active": true,
              "dimensions": 1536,
              "provider_model_id": "text-embedding-3-small"
            },
            {
              "id": "tfidf-300",
              "type": "embeddings",
              "provider": "internal",
              "label": "",
              "is_active": true,
              "dimensions": 300,
              "provider_model_id": "tfidf-300"
            },
            {
              "id": "hashingtf-murmur3-1024",
              "type": "embeddings",
              "provider": "internal",
              "label": "",
              "is_active": true,
              "dimensions": 1024,
              "provider_model_id": "hashingtf-murmur3-1024"
            }
          ]
        }
      }
    ]
  }
}

Tips

  • Use connection names found here as valid inputs for AI Site Search
  • Connections can be database-backed (PostgreSQL) or API-backed (Supabase-style REST)

How to: Browse Available AI Models

AI models power search, answers, and relevance ranking. Different model types handle different tasks. The gregius-data/list-models ability surfaces your full model inventory with type filtering — use it before running searches to confirm which models are active and available.

View all models

Each model displays:

  • ID — Unique identifier
  • Type — What it is used for (embeddings, LLM, rerank)
  • Provider — Where the model comes from
  • Label — Display name
  • Active status — Whether the model is enabled
  • Description — What it does (if available)
  • Dimensions — Technical reference (if applicable)
{
    "type": ""
}
Success!
{
  "message": "Ability invoked successfully.",
  "data": {
    "models": [
      {
        "id": "hashingtf-murmur3-1024",
        "type": "embeddings",
        "provider": "internal",
        "label": "hashingtf-murmur3-1024",
        "is_active": true,
        "dimensions": 1024
      },
      {
        "id": "text-embedding-3-small",
        "type": "embeddings",
        "provider": "openai",
        "label": "text-embedding-3-small",
        "is_active": true,
        "dimensions": 1536
      },
      {
        "id": "tfidf-300",
        "type": "embeddings",
        "provider": "internal",
        "label": "tfidf-300",
        "is_active": true,
        "dimensions": 300
      },
      {
        "id": "deepseek-reasoner",
        "type": "llm",
        "provider": "deepseek",
        "label": "deepseek-reasoner",
        "is_active": true
      },
      {
        "id": "gpt-4o",
        "type": "llm",
        "provider": "openai",
        "label": "gpt-4o",
        "is_active": true
      },
      {
        "id": "gpt-4o-mini",
        "type": "llm",
        "provider": "openai",
        "label": "gpt-4o-mini",
        "is_active": true
      },
      {
        "id": "rerank-v4.0-fast",
        "type": "rerank",
        "provider": "cohere",
        "label": "rerank-v4.0-fast",
        "is_active": true
      }
    ]
  }
}

Filter by type

Narrow the list by model type:

  • embeddings — Convert text into searchable vectors
  • llm — Language models that generate answers
  • rerank — Improve result relevance
{
  "type": "embeddings"
}
Success!
{
  "message": "Ability invoked successfully.",
  "data": {
    "models": [
      {
        "id": "hashingtf-murmur3-1024",
        "type": "embeddings",
        "provider": "internal",
        "label": "hashingtf-murmur3-1024",
        "is_active": true,
        "dimensions": 1024
      },
      {
        "id": "text-embedding-3-small",
        "type": "embeddings",
        "provider": "openai",
        "label": "text-embedding-3-small",
        "is_active": true,
        "dimensions": 1536
      },
      {
        "id": "tfidf-300",
        "type": "embeddings",
        "provider": "internal",
        "label": "tfidf-300",
        "is_active": true,
        "dimensions": 300
      }
    ]
  }
}

Tips

  • Use valid model IDs found here when configuring AI Site Search
  • Models are listed from your global registry, not per-connection storage

Ask a question about your site’s content through the gregius-data/answer ability. It orchestrates the full RAG pipeline — search, retrieval, reranking, and answer generation — returning a response with supporting source references. A well-tuned search is the difference between a generic reply and a precise, sourced answer.

What you need

Before asking a question:

  • A data connection configured and active
  • An embedding model for search
  • An answer model for generating responses
  • Optionally, a rerank model for improved relevance

Required inputs

InputWhat it isExample
QueryYour question“What features does the Pro plan include?”
Connection nameThe data source to search“docs-database”
Embedding modelModel for searching“text-embedding-3-small”
Answer modelModel for generating the response“gpt-4o-mini”
{
  "query": "What is WordPress",
  "connection_name": "gregius-data-wordpress",
  "embedding_model": "hashingtf-murmur3-1024",
  "agentic_model": "gpt-4o-mini",
  "rerank_model": "rerank-v4.0-fast",
  "answer_model": "gpt-4o-mini",
  "messages": []
}

What you get back

  • Answer — A generated response to your question
  • Sources — References showing where the information came from
  • Metadata — Information about the search and generation process
//Success!
{
  "message": "Ability invoked successfully.",
  "data": {
    "answer": "WordPress is a free, open-source web publishing software project that allows users to create and manage websites. It is often referred to as \"WordPress.org\" or \"self-hosted WordPress\" to distinguish it from WordPress.com, which is a hosted blogging service run by Automattic. WordPress was launched in 2003 as a fork of b2/cafelog and is licensed under the GPL, meaning users can use it without restrictions. You can download and install WordPress on any web host, and it is designed to be flexible and customizable for various types of websites [Source 1].",
    "sources": [
      {
        "post_id": 365,
        "title": "What’s the difference between WordPress.org and WordPress.com?",
        "url": "https://gregius.local/wordpress/article/difference-between-wordpress-org-and-wordpress-com/",
        "score": 0.69230926
      },
      {
        "post_id": 369,
        "title": "WordPress Glossary",
        "url": "https://gregius.local/wordpress/article/wordpress-glossary/",
        "score": 0.5866176
      }
    ],
    "chunks": [
      {
        "post_id": 365,
        "chunk_index": 0,
        "title": "What’s the difference between WordPress.org and WordPress.com?",
        "content": "WordPress vs. WordPress.com People are often confused about the differences between WordPress and WordPress.com. WordPress is the free, Open Source web publishing software project, owned by no one individual or company. WordPress.com is a hosted blogging service run by a company called Automattic.",
        "excerpt": "WordPress vs. WordPress.com People are often confused about the differences between WordPress and WordPress.com. WordPress is the free, Open Source web publishing software project, owned by no one individual or…",
        "url": "https://gregius.local/wordpress/article/difference-between-wordpress-org-and-wordpress-com/",
        "score": 0.69230926,
        "post_score": 0.0294624,
        "chunk_score": 1,
        "rerank_score": 0.69230926,
        "match_type": "hybrid_chunk",
        "selection_stage": "final",
        "tokens": 486,
        "original_score": 0.0294624
      }
    ],
    "metadata": {
      "chunks_used": 6,
      "embedding_model": "hashingtf-murmur3-1024",
      "llm_model": "gpt-4o-mini",
      "connection": "gregius-data-wordpress",
      "execution_time": 30912,
      "usage": {
        "prompt_tokens": 5371,
        "completion_tokens": 123,
        "total_tokens": 5494
      },
      "provider": "openai",
      "model_used": "gpt-4o-mini-2024-07-18",
      "conversation_id": "0370ba2a-cf04-4c41-a8bc-7132d4ef36e0",
      "source": {
        "type": "mcp"
      }
    }
  }
}

Troubleshooting

Problem: “Missing query” error
Fix: Include a question in your request

Problem: Answer does not seem accurate
Fix: Verify your data connection includes the expected content. Try adding a rerank model.

Problem: Answer not appearing at all
Fix: Check that the Abilities API is active on your WordPress installation. Verify Gregius Data is installed and activated.


Permissions

AbilityIDWho can use it
AI Site Searchgregius-data/answerAny logged-in user with read access
Data Connectionsgregius-data/list-connectionsAdministrators only
AI Modelsgregius-data/list-modelsAdministrators only

Frequently Asked Questions

A WordPress Core API (WP 6.9+) that registers functional capabilities as machine-discoverable contracts with defined inputs, outputs, and permissions.

AI Site Search is available to any logged-in user with read access. Data connections and model listing require administrator privileges.

Use the gregius-data/list-connections ability first to discover valid connection names, then pass the desired name to the gregius-data/answer ability.

Confirm the Abilities API is active on your WordPress installation, Gregius Data is installed and activated, and at least one data connection and AI model are configured.

Yes. Gregius Data supports PostgreSQL database connections and Supabase-style REST API connections, configurable through the Data Connections admin panel.


Final Thoughts

Each ability is a discrete contract: discoverable, invocable, and permissioned. When you need to extend what AI agents can do with your content, the Abilities API is where the orchestration begins.


Next Steps

View on GitHub: You can review, fork, and inspect the entire codebase and core logic over at the repository on GitHub.

Gregius Data is the open-source AI orchestration layer for WordPress.