Skip to main content
GET
/
__praisonai__
/
discovery
Discovery API
curl --request GET \
  --url http://127.0.0.1:8765/__praisonai__/discovery \
  --header 'X-API-Key: <api-key>'
import requests

url = "http://127.0.0.1:8765/__praisonai__/discovery"

headers = {"X-API-Key": "<api-key>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};

fetch('http://127.0.0.1:8765/__praisonai__/discovery', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_PORT => "8765",
  CURLOPT_URL => "http://127.0.0.1:8765/__praisonai__/discovery",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "X-API-Key: <api-key>"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "http://127.0.0.1:8765/__praisonai__/discovery"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("X-API-Key", "<api-key>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("http://127.0.0.1:8765/__praisonai__/discovery")
  .header("X-API-Key", "<api-key>")
  .asString();
require 'uri'
require 'net/http'

url = URI("http://127.0.0.1:8765/__praisonai__/discovery")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'

response = http.request(request)
puts response.read_body
{
  "schema_version": "<string>",
  "server_name": "<string>",
  "server_version": "<string>",
  "providers": [
    {
      "type": "<string>",
      "name": "<string>",
      "description": "<string>",
      "capabilities": [
        {}
      ]
    }
  ],
  "endpoints": [
    {
      "name": "<string>",
      "description": "<string>",
      "provider_type": "<string>",
      "streaming": [
        {}
      ]
    }
  ]
}

Discovery API

The discovery endpoint provides a unified way to discover all available providers and endpoints on any PraisonAI server.

Overview

Every PraisonAI server exposes /__praisonai__/discovery which returns a JSON document describing:
  • Server name and version
  • Available providers (agents-api, recipe, mcp, a2a, a2u)
  • Available endpoints with their capabilities

When to Use

  • Client discovery: Automatically discover server capabilities
  • Health monitoring: Verify server is running with expected providers
  • Integration: Build clients that adapt to available endpoints

Base URL + Playground

# Start server
praisonai serve unified --host 127.0.0.1 --port 8765
Base URL: http://127.0.0.1:8765

Request

none
none
No parameters required.

Example Request

curl http://127.0.0.1:8765/__praisonai__/discovery
import requests

response = requests.get("http://127.0.0.1:8765/__praisonai__/discovery")
discovery = response.json()
print(discovery)
const response = await fetch("http://127.0.0.1:8765/__praisonai__/discovery");
const discovery = await response.json();
console.log(discovery);

Response

schema_version
string
required
Discovery schema version (e.g., “1.0.0”)
server_name
string
required
Server name (e.g., “praisonai-unified”)
server_version
string
Server version
providers
array
required
List of available providers
endpoints
array
List of available endpoints

Example Response

{
  "schema_version": "1.0.0",
  "server_name": "praisonai-unified",
  "server_version": "1.0.0",
  "providers": [
    {
      "type": "agents-api",
      "name": "Agents API",
      "description": "Agent HTTP API endpoints",
      "capabilities": ["invoke", "health"]
    },
    {
      "type": "recipe",
      "name": "Recipe Runner",
      "capabilities": ["list", "describe", "invoke", "stream"]
    },
    {
      "type": "mcp",
      "name": "MCP Server",
      "capabilities": ["list-tools", "call-tool"]
    },
    {
      "type": "a2a",
      "name": "A2A Protocol",
      "capabilities": ["agent-card", "message-send"]
    },
    {
      "type": "a2u",
      "name": "A2U Event Stream",
      "capabilities": ["subscribe", "stream"]
    }
  ],
  "endpoints": [
    {
      "name": "agents",
      "description": "Agents workflow endpoint",
      "provider_type": "agents-api"
    },
    {
      "name": "events",
      "description": "Agent event stream",
      "provider_type": "a2u",
      "streaming": ["sse"]
    }
  ]
}

Errors

StatusDescription
200Success
500Server error

CLI Equivalent

# List endpoints from a server
praisonai endpoints list --url http://127.0.0.1:8765

# Get discovery document
praisonai endpoints discovery --url http://127.0.0.1:8765

# Filter by provider type
praisonai endpoints list --url http://127.0.0.1:8765 --type agents-api

Configuration

The discovery document is automatically generated based on the server type:
Server TypeProviders Included
unifiedAll providers
agentsagents-api
reciperecipe
mcpmcp
toolstools-mcp
a2aa2a
a2ua2u

Notes

  • Discovery is always available at /__praisonai__/discovery
  • No authentication required for discovery endpoint
  • Use discovery to build adaptive clients
  • Schema version follows semver