curl --request GET \
--url https://api.example.com/agent/schema/v2import requests
url = "https://api.example.com/agent/schema/v2"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/agent/schema/v2', 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/agent/schema/v2",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/agent/schema/v2"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/agent/schema/v2")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/agent/schema/v2")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"schema": {}
}Full AgentData JSON Schema for the agent form
Return the full :class:AgentData JSON Schema.
Superset of the legacy sectioned endpoint. The response body is a
single schema field carrying the whole Pydantic-generated
schema of :class:AgentData, with two curated exclusions handled
at the model layer (so no post-processing is needed here):
id: server-assigned, marked :class:SkipJsonSchemaon :attr:AgentData.id.context_config.summary_schema: internal structured-output spec for the compression model, dropped below since it is not user-editable and there is no equivalent hook on the Pydantic side.
$ref inlining is delegated to
:func:~agentscope._utils._common._flatten_json_schema so the
frontend can render every property from the response body alone.
The frontend derives its section grouping (identity / context /
react / invite) directly from this schema — top-level scalar
properties are the “identity” section, and top-level nested-object
properties each become their own section. Adding a new
user-editable field to :class:AgentData is thus enough to have it
appear in the create / edit form without a router change.
Returns:
AgentSchemaV2Response:
schema = the full :class:AgentData JSON Schema.
curl --request GET \
--url https://api.example.com/agent/schema/v2import requests
url = "https://api.example.com/agent/schema/v2"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/agent/schema/v2', 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/agent/schema/v2",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/agent/schema/v2"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/agent/schema/v2")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/agent/schema/v2")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"schema": {}
}Response
Successful Response
Response for GET /agent/schema/v2.
Wraps the full :class:AgentData JSON Schema in a single
schema field so the frontend can render every user-editable
property without the router having to enumerate them.
Full :class:AgentData JSON Schema. All user-editable fields appear as top-level entries in properties — the frontend derives its section grouping from this single schema.