agent_version=staging as a query parameter to update the staging version of the agent instead of the published agent's.curl --location --globoff 'https:///api/v2/agents/agentbuilder' \
--header 'Organization-Id;' \
--header 'Ocp-Apim-Subscription-Key: ' \
--header 'Authorization: Bearer ' \
--header 'Content-Type: application/json' \
--data '{
"history": [
{
"role": "user",
"content": "Hello, how are you?"
}
],
"agent_id": 1,
"project_id": 1,
"flags": {
"edit": true
},
"user_id": 1,
"caching_enabled": true
}'{
"success": true,
"message": "Agent created successfully by Agent Builder",
"data": {
"response": "Hello! How can I assist you in building a custom agent today?",
"history": [
{
"role": "user",
"content": "hi"
},
{
"role": "ai",
"content": "Hello! How can I assist you in building a custom agent today?"
}
],
"agent_id": 0,
"agent_state": {
"agent_name": "Legal Consultant",
"prefix_prompt": "You are an AI assistant specializing in providing legal advice on regulatory requirements, compliance issues, and legal barriers to market entry.",
"agent_image": "/build/static/media/xyz123.png",
"description": "Legal advisor provides expert guidance on compliance audits, risk assessment, contract management, and regulatory requirements to ensure legal and operational excellence."
},
"new_image": false
}
}