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
}
},
"total_count": 123
}{
"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>"
]
}
}List an agent’s files
The files in the agent’s own file system, by path, and how much of its limits they all use. Anyone in the org can read them.
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
}
},
"total_count": 123
}{
"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.
Search: only files whose path has the text containing this text (case-insensitive, up to 100 characters).
100How many to return, 1 to 100. Without limit or cursor, the whole list in one page.
1 <= x <= 100next_cursor from the previous page.
total_count adds how many match across every page.
"total_count"
Response
OK
Show child attributes
Show child attributes
Pass as cursor to get the next page.
How much of its limits the agent’s files use.
Show child attributes
Show child attributes
How many match the filters across every page. Only with include=total_count.