Start an agent run (AS4)
curl --request POST \
--url https://api.eddy.engineer/v1/agents/runs \
--header 'Content-Type: application/json' \
--data '
{
"agent": {},
"input": "<string>",
"scopes": [
"<string>"
]
}
'import requests
url = "https://api.eddy.engineer/v1/agents/runs"
payload = {
"agent": {},
"input": "<string>",
"scopes": ["<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({agent: {}, input: '<string>', scopes: ['<string>']})
};
fetch('https://api.eddy.engineer/v1/agents/runs', 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.eddy.engineer/v1/agents/runs",
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([
'agent' => [
],
'input' => '<string>',
'scopes' => [
'<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 := "https://api.eddy.engineer/v1/agents/runs"
payload := strings.NewReader("{\n \"agent\": {},\n \"input\": \"<string>\",\n \"scopes\": [\n \"<string>\"\n ]\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.eddy.engineer/v1/agents/runs")
.header("Content-Type", "application/json")
.body("{\n \"agent\": {},\n \"input\": \"<string>\",\n \"scopes\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eddy.engineer/v1/agents/runs")
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 \"agent\": {},\n \"input\": \"<string>\",\n \"scopes\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"run": {}
}Meta
Start an agent run (AS4)
Runs an inline agent spec on the engine: `agent` = {name, instructions, model (a gateway model id), effort?, tools (catalog tool names, or tools_search / tools_describe / tools_call for the whole catalog), approvals (per effect: allow / ask / deny; default read / compute / costly allow, write ask, external deny), budget (tokens, millicredits, turns, wall_ms), max_tokens}; `input` is the first message. The run acts through its own delegated token (agent:<name>@<run>): every call it makes is scoped (`scopes`, default read / compute / costly, plus write and external when its approvals may let them through), audited, and never a human. Answers at once with the run (queued); read it, or stream its steps from /events. Calls that need a person pause it (awaiting_approval); a delegated principal cannot start runs. CR3: under record or enforce, starting a run opens its ONE credit hold — its budget's millicredits or the engine's default (SS_RUN_HOLD_CREDITS), never more than the account has under enforce — answered as `hold_millicredits`; the run's own spend is asked at every step boundary and the run ends `out_of_credits` when the hold is spent; the hold settles once when the run ends. Under enforce an account with nothing left is refused 402 CREDITS_EXHAUSTED. An inline spec names no app function (fn_<app>_<name>): those are tools of an agent definition (fn.<app>.<name>), resolved as its person; naming one is refused 400 INVALID_AGENT.
POST
/
v1
/
agents
/
runs
Start an agent run (AS4)
curl --request POST \
--url https://api.eddy.engineer/v1/agents/runs \
--header 'Content-Type: application/json' \
--data '
{
"agent": {},
"input": "<string>",
"scopes": [
"<string>"
]
}
'import requests
url = "https://api.eddy.engineer/v1/agents/runs"
payload = {
"agent": {},
"input": "<string>",
"scopes": ["<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({agent: {}, input: '<string>', scopes: ['<string>']})
};
fetch('https://api.eddy.engineer/v1/agents/runs', 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.eddy.engineer/v1/agents/runs",
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([
'agent' => [
],
'input' => '<string>',
'scopes' => [
'<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 := "https://api.eddy.engineer/v1/agents/runs"
payload := strings.NewReader("{\n \"agent\": {},\n \"input\": \"<string>\",\n \"scopes\": [\n \"<string>\"\n ]\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.eddy.engineer/v1/agents/runs")
.header("Content-Type", "application/json")
.body("{\n \"agent\": {},\n \"input\": \"<string>\",\n \"scopes\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eddy.engineer/v1/agents/runs")
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 \"agent\": {},\n \"input\": \"<string>\",\n \"scopes\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"run": {}
}