Process event
curl --request POST \
--url https://api.example.com/api/events \
--header 'Content-Type: application/json' \
--data '
{
"event": {},
"enable_semantic": true
}
'import requests
url = "https://api.example.com/api/events"
payload = {
"event": {},
"enable_semantic": True
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({event: {}, enable_semantic: true})
};
fetch('https://api.example.com/api/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.example.com/api/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([
'event' => [
],
'enable_semantic' => true
]),
CURLOPT_HTTPHEADER => [
"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.example.com/api/events"
payload := strings.NewReader("{\n \"event\": {},\n \"enable_semantic\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
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.example.com/api/events")
.header("Content-Type", "application/json")
.body("{\n \"event\": {},\n \"enable_semantic\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/events")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"event\": {},\n \"enable_semantic\": true\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"nodes_created": 123,
"patterns_detected": 123,
"processing_time_ms": 123
}Events
Process event
Ingest a new event and trigger automatic graph construction, episode detection, and claim extraction.
POST
/
api
/
events
Process event
curl --request POST \
--url https://api.example.com/api/events \
--header 'Content-Type: application/json' \
--data '
{
"event": {},
"enable_semantic": true
}
'import requests
url = "https://api.example.com/api/events"
payload = {
"event": {},
"enable_semantic": True
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({event: {}, enable_semantic: true})
};
fetch('https://api.example.com/api/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.example.com/api/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([
'event' => [
],
'enable_semantic' => true
]),
CURLOPT_HTTPHEADER => [
"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.example.com/api/events"
payload := strings.NewReader("{\n \"event\": {},\n \"enable_semantic\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
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.example.com/api/events")
.header("Content-Type", "application/json")
.body("{\n \"event\": {},\n \"enable_semantic\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/events")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"event\": {},\n \"enable_semantic\": true\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"nodes_created": 123,
"patterns_detected": 123,
"processing_time_ms": 123
}Request body
Event
required
Complete event object. See Types & primitives for the full schema.
boolean
default:"false"
Enable semantic processing (NER, claims, embeddings). Set to
true to extract claims from event content.Minimal example (server generates ID and timestamp)
{
"event": {
"agent_id": 1,
"agent_type": "movie-bot",
"session_id": 5001,
"event_type": {
"Communication": {
"message_type": "user_message",
"sender": 0,
"recipient": 1,
"content": { "text": "I want to book Interstellar for tonight." }
}
},
"context": {
"active_goals": [
{
"id": 101,
"description": "book_movie",
"priority": 0.9,
"progress": 0.1,
"subgoals": []
}
],
"environment": {
"variables": { "user_id": "user_99" },
"temporal": {
"deadlines": [],
"patterns": []
}
},
"resources": {
"computational": {
"cpu_percent": 10.0,
"memory_bytes": 1024,
"storage_bytes": 1024,
"network_bandwidth": 100
},
"external": {}
}
},
"metadata": { "user_id": { "String": "user_99" } }
},
"enable_semantic": true
}
Full example (client provides all fields)
{
"event": {
"id": 123456789012345678901234567890,
"timestamp": 1738425600000000000,
"agent_id": 1,
"agent_type": "movie-bot",
"session_id": 5001,
"event_type": {
"Communication": {
"message_type": "user_message",
"sender": 0,
"recipient": 1,
"content": { "text": "I want to book Interstellar for tonight." }
}
},
"causality_chain": [],
"context": {
"active_goals": [
{
"id": 101,
"description": "book_movie",
"priority": 0.9,
"progress": 0.1,
"deadline": null,
"subgoals": []
}
],
"environment": {
"variables": { "user_id": "user_99" },
"spatial": null,
"temporal": {
"time_of_day": null,
"deadlines": [],
"patterns": []
}
},
"resources": {
"computational": {
"cpu_percent": 10.0,
"memory_bytes": 1024,
"storage_bytes": 1024,
"network_bandwidth": 100
},
"external": {}
},
"fingerprint": 0,
"embeddings": null
},
"metadata": { "user_id": { "String": "user_99" } },
"context_size_bytes": 0,
"segment_pointer": null
},
"enable_semantic": true
}
Response
boolean
Whether processing succeeded.
integer
Number of graph nodes created.
integer
Number of patterns detected.
integer
Processing time in milliseconds.
{
"success": true,
"nodes_created": 5,
"patterns_detected": 2,
"processing_time_ms": 15
}
