Agents
List agent revisions
List an agent’s revisions, newest first.
GET
/
api
/
v2
/
agents
/
{agent_name}
/
revisions
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);
curl "https://agp.eu.hcompany.ai/api/v2/agents/my-research-bot/revisions" \
-H "Authorization: Bearer $HAI_API_KEY"
{
"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
}
Behavior
Specs are not included. Read a revision with Retrieve and?revision=N, or run it with "agent": "name:N".
Path parameters
string
required
The agent’s
name, for example my-research-bot or h/web-surfer-flash.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
200 with a page envelope whose items are revision objects.
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.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);
curl "https://agp.eu.hcompany.ai/api/v2/agents/my-research-bot/revisions" \
-H "Authorization: Bearer $HAI_API_KEY"
{
"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 | Not found, or not in your organization. |
Was this page helpful?
⌘I
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);
curl "https://agp.eu.hcompany.ai/api/v2/agents/my-research-bot/revisions" \
-H "Authorization: Bearer $HAI_API_KEY"
{
"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
}