Create a new agent using XanoScript
Authentication: required
curl --request POST \
--url https://your-xano-instance.xano.io/api:meta/workspace/{workspace_id}/agent \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: text/x-xanoscript' \
--data 'agent foo {
canonical = "custom"
llm = {
type : "anthropic"
system_prompt: "You are a helpful AI Agent."
max_steps : 5
prompt : ""
model : "claude-4-sonnet-20250514"
temperature : 1
reasoning : true
baseURL : ""
headers : ""
}
}
'{
"id": 1,
"created_at": "2023-04-19 21:01:32+0000",
"updated_at": "2023-04-19 21:01:32+0000",
"name": "Agent Test",
"description": "My agent description",
"branch": "v1",
"llm": "anthropic",
"tag": [
"example tag"
],
"xanoscript": {
"status": "ok",
"value": "<string>",
"message": "<string>"
}
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
The body is of type string.
"agent foo {\n canonical = \"custom\"\n llm = {\n type : \"anthropic\"\n system_prompt: \"You are a helpful AI Agent.\"\n max_steps : 5\n prompt : \"\"\n model : \"claude-4-sonnet-20250514\"\n temperature : 1\n reasoning : true\n baseURL : \"\"\n headers : \"\"\n }\n}\n"
Success!
Show child attributes
Was this page helpful?
curl --request POST \
--url https://your-xano-instance.xano.io/api:meta/workspace/{workspace_id}/agent \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: text/x-xanoscript' \
--data 'agent foo {
canonical = "custom"
llm = {
type : "anthropic"
system_prompt: "You are a helpful AI Agent."
max_steps : 5
prompt : ""
model : "claude-4-sonnet-20250514"
temperature : 1
reasoning : true
baseURL : ""
headers : ""
}
}
'{
"id": 1,
"created_at": "2023-04-19 21:01:32+0000",
"updated_at": "2023-04-19 21:01:32+0000",
"name": "Agent Test",
"description": "My agent description",
"branch": "v1",
"llm": "anthropic",
"tag": [
"example tag"
],
"xanoscript": {
"status": "ok",
"value": "<string>",
"message": "<string>"
}
}