List your conversation with your agent
curl --request GET \
--url https://api.runaether.dev/agent/messages \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.runaether.dev/agent/messages"
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/agent/messages', 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/agent/messages",
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/agent/messages"
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/agent/messages")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.runaether.dev/agent/messages")
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{
"items": [
{
"cause": "operator",
"direction": "owner",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"issued_at": "2023-11-07T05:31:56Z",
"pictures": [
"<string>"
],
"state": "pending",
"text": "<string>",
"channel": "sms",
"completed_at": "2023-11-07T05:31:56Z",
"refusal": {
"reason": "untyped",
"resets_at": "2023-11-07T05:31:56Z"
},
"reply": "<string>",
"texted_reply": {
"carries": "reply",
"sms": {
"outcome": "none",
"rail": "sms",
"whatsapp_skip": "not_ready"
}
},
"turn_started_at": "2023-11-07T05:31:56Z"
}
],
"next_cursor": "<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": "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>"
}
]
}Agent
List your conversation with your agent
Lists the caller’s thread with their personal agent, both directions in one order, newest first, a page at a time.
Use this tool when you need to:
- Read the agent’s reply to a message sent with sendAgentMessage once its turn ended
- Review what the agent said on its own: a scheduled job’s result, a task update, a connection’s outcome, its own initiative, Aether’s notices
Examples:
- GET /agent/messages?limit=20
Hints:
- limit is optional, 1 to 100, default 20 (422 outside that); cursor is optional, the previous page’s next_cursor, and next_cursor is null on the last page.
- direction owner is every message the agent’s conversation was sent, whoever sent it (cause web, inbound_text or operator), with its state and the agent’s reply once its turn ended; direction agent is everything it said on its own (cause cron, followed_update, connect_outcome, agent, run_out or availability), with what became of its text (sms).
- An owner message’s text is the owner’s words, without delivery instructions, followed by a line per text attachment; channel (sms, imessage, rcs or whatsapp) is the channel an inbound_text arrived over, absent for web and operator messages.
- getAgent’s pending_message_id names the message the agent takes next, wherever it falls in the thread.
- Use listAgentEvents instead for what happened to the agent (wakes, sleeps, refused calls), which never holds what it said.
- Any signed-in user, for their own agent; 404 agent_not_found until they have one. An agent host’s grant is refused with 403 agent_host_route_not_allowed.
- A malformed cursor, or one minted for listAgentEvents, is 400, and a cursor whose message is not one of the caller’s agent’s is refused with 404 agent_message_not_found.
GET
/
agent
/
messages
List your conversation with your agent
curl --request GET \
--url https://api.runaether.dev/agent/messages \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.runaether.dev/agent/messages"
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/agent/messages', 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/agent/messages",
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/agent/messages"
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/agent/messages")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.runaether.dev/agent/messages")
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{
"items": [
{
"cause": "operator",
"direction": "owner",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"issued_at": "2023-11-07T05:31:56Z",
"pictures": [
"<string>"
],
"state": "pending",
"text": "<string>",
"channel": "sms",
"completed_at": "2023-11-07T05:31:56Z",
"refusal": {
"reason": "untyped",
"resets_at": "2023-11-07T05:31:56Z"
},
"reply": "<string>",
"texted_reply": {
"carries": "reply",
"sms": {
"outcome": "none",
"rail": "sms",
"whatsapp_skip": "not_ready"
}
},
"turn_started_at": "2023-11-07T05:31:56Z"
}
],
"next_cursor": "<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": "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>"
}
]
}