curl --request GET \
--url https://odyssey.asteroid.ai/agents/v2/agents/{agentId}/workflows/{workflowId}/files \
--header 'X-Asteroid-Agents-Api-Key: <api-key>'import requests
url = "https://odyssey.asteroid.ai/agents/v2/agents/{agentId}/workflows/{workflowId}/files"
headers = {"X-Asteroid-Agents-Api-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Asteroid-Agents-Api-Key': '<api-key>'}};
fetch('https://odyssey.asteroid.ai/agents/v2/agents/{agentId}/workflows/{workflowId}/files', 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://odyssey.asteroid.ai/agents/v2/agents/{agentId}/workflows/{workflowId}/files",
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-Asteroid-Agents-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 := "https://odyssey.asteroid.ai/agents/v2/agents/{agentId}/workflows/{workflowId}/files"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Asteroid-Agents-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("https://odyssey.asteroid.ai/agents/v2/agents/{agentId}/workflows/{workflowId}/files")
.header("X-Asteroid-Agents-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://odyssey.asteroid.ai/agents/v2/agents/{agentId}/workflows/{workflowId}/files")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Asteroid-Agents-Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"agentName": "<string>",
"files": [
{
"path": "<string>",
"size": 123,
"checksum": "<string>",
"content": "<string>",
"contentBase64": "<string>",
"downloadUrl": "<string>",
"fileId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"mimeType": "<string>",
"storageObjectKey": "<string>",
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"rev": 123,
"workflowId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"variantKeys": [
"<string>"
],
"version": 123
}{
"code": 400,
"message": "<string>"
}{
"code": 401,
"message": "<string>"
}{
"code": 403,
"message": "<string>"
}{
"code": 404,
"message": "<string>"
}{
"code": 500,
"message": "<string>"
}Get workflow version files
Get a workflow version rendered as a directory of files. Structural files carry inline content; user agent files are referenced by id.
curl --request GET \
--url https://odyssey.asteroid.ai/agents/v2/agents/{agentId}/workflows/{workflowId}/files \
--header 'X-Asteroid-Agents-Api-Key: <api-key>'import requests
url = "https://odyssey.asteroid.ai/agents/v2/agents/{agentId}/workflows/{workflowId}/files"
headers = {"X-Asteroid-Agents-Api-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Asteroid-Agents-Api-Key': '<api-key>'}};
fetch('https://odyssey.asteroid.ai/agents/v2/agents/{agentId}/workflows/{workflowId}/files', 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://odyssey.asteroid.ai/agents/v2/agents/{agentId}/workflows/{workflowId}/files",
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-Asteroid-Agents-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 := "https://odyssey.asteroid.ai/agents/v2/agents/{agentId}/workflows/{workflowId}/files"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Asteroid-Agents-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("https://odyssey.asteroid.ai/agents/v2/agents/{agentId}/workflows/{workflowId}/files")
.header("X-Asteroid-Agents-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://odyssey.asteroid.ai/agents/v2/agents/{agentId}/workflows/{workflowId}/files")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Asteroid-Agents-Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"agentName": "<string>",
"files": [
{
"path": "<string>",
"size": 123,
"checksum": "<string>",
"content": "<string>",
"contentBase64": "<string>",
"downloadUrl": "<string>",
"fileId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"mimeType": "<string>",
"storageObjectKey": "<string>",
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"rev": 123,
"workflowId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"variantKeys": [
"<string>"
],
"version": 123
}{
"code": 400,
"message": "<string>"
}{
"code": 401,
"message": "<string>"
}{
"code": 403,
"message": "<string>"
}{
"code": 404,
"message": "<string>"
}{
"code": 500,
"message": "<string>"
}Authorizations
Path Parameters
The ID of the agent
The ID of the workflow
Query Parameters
Which contents come inline: none (a pure manifest), structural (the default), or all (structural plus agent-file bytes within the response budget). Supersedes includeAgentFileContents when both are sent. Which file contents a tree read carries inline.
none, structural, all Return only the files at these exact tree paths. A path that names nothing yields no entry. The inline budget applies to the filtered set, so a narrow read can inline files a whole-tree read would have to skip.
Narrow which variants// files the tree carries: "none" strips every variant, a comma-separated list keeps only those variant keys. Files outside variants/ are always kept, and the response's variantKeys still names every variant. Ignored unless the workflow has variant mode enabled; absent keeps every variant.
Fetch user agent-file bytes from storage and inline them as contentBase64, so the whole directory can be materialised in one request. Off by default, in which case agent files are returned as references. Files exceeding the per-file or per-response budget stay references even when this is set. Deprecated: superseded by contents.
Per-file ceiling, in bytes, for inlined agent-file contents. Clamped to the server maximum; a caller with tighter limits of its own passes them here so the response does not carry bytes it will discard. Files above the ceiling stay references.
Ceiling, in bytes, on the total inlined agent-file contents in one response. Clamped to the server maximum. Files are admitted in path order until the ceiling is reached; the rest stay references.
Response
The request has succeeded.
A workflow rendered as a directory of files. Structural files are derived from the structured workflow and carry inline content; user agent files are referenced by id.
The owning agent's name. The directory is rendered relative to the workflow root, so a client that lays it out under a per-agent folder needs the name to derive that folder — and would otherwise have to fetch the agent for it.
The files in the workflow, sorted by path.
Show child attributes
Show child attributes
The revision the tree reflects. For the editable head, supply this as baseRev when patching; a stale value is rejected with 409.
The id of the workflow this tree renders. Lets a client that materialises the directory record what it holds without a second fetch.
Every variant key the workflow's files carry, sorted, regardless of any variants filter on the read — a narrowed tree still names what it could ask for. Absent unless the workflow has variant mode enabled.
The workflow's version number, absent for a draft that has never been published.

