Generate agent from natural language
import requests
url = "https://api.datagrid.com/v1/agents/generate"
payload = { "prompt": "<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({prompt: '<string>'})
};
fetch('https://api.datagrid.com/v1/agents/generate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://api.datagrid.com/v1/agents/generate \
--header 'Content-Type: application/json' \
--data '
{
"prompt": "<string>"
}
'{
"id": "<string>",
"title": "<string>",
"description": "<string>",
"emoji": "<string>",
"prompt_examples": [
"<string>"
],
"config": {
"prompt": "<string>",
"custom_prompt": "<string>",
"tools": [
{
"tool": "<string>"
}
]
},
"claim_token": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"category": "<string>",
"connectors": [
{}
]
}{
"status_code": 123,
"error": "rate_limit_exceeded",
"message": "<string>",
"retryable": true,
"statusCode": 123,
"mitigation": "<string>",
"details": {
"reason": "<string>"
}
}Agents
Generate agent from natural language
Generate an AI agent configuration from a natural language description. Uses the same LLM-powered generation as the in-product agent builder. This is a public endpoint that does not require authentication. Rate limited to 5 requests per day per IP address. The response includes a claim_token that can be redeemed via POST /agents/claim after signing up to persist the agent.
POST
/
agents
/
generate
Generate agent from natural language
import requests
url = "https://api.datagrid.com/v1/agents/generate"
payload = { "prompt": "<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({prompt: '<string>'})
};
fetch('https://api.datagrid.com/v1/agents/generate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://api.datagrid.com/v1/agents/generate \
--header 'Content-Type: application/json' \
--data '
{
"prompt": "<string>"
}
'{
"id": "<string>",
"title": "<string>",
"description": "<string>",
"emoji": "<string>",
"prompt_examples": [
"<string>"
],
"config": {
"prompt": "<string>",
"custom_prompt": "<string>",
"tools": [
{
"tool": "<string>"
}
]
},
"claim_token": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"category": "<string>",
"connectors": [
{}
]
}{
"status_code": 123,
"error": "rate_limit_exceeded",
"message": "<string>",
"retryable": true,
"statusCode": 123,
"mitigation": "<string>",
"details": {
"reason": "<string>"
}
}Body
application/json
Natural language description of the agent you want. e.g. "I want an agent that helps my sales team answer product questions and draft follow-up emails."
Maximum string length:
2000Response
Generated agent template with a claim token
Show child attributes
Show child attributes
One-time token to create this agent in your account after signing up. Pass to POST /agents/claim. Expires after 7 days.