Append non-terminal events to a durable agent run
curl --request POST \
--url https://api.veryfront.com/conversations/{conversation_id}/runs/{run_id}/events \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"events": [
{
"type": "TEXT_MESSAGE_START",
"messageId": "<string>",
"contentId": "<string>",
"role": "<string>"
}
],
"expected_previous_event_id": 1,
"expected_previous_external_event_sequence": 1
}
'import requests
url = "https://api.veryfront.com/conversations/{conversation_id}/runs/{run_id}/events"
payload = {
"events": [
{
"type": "TEXT_MESSAGE_START",
"messageId": "<string>",
"contentId": "<string>",
"role": "<string>"
}
],
"expected_previous_event_id": 1,
"expected_previous_external_event_sequence": 1
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
events: [
{
type: 'TEXT_MESSAGE_START',
messageId: '<string>',
contentId: '<string>',
role: '<string>'
}
],
expected_previous_event_id: 1,
expected_previous_external_event_sequence: 1
})
};
fetch('https://api.veryfront.com/conversations/{conversation_id}/runs/{run_id}/events', 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.veryfront.com/conversations/{conversation_id}/runs/{run_id}/events",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'events' => [
[
'type' => 'TEXT_MESSAGE_START',
'messageId' => '<string>',
'contentId' => '<string>',
'role' => '<string>'
]
],
'expected_previous_event_id' => 1,
'expected_previous_external_event_sequence' => 1
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.veryfront.com/conversations/{conversation_id}/runs/{run_id}/events"
payload := strings.NewReader("{\n \"events\": [\n {\n \"type\": \"TEXT_MESSAGE_START\",\n \"messageId\": \"<string>\",\n \"contentId\": \"<string>\",\n \"role\": \"<string>\"\n }\n ],\n \"expected_previous_event_id\": 1,\n \"expected_previous_external_event_sequence\": 1\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.veryfront.com/conversations/{conversation_id}/runs/{run_id}/events")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"events\": [\n {\n \"type\": \"TEXT_MESSAGE_START\",\n \"messageId\": \"<string>\",\n \"contentId\": \"<string>\",\n \"role\": \"<string>\"\n }\n ],\n \"expected_previous_event_id\": 1,\n \"expected_previous_external_event_sequence\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.veryfront.com/conversations/{conversation_id}/runs/{run_id}/events")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"events\": [\n {\n \"type\": \"TEXT_MESSAGE_START\",\n \"messageId\": \"<string>\",\n \"contentId\": \"<string>\",\n \"role\": \"<string>\"\n }\n ],\n \"expected_previous_event_id\": 1,\n \"expected_previous_external_event_sequence\": 1\n}"
response = http.request(request)
puts response.read_body{
"run": {
"run_id": "<string>",
"conversation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"message_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"requested_by_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agent_id": "<string>",
"latest_event_id": 1,
"created_at": "<string>",
"run_snapshot": {
"project_agent": {
"kind": "source",
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agent_id": "<string>"
},
"source": {
"path": "<string>",
"hash": "<string>",
"catalog_entry_id": "<string>"
},
"runtime_target": {
"environment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"branch_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"resolved_target_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"resolved_target_kind": "<string>",
"deployment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"requester": {
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
},
"implementation_kind": "<string>",
"worker_key": "<string>",
"source_target_environment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source_target_branch_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source_target_release_version": "<string>",
"runtime_target_environment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"runtime_target_branch_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"parent_conversation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"parent_run_id": "<string>",
"spawned_from_message_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"spawned_from_tool_call_id": "<string>",
"input_anchor_message_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"handoff_message_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"resolved_deployment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"latest_external_event_sequence": 1,
"waiting_tool_call_id": "<string>",
"waiting_tool_name": "<string>",
"terminal_error_code": "<string>",
"terminal_error_message": "<string>",
"started_at": "<string>",
"finished_at": "<string>"
},
"latest_event_id": 1,
"appended_count": 1,
"latest_external_event_sequence": 1
}Append non-terminal events to a durable agent run
Appends externally produced AG-UI events to an active durable run and returns the updated cursor state.
POST
/
conversations
/
{conversation_id}
/
runs
/
{run_id}
/
events
Append non-terminal events to a durable agent run
curl --request POST \
--url https://api.veryfront.com/conversations/{conversation_id}/runs/{run_id}/events \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"events": [
{
"type": "TEXT_MESSAGE_START",
"messageId": "<string>",
"contentId": "<string>",
"role": "<string>"
}
],
"expected_previous_event_id": 1,
"expected_previous_external_event_sequence": 1
}
'import requests
url = "https://api.veryfront.com/conversations/{conversation_id}/runs/{run_id}/events"
payload = {
"events": [
{
"type": "TEXT_MESSAGE_START",
"messageId": "<string>",
"contentId": "<string>",
"role": "<string>"
}
],
"expected_previous_event_id": 1,
"expected_previous_external_event_sequence": 1
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
events: [
{
type: 'TEXT_MESSAGE_START',
messageId: '<string>',
contentId: '<string>',
role: '<string>'
}
],
expected_previous_event_id: 1,
expected_previous_external_event_sequence: 1
})
};
fetch('https://api.veryfront.com/conversations/{conversation_id}/runs/{run_id}/events', 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.veryfront.com/conversations/{conversation_id}/runs/{run_id}/events",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'events' => [
[
'type' => 'TEXT_MESSAGE_START',
'messageId' => '<string>',
'contentId' => '<string>',
'role' => '<string>'
]
],
'expected_previous_event_id' => 1,
'expected_previous_external_event_sequence' => 1
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.veryfront.com/conversations/{conversation_id}/runs/{run_id}/events"
payload := strings.NewReader("{\n \"events\": [\n {\n \"type\": \"TEXT_MESSAGE_START\",\n \"messageId\": \"<string>\",\n \"contentId\": \"<string>\",\n \"role\": \"<string>\"\n }\n ],\n \"expected_previous_event_id\": 1,\n \"expected_previous_external_event_sequence\": 1\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.veryfront.com/conversations/{conversation_id}/runs/{run_id}/events")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"events\": [\n {\n \"type\": \"TEXT_MESSAGE_START\",\n \"messageId\": \"<string>\",\n \"contentId\": \"<string>\",\n \"role\": \"<string>\"\n }\n ],\n \"expected_previous_event_id\": 1,\n \"expected_previous_external_event_sequence\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.veryfront.com/conversations/{conversation_id}/runs/{run_id}/events")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"events\": [\n {\n \"type\": \"TEXT_MESSAGE_START\",\n \"messageId\": \"<string>\",\n \"contentId\": \"<string>\",\n \"role\": \"<string>\"\n }\n ],\n \"expected_previous_event_id\": 1,\n \"expected_previous_external_event_sequence\": 1\n}"
response = http.request(request)
puts response.read_body{
"run": {
"run_id": "<string>",
"conversation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"message_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"requested_by_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agent_id": "<string>",
"latest_event_id": 1,
"created_at": "<string>",
"run_snapshot": {
"project_agent": {
"kind": "source",
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agent_id": "<string>"
},
"source": {
"path": "<string>",
"hash": "<string>",
"catalog_entry_id": "<string>"
},
"runtime_target": {
"environment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"branch_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"resolved_target_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"resolved_target_kind": "<string>",
"deployment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"requester": {
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
},
"implementation_kind": "<string>",
"worker_key": "<string>",
"source_target_environment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source_target_branch_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source_target_release_version": "<string>",
"runtime_target_environment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"runtime_target_branch_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"parent_conversation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"parent_run_id": "<string>",
"spawned_from_message_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"spawned_from_tool_call_id": "<string>",
"input_anchor_message_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"handoff_message_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"resolved_deployment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"latest_external_event_sequence": 1,
"waiting_tool_call_id": "<string>",
"waiting_tool_name": "<string>",
"terminal_error_code": "<string>",
"terminal_error_message": "<string>",
"started_at": "<string>",
"finished_at": "<string>"
},
"latest_event_id": 1,
"appended_count": 1,
"latest_external_event_sequence": 1
}Authorizations
bearerAuthapiKeyAuth
Use a JWT bearer token or a Veryfront API key in the Authorization header.
Body
application/json
Required array length:
1 - 100 elementsThe option 1 associated with this record.
- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
- Option 6
- Option 7
- Option 8
- Option 9
- Option 10
- Option 11
- Option 12
- Option 13
- Option 14
- Option 15
- Option 16
Show child attributes
Show child attributes
Required range:
x >= 0Required range:
x >= 0⌘I