Get a file
curl --request GET \
--url https://guidinghand.ai/v1/agents/{agent_id}/files/{path} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://guidinghand.ai/v1/agents/{agent_id}/files/{path}', 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/{path}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"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>"
}{
"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
Get a file
One file, with its content.
GET
/
v1
/
agents
/
{agent_id}
/
files
/
{path}
Get a file
curl --request GET \
--url https://guidinghand.ai/v1/agents/{agent_id}/files/{path} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://guidinghand.ai/v1/agents/{agent_id}/files/{path}', 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/{path}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"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>"
}{
"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.
The file’s path, like notes/customers.md (with its slashes as they are, or encoded as %2F).
Response
OK
Example:
"billing"
Always starts with /.
Example:
"/notes/customers.md"
Its size in UTF-8.
Who last wrote the file: a person, an API key, or the agent itself during a task (task_id).
- Person
- API key
- Agent
Show child attributes
Show child attributes
The file’s text. Only when you get or write one file.