List a chat's conversation turns
curl --request GET \
--url https://api.runaether.dev/tasks/{taskID}/chats/{chatID}/turns \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.runaether.dev/tasks/{taskID}/chats/{chatID}/turns"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.runaether.dev/tasks/{taskID}/chats/{chatID}/turns', 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://api.runaether.dev/tasks/{taskID}/chats/{chatID}/turns",
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://api.runaether.dev/tasks/{taskID}/chats/{chatID}/turns"
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://api.runaether.dev/tasks/{taskID}/chats/{chatID}/turns")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.runaether.dev/tasks/{taskID}/chats/{chatID}/turns")
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{
"head_revision": 4503599627370495,
"items": [
{
"activity": {
"duration_ms": 4503599627370495,
"failed_tool_count": 4503599627370495,
"has_activity": true,
"has_result_media": true,
"item_count": 4503599627370495
},
"connection_move": {
"from": {
"runs_on": "aether"
},
"kind": "moved_here",
"reason": "plan_window_spent",
"rule": "named",
"resets_at": "2023-11-07T05:31:56Z"
},
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"latest_agent_message": {
"created_at": "2023-11-07T05:31:56Z",
"id": "<string>",
"kind": "text",
"sequence": 4503599627370495,
"state": "done",
"text": "<string>",
"turn_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"members": [
{
"attachments": [
{
"filename": "<string>",
"index": 4,
"media_type": "<string>",
"message_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sha256": "<string>",
"task_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"created_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z",
"id": "<string>",
"kind": "user",
"sequence": null,
"state": "queued",
"text": "<string>",
"turn_id": null,
"waiting": {
"code": "turn_running",
"message": "<string>"
},
"client_message_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"message_event": {
"author": {
"login": "<string>",
"association": "<string>",
"type": "<string>"
},
"body": "<string>",
"kind": "pr_comment",
"pr_number": 4503599627370496,
"repo": {
"name": "<string>",
"owner": "<string>"
},
"action": "<string>",
"branch": "<string>",
"line": 4503599627370496,
"path": "<string>",
"review_id": 4503599627370496,
"review_state": "<string>",
"reviewer_task_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"url": "<string>"
},
"sender": {
"display_name": "<string>",
"github_login": "<string>",
"kind": "user",
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"tool_response": {
"data": {
"answers": {},
"custom_answers": {}
},
"tool_name": "ask_user"
},
"waits_for": {
"chat_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"turn_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}
],
"ran_on": [
{
"runs_on": "aether"
}
],
"revision_sequence": 4503599627370495,
"root_message": {
"attachments": [
{
"filename": "<string>",
"index": 4,
"media_type": "<string>",
"message_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sha256": "<string>",
"task_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"created_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z",
"id": "<string>",
"kind": "user",
"sequence": null,
"state": "queued",
"text": "<string>",
"turn_id": null,
"waiting": {
"code": "turn_running",
"message": "<string>"
},
"client_message_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"message_event": {
"author": {
"login": "<string>",
"association": "<string>",
"type": "<string>"
},
"body": "<string>",
"kind": "pr_comment",
"pr_number": 4503599627370496,
"repo": {
"name": "<string>",
"owner": "<string>"
},
"action": "<string>",
"branch": "<string>",
"line": 4503599627370496,
"path": "<string>",
"review_id": 4503599627370496,
"review_state": "<string>",
"reviewer_task_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"url": "<string>"
},
"sender": {
"display_name": "<string>",
"github_login": "<string>",
"kind": "user",
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"tool_response": {
"data": {
"answers": {},
"custom_answers": {}
},
"tool_name": "ask_user"
},
"waits_for": {
"chat_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"turn_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
},
"sequence": 4503599627370495,
"state": "queued"
}
],
"next_cursor": "<string>"
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "org_membership_required",
"error": "<string>"
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}Tasks
List a chat's conversation turns
Lists one page of one chat’s conversation turns in the order they began: its transcript, never another chat’s turns.
Use this tool when you need to:
- Read the transcript of a chat other than the main chat, turn by turn
- Find whether a chat’s latest turn settled, errored or is still running
Examples:
- GET /tasks//chats//turns
- GET /tasks/6f1c2a9e-3b7d-4c55-9a2e-0d8b1f4e7c21/chats/0b8e6d52-4f3a-4c1e-9d7b-2a5c8e1f3b90/turns?limit=20
Hints:
- The page and each turn are shaped as listTaskTurns answers them, and a turn’s state is decided on the chat’s own status; next_cursor pages within this chat only.
- Use listTaskTurns instead for the task’s main chat, and getTaskChatTurn for one turn.
- Any member of the task’s organization may read it, a viewer included; a billing member is refused with 403 org_role_insufficient, a suspended organization with 403 org_suspended, and a task or chat outside the caller’s reach is 404 not_found; 503 when the membership check is unavailable.
- A malformed cursor, or one minted for another chat, is 422 from the handler.
GET
/
tasks
/
{taskID}
/
chats
/
{chatID}
/
turns
List a chat's conversation turns
curl --request GET \
--url https://api.runaether.dev/tasks/{taskID}/chats/{chatID}/turns \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.runaether.dev/tasks/{taskID}/chats/{chatID}/turns"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.runaether.dev/tasks/{taskID}/chats/{chatID}/turns', 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://api.runaether.dev/tasks/{taskID}/chats/{chatID}/turns",
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://api.runaether.dev/tasks/{taskID}/chats/{chatID}/turns"
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://api.runaether.dev/tasks/{taskID}/chats/{chatID}/turns")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.runaether.dev/tasks/{taskID}/chats/{chatID}/turns")
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{
"head_revision": 4503599627370495,
"items": [
{
"activity": {
"duration_ms": 4503599627370495,
"failed_tool_count": 4503599627370495,
"has_activity": true,
"has_result_media": true,
"item_count": 4503599627370495
},
"connection_move": {
"from": {
"runs_on": "aether"
},
"kind": "moved_here",
"reason": "plan_window_spent",
"rule": "named",
"resets_at": "2023-11-07T05:31:56Z"
},
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"latest_agent_message": {
"created_at": "2023-11-07T05:31:56Z",
"id": "<string>",
"kind": "text",
"sequence": 4503599627370495,
"state": "done",
"text": "<string>",
"turn_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"members": [
{
"attachments": [
{
"filename": "<string>",
"index": 4,
"media_type": "<string>",
"message_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sha256": "<string>",
"task_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"created_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z",
"id": "<string>",
"kind": "user",
"sequence": null,
"state": "queued",
"text": "<string>",
"turn_id": null,
"waiting": {
"code": "turn_running",
"message": "<string>"
},
"client_message_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"message_event": {
"author": {
"login": "<string>",
"association": "<string>",
"type": "<string>"
},
"body": "<string>",
"kind": "pr_comment",
"pr_number": 4503599627370496,
"repo": {
"name": "<string>",
"owner": "<string>"
},
"action": "<string>",
"branch": "<string>",
"line": 4503599627370496,
"path": "<string>",
"review_id": 4503599627370496,
"review_state": "<string>",
"reviewer_task_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"url": "<string>"
},
"sender": {
"display_name": "<string>",
"github_login": "<string>",
"kind": "user",
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"tool_response": {
"data": {
"answers": {},
"custom_answers": {}
},
"tool_name": "ask_user"
},
"waits_for": {
"chat_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"turn_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}
],
"ran_on": [
{
"runs_on": "aether"
}
],
"revision_sequence": 4503599627370495,
"root_message": {
"attachments": [
{
"filename": "<string>",
"index": 4,
"media_type": "<string>",
"message_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sha256": "<string>",
"task_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"created_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z",
"id": "<string>",
"kind": "user",
"sequence": null,
"state": "queued",
"text": "<string>",
"turn_id": null,
"waiting": {
"code": "turn_running",
"message": "<string>"
},
"client_message_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"message_event": {
"author": {
"login": "<string>",
"association": "<string>",
"type": "<string>"
},
"body": "<string>",
"kind": "pr_comment",
"pr_number": 4503599627370496,
"repo": {
"name": "<string>",
"owner": "<string>"
},
"action": "<string>",
"branch": "<string>",
"line": 4503599627370496,
"path": "<string>",
"review_id": 4503599627370496,
"review_state": "<string>",
"reviewer_task_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"url": "<string>"
},
"sender": {
"display_name": "<string>",
"github_login": "<string>",
"kind": "user",
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"tool_response": {
"data": {
"answers": {},
"custom_answers": {}
},
"tool_name": "ask_user"
},
"waits_for": {
"chat_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"turn_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
},
"sequence": 4503599627370495,
"state": "queued"
}
],
"next_cursor": "<string>"
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "org_membership_required",
"error": "<string>"
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}{
"code": "account_deleting",
"error": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
]
}