List an agent’s files
curl --request GET \
--url https://guidinghand.ai/v1/agents/{agent_id}/files \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://guidinghand.ai/v1/agents/{agent_id}/files', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://guidinghand.ai/v1/agents/{agent_id}/files"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"data": [
{
"object": "agent_file",
"agent_id": "billing",
"path": "/notes/customers.md",
"bytes": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"updated_by": {
"type": "user",
"email": "jane@acme.com"
},
"content": "<string>"
}
],
"has_more": true,
"next_cursor": "<string>",
"usage": {
"files": 123,
"bytes": 123,
"limits": {
"file_bytes": 1000000,
"agent_bytes": 25000000,
"files": 1000
}
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"code": "<string>",
"answered_by": "customer",
"test_case_ids": [
"<string>"
]
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"code": "<string>",
"answered_by": "customer",
"test_case_ids": [
"<string>"
]
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"code": "<string>",
"answered_by": "customer",
"test_case_ids": [
"<string>"
]
}
}Agent files
List an agent’s files
The files in the agent’s own file system, by path (all of them, in one page), and how much of its limits they use. Anyone in the org can read them.
GET
/
v1
/
agents
/
{agent_id}
/
files
List an agent’s files
curl --request GET \
--url https://guidinghand.ai/v1/agents/{agent_id}/files \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://guidinghand.ai/v1/agents/{agent_id}/files', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://guidinghand.ai/v1/agents/{agent_id}/files"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"data": [
{
"object": "agent_file",
"agent_id": "billing",
"path": "/notes/customers.md",
"bytes": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"updated_by": {
"type": "user",
"email": "jane@acme.com"
},
"content": "<string>"
}
],
"has_more": true,
"next_cursor": "<string>",
"usage": {
"files": 123,
"bytes": 123,
"limits": {
"file_bytes": 1000000,
"agent_bytes": 25000000,
"files": 1000
}
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"code": "<string>",
"answered_by": "customer",
"test_case_ids": [
"<string>"
]
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"code": "<string>",
"answered_by": "customer",
"test_case_ids": [
"<string>"
]
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"code": "<string>",
"answered_by": "customer",
"test_case_ids": [
"<string>"
]
}
}Authorizations
An org API key (gh_live_…) from Settings → API keys in the console.
Path Parameters
The agent’s id, e.g. billing or default.
Query Parameters
Only the files in this folder, like /notes.