List agent revisions
curl --request GET \
--url https://agp.eu.hcompany.ai/api/v2/agents/{agent_name}/revisions \
--header 'Authorization: Bearer <token>'import requests
url = "https://agp.eu.hcompany.ai/api/v2/agents/{agent_name}/revisions"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://agp.eu.hcompany.ai/api/v2/agents/{agent_name}/revisions', 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://agp.eu.hcompany.ai/api/v2/agents/{agent_name}/revisions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://agp.eu.hcompany.ai/api/v2/agents/{agent_name}/revisions"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://agp.eu.hcompany.ai/api/v2/agents/{agent_name}/revisions")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://agp.eu.hcompany.ai/api/v2/agents/{agent_name}/revisions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"number": 123,
"created_at": "<string>",
"created_by": {},
"message": {},
"restored_from": {}
}Agents
List agent revisions
See an agent’s history: every revision’s number, author, time, and change note, newest first.
GET
/
api
/
v2
/
agents
/
{agent_name}
/
revisions
List agent revisions
curl --request GET \
--url https://agp.eu.hcompany.ai/api/v2/agents/{agent_name}/revisions \
--header 'Authorization: Bearer <token>'import requests
url = "https://agp.eu.hcompany.ai/api/v2/agents/{agent_name}/revisions"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://agp.eu.hcompany.ai/api/v2/agents/{agent_name}/revisions', 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://agp.eu.hcompany.ai/api/v2/agents/{agent_name}/revisions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://agp.eu.hcompany.ai/api/v2/agents/{agent_name}/revisions"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://agp.eu.hcompany.ai/api/v2/agents/{agent_name}/revisions")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://agp.eu.hcompany.ai/api/v2/agents/{agent_name}/revisions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"number": 123,
"created_at": "<string>",
"created_by": {},
"message": {},
"restored_from": {}
}Lists an agent’s revisions, newest first, without their specs. Read one with Retrieve and
?revision=N, or run one with "agent": "name:N".
Returns a page envelope whose items are revision objects.
Path parameters
string
required
The agent’s
name (e.g. my-research-bot or h/web-surfer-flash). Slash-containing names are supported.Query parameters
integer
default:"1"
Page number (1-based).
integer
default:"10"
Items per page. Maximum:
1000.string
default:"-number"
Sort order. Options:
number, -number.Response
integer
Revision number, from
1.string
When the revision was written, ISO 8601.
string | null
UUID of the user who wrote it.
null when unknown, and on h/ agents.Examples
curl "https://agp.eu.hcompany.ai/api/v2/agents/my-research-bot/revisions" \
-H "Authorization: Bearer $HAI_API_KEY"
from hai_agents import Client
client = Client()
revisions = client.agents.list_agent_revisions(agent_name="my-research-bot")
for revision in revisions.items:
print(revision.number, revision.created_at, revision.message)
import { HaiAgentsClient } from "hai-agents";
const client = new HaiAgentsClient();
const revisions = await client.agents.listAgentRevisions({ agentName: "my-research-bot" });
console.log(revisions.items);
Response
{
"items": [
{
"number": 2,
"created_at": "2026-10-16T09:12:44Z",
"created_by": "5f0c2a8e-3b1d-4f6a-9c2e-7d8b1a4e6f30",
"message": "Cite a source for every claim",
"restored_from": null
},
{
"number": 1,
"created_at": "2026-10-14T15:03:10Z",
"created_by": "5f0c2a8e-3b1d-4f6a-9c2e-7d8b1a4e6f30",
"message": null,
"restored_from": null
}
],
"page": 1,
"total": 2
}
Errors
| Status | Cause |
|---|---|
404 | Agent not found or you don’t have access. |
Was this page helpful?