Create an agent run
curl --request POST \
--url https://app.manypi.com/api/agents/runs \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"goal": "Find the pricing pages of the ten largest Shopify agencies in Berlin and summarise their packages."
}
'import requests
url = "https://app.manypi.com/api/agents/runs"
payload = { "goal": "Find the pricing pages of the ten largest Shopify agencies in Berlin and summarise their packages." }
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({
goal: 'Find the pricing pages of the ten largest Shopify agencies in Berlin and summarise their packages.'
})
};
fetch('https://app.manypi.com/api/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://app.manypi.com/api/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([
'goal' => 'Find the pricing pages of the ten largest Shopify agencies in Berlin and summarise their packages.'
]),
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://app.manypi.com/api/agents/runs"
payload := strings.NewReader("{\n \"goal\": \"Find the pricing pages of the ten largest Shopify agencies in Berlin and summarise their packages.\"\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://app.manypi.com/api/agents/runs")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"goal\": \"Find the pricing pages of the ten largest Shopify agencies in Berlin and summarise their packages.\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.manypi.com/api/agents/runs")
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 \"goal\": \"Find the pricing pages of the ten largest Shopify agencies in Berlin and summarise their packages.\"\n}"
response = http.request(request)
puts response.read_body{
"run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"conversation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}Agent
Create an agent run
Start an agent run on a natural-language goal. Asynchronous — poll GET /api/agents/runs/{id} for status and results.
A run that hits an ambiguity pauses and asks a question rather than guessing; read it from result_summary and answer with POST /api/agents/runs/{id}/reply to resume the same run.
Requires the agents permission.
POST
/
api
/
agents
/
runs
Create an agent run
curl --request POST \
--url https://app.manypi.com/api/agents/runs \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"goal": "Find the pricing pages of the ten largest Shopify agencies in Berlin and summarise their packages."
}
'import requests
url = "https://app.manypi.com/api/agents/runs"
payload = { "goal": "Find the pricing pages of the ten largest Shopify agencies in Berlin and summarise their packages." }
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({
goal: 'Find the pricing pages of the ten largest Shopify agencies in Berlin and summarise their packages.'
})
};
fetch('https://app.manypi.com/api/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://app.manypi.com/api/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([
'goal' => 'Find the pricing pages of the ten largest Shopify agencies in Berlin and summarise their packages.'
]),
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://app.manypi.com/api/agents/runs"
payload := strings.NewReader("{\n \"goal\": \"Find the pricing pages of the ten largest Shopify agencies in Berlin and summarise their packages.\"\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://app.manypi.com/api/agents/runs")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"goal\": \"Find the pricing pages of the ten largest Shopify agencies in Berlin and summarise their packages.\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.manypi.com/api/agents/runs")
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 \"goal\": \"Find the pricing pages of the ten largest Shopify agencies in Berlin and summarise their packages.\"\n}"
response = http.request(request)
puts response.read_body{
"run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"conversation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}Authorizations
A ManyPI API key (mpi_...) from Settings → API keys, or an OAuth 2.1 access token obtained through the MCP consent flow.
Body
application/json
What you want ManyPI to do, in plain language.
Attach to an existing conversation.
A named behaviour, e.g. lead_generation.
Show child attributes
Show child attributes
A JSON schema the result must conform to.
⌘I
