Memuat riwayat Paket dari sesi yang ada dan mengembalikannya sebagai aliran SSE. Jika sesi tidak ada, server mengirimkan JSONRPCResponse.error dengan kode 400 melalui aliran SSE. Content-Type adalah text/event-stream. Gunakan operasi ini untuk memulihkan konteks sesi.
Deskripsi operasi
Request
-
This operation retrieves session details and streams the Agent response using Server-Sent Events (SSE).
-
If the target session does not exist, the operation returns an error frame with an error code of 400.
-
The response includes information about the Agent's request processing, such as message chunks, thought processes, and tool call status updates.
-
The
stopReasonfield indicates why the Agent stops the current turn. Possible values include reaching the maximum turn limit or being canceled. -
The returned content conforms to the Agent Client Protocol (ACP). For more information, see https://agentclientprotocol.com.
Coba sekarang
Test
RAM authorization
Sintaks permintaan
POST HTTP/1.1
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| Jsonrpc |
string |
No |
Versi JSON-RPC. Nilai harus |
2.0 |
| Id |
string |
No |
ID permintaan yang dibuat oleh klien, yang dikembalikan dalam tanggapan. |
4as3dasf654a |
| Params |
object |
No |
Parameter bisnis. |
|
| SessionId |
string |
No |
The ID of the target session. If the session does not exist, an SSE error frame is returned. |
sess_0f12abc34 |
| Meta |
object |
No |
DataWorks-specific extended parameters for ACP. |
|
| IsReload |
boolean |
No |
Specifies whether to use resumable transfer. If the SSE stream is interrupted due to issues like an unstable network connection, you can set this parameter to |
true or false |
| BeginLogOffset |
integer |
No |
In a resumable transfer scenario, this specifies the offset from which to resume fetching the SSE output. |
10000 |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The unique request ID generated for this request. |
0D41C608-0C60-5EB0-B986-1460909CF642 |
| Timestamp |
integer |
The timestamp. |
1769479322828 |
| Jsonrpc |
string |
The JSON-RPC version. The value is |
2.0 |
| Id |
string |
The client-generated request ID, returned from the request. |
676303114031776 |
| Result |
any |
The result object of the SSE frame. This field is present when the operation is successful. |
{"stopReason":"end_turn"} |
| Error |
any |
The error object of the SSE frame. This field is present when an error occurs. |
{"code": 400, "errorCode": "0x50000000001", "message": "not exist session", "data": null} |
| Method |
string |
The method of the SSE frame. |
session/update |
| Params |
any |
The parameters of the SSE frame. |
{"sessionId":"af4f5ef8-e8f5-481c-ad1f-94886c6c0aed","update":{"sessionUpdate":"agent_message_chunk","content":{"type":"text","text":"hello world"}}} |
Contoh
Respons sukses
JSONformat
{
"RequestId": "0D41C608-0C60-5EB0-B986-1460909CF642",
"Timestamp": 1769479322828,
"Jsonrpc": "2.0",
"Id": "676303114031776",
"Result": "{\"stopReason\":\"end_turn\"}",
"Error": "{\"code\": 400, \"errorCode\": \"0x50000000001\", \"message\": \"not exist session\", \"data\": null}",
"Method": "session/update",
"Params": "{\"sessionId\":\"af4f5ef8-e8f5-481c-ad1f-94886c6c0aed\",\"update\":{\"sessionUpdate\":\"agent_message_chunk\",\"content\":{\"type\":\"text\",\"text\":\"hello world\"}}}"
}
Kode kesalahan
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.