Get Agent
curl --request GET \
--url https://api.example.com/agent/{agent_id}import requests
url = "https://api.example.com/agent/{agent_id}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/agent/{agent_id}', 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/agent/{agent_id}",
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/agent/{agent_id}"
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/agent/{agent_id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/agent/{agent_id}")
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
Get Agent
Retrieve an agent template, agent nodes, and graph connections.
GET
/
agent
/
{agent_id}
Get Agent
curl --request GET \
--url https://api.example.com/agent/{agent_id}import requests
url = "https://api.example.com/agent/{agent_id}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/agent/{agent_id}', 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/agent/{agent_id}",
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/agent/{agent_id}"
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/agent/{agent_id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/agent/{agent_id}")
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 the saved agent template with agent node instances (including embedded
node_type) and connections.
Request
curl -X GET "https://api.mosaic.so/agent/[agent_id]" \
-H "Authorization: Bearer mk_your_api_key"
Response
{
"agent": {
"id": "123e4567-e89b-12d3-a456-789012345678",
"name": "My Agent",
"description": "",
"visibility": "private",
"created_at": "2026-03-01T12:00:00Z",
"updated_at": "2026-03-02T08:00:00Z"
},
"agent_nodes": [
{
"agent_node_id": "bf750792-a2e9-48c2-9d39-24f892772f6a",
"node_type": {
"node_type_id": "3b281fb9-9eb2-40f6-b05b-4b6f909a3da9",
"node_type_name": "AI Music",
"docs_url": "https://docs.mosaic.so/tiles/ai-music",
"params_docs_url": "https://docs.mosaic.so/tiles/ai-music#api-info"
},
"params_used": {
"use_intelligent_analysis": true,
"genre": "Cinematic"
}
},
{
"agent_node_id": "a1c2d3e4-5678-90ab-cdef-1234567890ab",
"node_type": {
"node_type_id": "ea1b2c3d-4e5f-6789-0abc-def123456789",
"node_type_name": "Captions",
"docs_url": "https://docs.mosaic.so/tiles/captions",
"params_docs_url": "https://docs.mosaic.so/tiles/captions#api-info"
},
"params_used": {
"caption_font": "Montserrat"
}
}
],
"connections": [
{
"source_agent_node_id": "bf750792-a2e9-48c2-9d39-24f892772f6a",
"target_agent_node_id": "a1c2d3e4-5678-90ab-cdef-1234567890ab"
}
]
}
Response Fields
| Field | Type | Description |
|---|---|---|
agent.id | string | Agent ID. |
agent.name | string | Agent display name. |
agent.description | string | Agent description. |
agent.visibility | string | null | Visibility setting (public or private). |
agent.created_at | string | ISO timestamp. |
agent.updated_at | string | ISO timestamp. |
agent_nodes[].agent_node_id | string | Agent node instance ID. Use this in operations[].agent_node_id for update_node and delete_node. |
agent_nodes[].node_type.node_type_id | string | Node type ID for this agent node. |
agent_nodes[].node_type.node_type_name | string | null | Node type display name for this agent node. |
agent_nodes[].node_type.docs_url | string | null | Canonical docs page URL (from nodes.docs_path). |
agent_nodes[].node_type.params_docs_url | string | null | Exact params/API section URL (from nodes.docs_anchor). |
agent_nodes[].params_used | object | Current parameter configuration for this node instance. |
connections[] | array | Directed edges between agent_node_id values in this agent graph. |
Was this page helpful?
⌘I