Get Agent Run Nodes
curl --request GET \
--url https://api.example.com/agent_run/{run_id}/nodesimport requests
url = "https://api.example.com/agent_run/{run_id}/nodes"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/agent_run/{run_id}/nodes', 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_run/{run_id}/nodes",
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_run/{run_id}/nodes"
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_run/{run_id}/nodes")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/agent_run/{run_id}/nodes")
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_bodyAgent Runs
Get Agent Run Nodes
Get node-level status details for a run.
GET
/
agent_run
/
{run_id}
/
nodes
Get Agent Run Nodes
curl --request GET \
--url https://api.example.com/agent_run/{run_id}/nodesimport requests
url = "https://api.example.com/agent_run/{run_id}/nodes"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/agent_run/{run_id}/nodes', 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_run/{run_id}/nodes",
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_run/{run_id}/nodes"
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_run/{run_id}/nodes")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/agent_run/{run_id}/nodes")
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 node-level status for a run, including node type metadata and whether a node is currently blocked by credits.
Request
curl -X GET "https://api.mosaic.so/agent_run/[run_id]/nodes" \
-H "Authorization: Bearer mk_your_api_key"
Response
{
"run_id": "7f8d9c2b-4a6e-8b3f-1d5c-9e2f3a4b5c6d",
"nodes": [
{
"agent_node_id": "11111111-1111-1111-1111-111111111111",
"original_node_id": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa",
"status": "failed",
"status_message": "Insufficient credits",
"errors": ["Audio transcription timed out after 300s"],
"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"
},
"needs_credits": true
}
]
}
Response Fields
| Field | Type | Description |
|---|---|---|
run_id | string | Agent run ID. |
nodes[].agent_node_id | string | Runtime node ID for this run. |
nodes[].original_node_id | string | null | Template agent_node_id this runtime node was cloned from. |
nodes[].status | string | Current node status. |
nodes[].status_message | string | null | Optional node status detail. |
nodes[].errors | array | Error messages from failed tasks in this node. Empty array when the node has no errors. |
nodes[].node_type | object | Node type metadata, including docs links. |
nodes[].needs_credits | boolean | true when any runtime task attached to the node is marked needs_credits=true (insufficient credits). |
When a failed or blocked node has
needs_credits=true, top up credits and call Resume Agent Run to continue the run.Was this page helpful?
⌘I