Skip to main content
POST
/
api
/
sub_agents
/
search
Search Sub-Agents
curl --request POST \
  --url https://app.maadify.com/api/sub_agents/search \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "limit": 100,
  "offset": 0,
  "search_value": "<string>",
  "filters": [
    {
      "column": "provider",
      "operator": "equals",
      "value": "openai"
    }
  ],
  "sort": {
    "column": "<string>",
    "desc": false
  }
}
'
import requests

url = "https://app.maadify.com/api/sub_agents/search"

payload = {
"limit": 100,
"offset": 0,
"search_value": "<string>",
"filters": [
{
"column": "provider",
"operator": "equals",
"value": "openai"
}
],
"sort": {
"column": "<string>",
"desc": False
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
limit: 100,
offset: 0,
search_value: '<string>',
filters: [{column: 'provider', operator: 'equals', value: 'openai'}],
sort: {column: '<string>', desc: false}
})
};

fetch('https://app.maadify.com/api/sub_agents/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://app.maadify.com/api/sub_agents/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'limit' => 100,
'offset' => 0,
'search_value' => '<string>',
'filters' => [
[
'column' => 'provider',
'operator' => 'equals',
'value' => 'openai'
]
],
'sort' => [
'column' => '<string>',
'desc' => false
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);

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

curl_close($curl);

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

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

func main() {

url := "https://app.maadify.com/api/sub_agents/search"

payload := strings.NewReader("{\n \"limit\": 100,\n \"offset\": 0,\n \"search_value\": \"<string>\",\n \"filters\": [\n {\n \"column\": \"provider\",\n \"operator\": \"equals\",\n \"value\": \"openai\"\n }\n ],\n \"sort\": {\n \"column\": \"<string>\",\n \"desc\": false\n }\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")

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

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

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://app.maadify.com/api/sub_agents/search")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"limit\": 100,\n \"offset\": 0,\n \"search_value\": \"<string>\",\n \"filters\": [\n {\n \"column\": \"provider\",\n \"operator\": \"equals\",\n \"value\": \"openai\"\n }\n ],\n \"sort\": {\n \"column\": \"<string>\",\n \"desc\": false\n }\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://app.maadify.com/api/sub_agents/search")

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

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"limit\": 100,\n \"offset\": 0,\n \"search_value\": \"<string>\",\n \"filters\": [\n {\n \"column\": \"provider\",\n \"operator\": \"equals\",\n \"value\": \"openai\"\n }\n ],\n \"sort\": {\n \"column\": \"<string>\",\n \"desc\": false\n }\n}"

response = http.request(request)
puts response.read_body
{
  "success": true,
  "data": {
    "items": [
      {
        "id": 123,
        "sub_agent_name_key": "<string>",
        "sub_agent_name": "<string>",
        "agent_type": "<string>",
        "tenant": "<string>",
        "tenants": {},
        "description": "<string>",
        "system_prompt": "<string>",
        "llm_model": 123,
        "model_config": {
          "temperature": 0
        },
        "config": {
          "human_input_mode": "NEVER",
          "code_execution_config": false,
          "max_consecutive_auto_reply": 123,
          "visible_senders": [
            123
          ],
          "hidden_senders": [
            123
          ],
          "hide_tool_calls": false,
          "hide_tool_responses": false,
          "memory_config": {
            "enabled": false,
            "store_memories": true,
            "use_memory_tools": true,
            "store_to_scope": "thread",
            "search_scopes": [],
            "inject_memory_context": true,
            "memory_context_limit": 3,
            "allow_compression": true,
            "compression_threshold": 123,
            "context_limit_mode": "messages",
            "max_active_messages": 123,
            "max_context_tokens": 123,
            "max_context_chars": 123
          },
          "json_schema": {}
        },
        "prompt_templates": {
          "id": "<string>",
          "tenant_id": "<string>",
          "name": "<string>",
          "version": "<string>",
          "is_active": true,
          "content": "<string>",
          "metadata": {},
          "latest_version": true,
          "created_at": "<string>",
          "updated_at": "<string>"
        },
        "agent_groups": [
          {
            "parent_agent_type": "<string>",
            "parent_agent_type_key": "<string>",
            "agent_key": "<string>",
            "agent_name": "<string>",
            "full_display_name": "<string>",
            "tenant": "<string>"
          }
        ],
        "sub_agent_tools": [
          {
            "id": 123,
            "agent_tool_id": 123,
            "option": "<string>",
            "tenant": "<string>",
            "system_agent_tool": 123,
            "setting_id": 123,
            "default_tool_owner_config": {},
            "tool_name": "<string>",
            "tool_name_display": "<string>",
            "tool_description": "<string>",
            "tool_type": "<string>",
            "custom_name": "<string>",
            "custom_description": "<string>",
            "connector_name": "<string>",
            "connector_name_display": "<string>",
            "connector_image": "<string>",
            "custom_connection_name": "<string>",
            "custom_connection_description": "<string>",
            "index_setting_id": 123,
            "is_orphaned": true,
            "created_at": "<string>"
          }
        ],
        "created_at": "<string>"
      }
    ],
    "count": 123
  },
  "error_type": "<string>",
  "error_message": "<string>"
}
{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
limit
integer
default:100

Maximum number of records to return.

Required range: 1 <= x <= 250
offset
integer
default:0

Number of records to skip before returning results.

Required range: x >= 0
search_value
string | null

Optional search text used to filter results.

filters
(FilterParam · object | FilterOrGroup · object)[]

Additional filters applied to the list query.

Example:
{
"column": "provider",
"operator": "equals",
"value": "openai"
}
sort
SortParam · object | null

Optional sort definition.

Response

Successful Response

success
boolean
required

Whether the request was successful.

data
SubAgentSearchData · object
required

Sub-agent search results.

error_type
string | null

Type of error if the request failed.

error_message
string | null

Error message or informational message.