curl --request GET \
--url https://openapi.beeos.ai/api/v1/agents/{agentId}/tasks/{taskId}/messages \
--header 'Authorization: Bearer <token>'import requests
url = "https://openapi.beeos.ai/api/v1/agents/{agentId}/tasks/{taskId}/messages"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://openapi.beeos.ai/api/v1/agents/{agentId}/tasks/{taskId}/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://openapi.beeos.ai/api/v1/agents/{agentId}/tasks/{taskId}/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://openapi.beeos.ai/api/v1/agents/{agentId}/tasks/{taskId}/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://openapi.beeos.ai/api/v1/agents/{agentId}/tasks/{taskId}/messages")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://openapi.beeos.ai/api/v1/agents/{agentId}/tasks/{taskId}/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{
"success": true,
"data": {
"messages": [
{
"message_id": "<string>",
"offset": 123,
"type": "<string>",
"publisher_id": "<string>",
"in_reply_to": "<string>",
"payload": "<unknown>",
"delivery_context": {
"target_agent_id": "<string>",
"delivery_principal": "<string>",
"runtime_epoch": "<string>",
"scope": {
"kind": "task",
"id": "<string>"
},
"parent_message_id": "<string>"
},
"created_at": "2023-11-07T05:31:56Z",
"body": "<string>",
"state": "streaming",
"stop_reason": "end_turn",
"parts": [
{
"type": "thinking",
"text": "<string>",
"state": "streaming"
}
],
"updated_at": "2023-11-07T05:31:56Z"
}
],
"latest_offset": 123,
"has_more": true,
"next_since": "<string>"
}
}{
"success": false,
"error": {
"code": "agent_not_found",
"message": "<string>",
"type": "api_error",
"request_id": "<string>",
"param": "<string>",
"metadata": {}
}
}{
"success": false,
"error": {
"code": "agent_not_found",
"message": "<string>",
"type": "api_error",
"request_id": "<string>",
"param": "<string>",
"metadata": {}
}
}{
"success": false,
"error": {
"code": "agent_not_found",
"message": "<string>",
"type": "api_error",
"request_id": "<string>",
"param": "<string>",
"metadata": {}
}
}{
"success": false,
"error": {
"code": "agent_not_found",
"message": "<string>",
"type": "api_error",
"request_id": "<string>",
"param": "<string>",
"metadata": {}
}
}{
"success": false,
"error": {
"code": "agent_not_found",
"message": "<string>",
"type": "api_error",
"request_id": "<string>",
"param": "<string>",
"metadata": {}
}
}{
"success": false,
"error": {
"code": "agent_not_found",
"message": "<string>",
"type": "api_error",
"request_id": "<string>",
"param": "<string>",
"metadata": {}
}
}List the persisted message log for a task (paged by offset).
Returns the channel-message log for a task — chat_message,
agent_reply, chat_cancel, user.continue, etc. By default
EXCLUDES ephemeral streaming chunks (agent_reply_delta,
agent_thought_chunk, agent_message_chunk); set
include_deltas=true to receive them. latest_offset always
reflects the true server-side max offset so resuming with
since=<latest_offset> is safe regardless of the filter.
Same wire shape as GET /conversations/{convId}/messages because
a task’s task_id IS the underlying conversation_id (a task is
just a single-shot channel with a deadline).
Auth path is intentionally cheaper than getTask (one MS
GetConversation + metadata check, no full message-log scan)
so paged reads stay O(1)-per-page in auth cost.
Browser exception: returns BrowserMessagesEnvelope containing
immutable single-task public events, NOT raw conversation rows.
since/Last-Event-ID refers to event.sequence (0..1000003); since
takes precedence. latest_offset is the last RETURNED sequence,
with has_more for paging. Only sealed public text, action labels
and verified status are exposed; raw tool input/output, thinking,
execution claims and original user prompt are not included.
include_deltas does not enable private/unsealed parts for browsers.
curl --request GET \
--url https://openapi.beeos.ai/api/v1/agents/{agentId}/tasks/{taskId}/messages \
--header 'Authorization: Bearer <token>'import requests
url = "https://openapi.beeos.ai/api/v1/agents/{agentId}/tasks/{taskId}/messages"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://openapi.beeos.ai/api/v1/agents/{agentId}/tasks/{taskId}/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://openapi.beeos.ai/api/v1/agents/{agentId}/tasks/{taskId}/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://openapi.beeos.ai/api/v1/agents/{agentId}/tasks/{taskId}/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://openapi.beeos.ai/api/v1/agents/{agentId}/tasks/{taskId}/messages")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://openapi.beeos.ai/api/v1/agents/{agentId}/tasks/{taskId}/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{
"success": true,
"data": {
"messages": [
{
"message_id": "<string>",
"offset": 123,
"type": "<string>",
"publisher_id": "<string>",
"in_reply_to": "<string>",
"payload": "<unknown>",
"delivery_context": {
"target_agent_id": "<string>",
"delivery_principal": "<string>",
"runtime_epoch": "<string>",
"scope": {
"kind": "task",
"id": "<string>"
},
"parent_message_id": "<string>"
},
"created_at": "2023-11-07T05:31:56Z",
"body": "<string>",
"state": "streaming",
"stop_reason": "end_turn",
"parts": [
{
"type": "thinking",
"text": "<string>",
"state": "streaming"
}
],
"updated_at": "2023-11-07T05:31:56Z"
}
],
"latest_offset": 123,
"has_more": true,
"next_since": "<string>"
}
}{
"success": false,
"error": {
"code": "agent_not_found",
"message": "<string>",
"type": "api_error",
"request_id": "<string>",
"param": "<string>",
"metadata": {}
}
}{
"success": false,
"error": {
"code": "agent_not_found",
"message": "<string>",
"type": "api_error",
"request_id": "<string>",
"param": "<string>",
"metadata": {}
}
}{
"success": false,
"error": {
"code": "agent_not_found",
"message": "<string>",
"type": "api_error",
"request_id": "<string>",
"param": "<string>",
"metadata": {}
}
}{
"success": false,
"error": {
"code": "agent_not_found",
"message": "<string>",
"type": "api_error",
"request_id": "<string>",
"param": "<string>",
"metadata": {}
}
}{
"success": false,
"error": {
"code": "agent_not_found",
"message": "<string>",
"type": "api_error",
"request_id": "<string>",
"param": "<string>",
"metadata": {}
}
}{
"success": false,
"error": {
"code": "agent_not_found",
"message": "<string>",
"type": "api_error",
"request_id": "<string>",
"param": "<string>",
"metadata": {}
}
}Authorizations
Pass a user JWT or a oag_ User API Key on the
Authorization: Bearer <token> header. Both are validated by
openapi-gateway against the Auth service.
Both credential types are user-scoped: every key (and every JWT) is bound to exactly one owner, and every route grants the caller full access to that owner's own resources. Cross-tenant access is denied by owner-ACL inside the handlers — there is no per-route scope vocabulary on this API.
Removed in v1.1.0: the legacy
agents:*/tasks:*/files:*/instances:*scope set has been dropped together with the403 insufficient_scopeerror. Existingoag_keys automatically gain full owner-level access and do not need to be re-issued. SDK calls that previously passedscopestocreateAPIKeyshould drop the argument. See the changelog at the bottom of this spec for the full migration note.
Path Parameters
128128Query Parameters
Return messages with offset > since. Combine with limit for
paginated reads. Default is 0 (start of task log).
x >= 01 <= x <= 500When true, include ephemeral streaming chunk rows
(agent_reply_delta, agent_thought_chunk,
agent_message_chunk) in the response. Default false.
Accepts true|1|yes (case-insensitive); any other value
is treated as false.