curl --request POST \
--url http://localhost:4200/agent/start \
--header 'Content-Type: application/json' \
--data '
{
"siteId": "<string>",
"message": "<string>",
"session": "<string>",
"slug": "<string>",
"model": "<string>",
"locale": "<string>",
"activeBlockId": "<string>",
"activeBlockType": "<string>",
"activeEditablePath": "<string>",
"sitePurpose": "<string>"
}
'import requests
url = "http://localhost:4200/agent/start"
payload = {
"siteId": "<string>",
"message": "<string>",
"session": "<string>",
"slug": "<string>",
"model": "<string>",
"locale": "<string>",
"activeBlockId": "<string>",
"activeBlockType": "<string>",
"activeEditablePath": "<string>",
"sitePurpose": "<string>"
}
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({
siteId: '<string>',
message: '<string>',
session: '<string>',
slug: '<string>',
model: '<string>',
locale: '<string>',
activeBlockId: '<string>',
activeBlockType: '<string>',
activeEditablePath: '<string>',
sitePurpose: '<string>'
})
};
fetch('http://localhost:4200/agent/start', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "4200",
CURLOPT_URL => "http://localhost:4200/agent/start",
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([
'siteId' => '<string>',
'message' => '<string>',
'session' => '<string>',
'slug' => '<string>',
'model' => '<string>',
'locale' => '<string>',
'activeBlockId' => '<string>',
'activeBlockType' => '<string>',
'activeEditablePath' => '<string>',
'sitePurpose' => '<string>'
]),
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 := "http://localhost:4200/agent/start"
payload := strings.NewReader("{\n \"siteId\": \"<string>\",\n \"message\": \"<string>\",\n \"session\": \"<string>\",\n \"slug\": \"<string>\",\n \"model\": \"<string>\",\n \"locale\": \"<string>\",\n \"activeBlockId\": \"<string>\",\n \"activeBlockType\": \"<string>\",\n \"activeEditablePath\": \"<string>\",\n \"sitePurpose\": \"<string>\"\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("http://localhost:4200/agent/start")
.header("Content-Type", "application/json")
.body("{\n \"siteId\": \"<string>\",\n \"message\": \"<string>\",\n \"session\": \"<string>\",\n \"slug\": \"<string>\",\n \"model\": \"<string>\",\n \"locale\": \"<string>\",\n \"activeBlockId\": \"<string>\",\n \"activeBlockType\": \"<string>\",\n \"activeEditablePath\": \"<string>\",\n \"sitePurpose\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:4200/agent/start")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"siteId\": \"<string>\",\n \"message\": \"<string>\",\n \"session\": \"<string>\",\n \"slug\": \"<string>\",\n \"model\": \"<string>\",\n \"locale\": \"<string>\",\n \"activeBlockId\": \"<string>\",\n \"activeBlockType\": \"<string>\",\n \"activeEditablePath\": \"<string>\",\n \"sitePurpose\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyStart an agent run and get a stream id
An open-ended agent loop over the session’s content tools, as an alternative to the planner. Needs AGENT_API_KEY (Anthropic or OpenAI). Not mounted in production unless AGENT_SURFACE=on. The agent routes run open-ended loops with file and shell tools, so the surface refuses to mount at all when no credential (ACCESS_PASSWORD_HASH or ORCHESTRATOR_ACCESS_TOKEN) is configured, and answers 404 when unmounted. In development it mounts but accepts loopback callers only. Spawning the Claude CLI on the host is a further opt-in, AGENT_CLI=1, off everywhere by default. See apps/orchestrator/src/agent-surface.ts.
curl --request POST \
--url http://localhost:4200/agent/start \
--header 'Content-Type: application/json' \
--data '
{
"siteId": "<string>",
"message": "<string>",
"session": "<string>",
"slug": "<string>",
"model": "<string>",
"locale": "<string>",
"activeBlockId": "<string>",
"activeBlockType": "<string>",
"activeEditablePath": "<string>",
"sitePurpose": "<string>"
}
'import requests
url = "http://localhost:4200/agent/start"
payload = {
"siteId": "<string>",
"message": "<string>",
"session": "<string>",
"slug": "<string>",
"model": "<string>",
"locale": "<string>",
"activeBlockId": "<string>",
"activeBlockType": "<string>",
"activeEditablePath": "<string>",
"sitePurpose": "<string>"
}
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({
siteId: '<string>',
message: '<string>',
session: '<string>',
slug: '<string>',
model: '<string>',
locale: '<string>',
activeBlockId: '<string>',
activeBlockType: '<string>',
activeEditablePath: '<string>',
sitePurpose: '<string>'
})
};
fetch('http://localhost:4200/agent/start', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "4200",
CURLOPT_URL => "http://localhost:4200/agent/start",
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([
'siteId' => '<string>',
'message' => '<string>',
'session' => '<string>',
'slug' => '<string>',
'model' => '<string>',
'locale' => '<string>',
'activeBlockId' => '<string>',
'activeBlockType' => '<string>',
'activeEditablePath' => '<string>',
'sitePurpose' => '<string>'
]),
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 := "http://localhost:4200/agent/start"
payload := strings.NewReader("{\n \"siteId\": \"<string>\",\n \"message\": \"<string>\",\n \"session\": \"<string>\",\n \"slug\": \"<string>\",\n \"model\": \"<string>\",\n \"locale\": \"<string>\",\n \"activeBlockId\": \"<string>\",\n \"activeBlockType\": \"<string>\",\n \"activeEditablePath\": \"<string>\",\n \"sitePurpose\": \"<string>\"\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("http://localhost:4200/agent/start")
.header("Content-Type", "application/json")
.body("{\n \"siteId\": \"<string>\",\n \"message\": \"<string>\",\n \"session\": \"<string>\",\n \"slug\": \"<string>\",\n \"model\": \"<string>\",\n \"locale\": \"<string>\",\n \"activeBlockId\": \"<string>\",\n \"activeBlockType\": \"<string>\",\n \"activeEditablePath\": \"<string>\",\n \"sitePurpose\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:4200/agent/start")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"siteId\": \"<string>\",\n \"message\": \"<string>\",\n \"session\": \"<string>\",\n \"slug\": \"<string>\",\n \"model\": \"<string>\",\n \"locale\": \"<string>\",\n \"activeBlockId\": \"<string>\",\n \"activeBlockType\": \"<string>\",\n \"activeEditablePath\": \"<string>\",\n \"sitePurpose\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyBody
Site this session belongs to, when the orchestrator hosts more than one.
Editor session key. Scoped with siteId into the key the state store uses.
Response
{ streamId } — connect GET /agent/stream to run it.