List Agents
curl --request GET \
--url https://api.example.com/agentsimport requests
url = "https://api.example.com/agents"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/agents', 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://api.example.com/agents",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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 := "https://api.example.com/agents"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/agents")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/agents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_bodyAgents
List Agents
List and filter agents available to the API key organization.
GET
/
agents
List Agents
curl --request GET \
--url https://api.example.com/agentsimport requests
url = "https://api.example.com/agents"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/agents', 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://api.example.com/agents",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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 := "https://api.example.com/agents"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/agents")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/agents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_bodyReturns agents scoped to your API key’s organization, sorted by creation time from newest to oldest.
Use
This returns agents in the requested workspace whose names contain
When another page is available,
A valid workspace UUID outside the API key’s organization returns an empty
workspace_id to restrict the result to one workspace and name to search agent names. When both are supplied, an agent must match both filters.
Request
curl -X GET "https://api.mosaic.so/agents?limit=25" \
-H "Authorization: Bearer mk_your_api_key"
Query Parameters
| Field | Type | Required | Description |
|---|---|---|---|
limit | number | No | Page size (1-100, default 25). |
cursor | string (date-time) | No | Pagination cursor from next_cursor. Keep the same filters when requesting the next page. |
workspace_id | string (uuid) | No | Return agents from this workspace. The workspace must belong to the API key’s organization. |
name | string | No | Case-insensitive substring search on the agent name. Maximum 200 characters. % and _ are treated literally. |
Filtered Request
curl -X GET "https://api.mosaic.so/agents?workspace_id=0cc9d563-60ae-499f-98f6-96f3aafe1474&name=YouTube&limit=100" \
-H "Authorization: Bearer mk_your_api_key"
YouTube, regardless of capitalization.
Response
{
"agents": [
{
"id": "123e4567-e89b-12d3-a456-789012345678",
"name": "My Agent",
"description": "Weekly YouTube clip automation",
"created_at": "2026-03-01T12:00:00Z",
"updated_at": "2026-03-02T08:00:00Z"
}
],
"next_cursor": null
}
next_cursor contains the value to pass as cursor. It is null after the final page.
Errors
| Status | Cause |
|---|---|
400 | workspace_id is not a valid UUID, or name exceeds 200 characters. |
401 | The API key is missing or invalid. |
403 | The API key is not associated with an organization. |
agents array rather than exposing whether that workspace exists.Was this page helpful?