Find similar strategies
curl --request POST \
--url https://api.example.com/api/strategies/similar \
--header 'Content-Type: application/json' \
--data '
{
"goal_ids": [
123
],
"tool_names": [
"<string>"
],
"result_types": [
"<string>"
],
"context_hash": 123,
"agent_id": 123,
"limit": 123,
"min_score": 123
}
'import requests
url = "https://api.example.com/api/strategies/similar"
payload = {
"goal_ids": [123],
"tool_names": ["<string>"],
"result_types": ["<string>"],
"context_hash": 123,
"agent_id": 123,
"limit": 123,
"min_score": 123
}
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({
goal_ids: [123],
tool_names: ['<string>'],
result_types: ['<string>'],
context_hash: 123,
agent_id: 123,
limit: 123,
min_score: 123
})
};
fetch('https://api.example.com/api/strategies/similar', 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/strategies/similar",
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_ids' => [
123
],
'tool_names' => [
'<string>'
],
'result_types' => [
'<string>'
],
'context_hash' => 123,
'agent_id' => 123,
'limit' => 123,
'min_score' => 123
]),
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/strategies/similar"
payload := strings.NewReader("{\n \"goal_ids\": [\n 123\n ],\n \"tool_names\": [\n \"<string>\"\n ],\n \"result_types\": [\n \"<string>\"\n ],\n \"context_hash\": 123,\n \"agent_id\": 123,\n \"limit\": 123,\n \"min_score\": 123\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/strategies/similar")
.header("Content-Type", "application/json")
.body("{\n \"goal_ids\": [\n 123\n ],\n \"tool_names\": [\n \"<string>\"\n ],\n \"result_types\": [\n \"<string>\"\n ],\n \"context_hash\": 123,\n \"agent_id\": 123,\n \"limit\": 123,\n \"min_score\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/strategies/similar")
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 \"goal_ids\": [\n 123\n ],\n \"tool_names\": [\n \"<string>\"\n ],\n \"result_types\": [\n \"<string>\"\n ],\n \"context_hash\": 123,\n \"agent_id\": 123,\n \"limit\": 123,\n \"min_score\": 123\n}"
response = http.request(request)
puts response.read_body{
"score": 123
}Strategies & policy
Find similar strategies
Find strategies similar to a given set of goals or tools — share wisdom across agents.
POST
/
api
/
strategies
/
similar
Find similar strategies
curl --request POST \
--url https://api.example.com/api/strategies/similar \
--header 'Content-Type: application/json' \
--data '
{
"goal_ids": [
123
],
"tool_names": [
"<string>"
],
"result_types": [
"<string>"
],
"context_hash": 123,
"agent_id": 123,
"limit": 123,
"min_score": 123
}
'import requests
url = "https://api.example.com/api/strategies/similar"
payload = {
"goal_ids": [123],
"tool_names": ["<string>"],
"result_types": ["<string>"],
"context_hash": 123,
"agent_id": 123,
"limit": 123,
"min_score": 123
}
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({
goal_ids: [123],
tool_names: ['<string>'],
result_types: ['<string>'],
context_hash: 123,
agent_id: 123,
limit: 123,
min_score: 123
})
};
fetch('https://api.example.com/api/strategies/similar', 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/strategies/similar",
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_ids' => [
123
],
'tool_names' => [
'<string>'
],
'result_types' => [
'<string>'
],
'context_hash' => 123,
'agent_id' => 123,
'limit' => 123,
'min_score' => 123
]),
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/strategies/similar"
payload := strings.NewReader("{\n \"goal_ids\": [\n 123\n ],\n \"tool_names\": [\n \"<string>\"\n ],\n \"result_types\": [\n \"<string>\"\n ],\n \"context_hash\": 123,\n \"agent_id\": 123,\n \"limit\": 123,\n \"min_score\": 123\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/strategies/similar")
.header("Content-Type", "application/json")
.body("{\n \"goal_ids\": [\n 123\n ],\n \"tool_names\": [\n \"<string>\"\n ],\n \"result_types\": [\n \"<string>\"\n ],\n \"context_hash\": 123,\n \"agent_id\": 123,\n \"limit\": 123,\n \"min_score\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/strategies/similar")
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 \"goal_ids\": [\n 123\n ],\n \"tool_names\": [\n \"<string>\"\n ],\n \"result_types\": [\n \"<string>\"\n ],\n \"context_hash\": 123,\n \"agent_id\": 123,\n \"limit\": 123,\n \"min_score\": 123\n}"
response = http.request(request)
puts response.read_body{
"score": 123
}Use this endpoint when your agent is stuck and needs to find a successful “recipe” from a similar task. This is how you share learned behavior across different agents.
All other fields are identical to Get agent strategies.
Request body
integer[]
default:"[]"
Goal IDs to match against.
string[]
default:"[]"
Tool names to match against.
string[]
default:"[]"
Result types to match against.
integer
Context fingerprint. Set to
null to skip.integer
Filter by agent. Set to
null to search across all agents.integer
default:"10"
Maximum number of results.
number
Minimum similarity score. Set to
null to return all results.Example request
{
"goal_ids": [101],
"tool_names": ["search_api"],
"result_types": [],
"context_hash": null,
"agent_id": null,
"limit": 5,
"min_score": 0.7
}
Response
Returns an array ofSimilarStrategyResponse objects — the same as StrategyResponse with an additional score field.
number
Similarity score (
0.0–1.0).