Create Agent By Configure
POST
/v2/api/agent
Agent
This endpoint allows users to customize an agent’s behavior, access level, and functionality by defining various parameters in the request body.
Purpose of This Endpoint
Related API Endpoints
Step-by-Step Guide to Creating an Agent
Create Agent by Configure
Request Body Parameters
user_id
(integer): The user ID of the agent's owner.project_id
(integer): The project ID to which the agent belongs.name
(string): The name of the agent.description
(string): A brief description of the agent.type
(string): The category of the agent (e.g., QnA, Custom).prefix_prompt
(string): A predefined prompt to guide the agent’s responses.custom_instructions
(string): Specific instructions to control the agent’s behavior.create_email_alias
(boolean): Whether an email alias should be generated.access
(string): The agent's visibility setting (e.g., "Only me").llm_model
(string): The Large Language Model (LLM) used for processing.sample_q1
(string): Sample question 1.sample_q2
(string): Sample question 2.sample_q3
(string): Sample question 3.Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST '/v2/api/agent' \
--data-urlencode 'user_id=247' \
--data-urlencode 'project_id=254' \
--data-urlencode 'name=User API testing' \
--data-urlencode 'description=This is an API testing agent' \
--data-urlencode 'type=QnA' \
--data-urlencode 'prefix_prompt=abc' \
--data-urlencode 'custom_instructions=[]' \
--data-urlencode 'create_email_alias=true' \
--data-urlencode 'access=Only me' \
--data-urlencode 'Ilm_model=gpt40' \
--data-urlencode 'sample_q1=chk' \
--data-urlencode 'sample_q2=chk' \
--data-urlencode 'sample_q3=chk'
Response Response Example
{
"success": true,
"message": "Agent created successfully",
"data": {
"id": 1302,
"agent_type": {
"id": 1,
"created_by": "System",
"created_on": "2024-04-17T23:10:22.313394Z",
"modified_by": "user@example.com",
"modified_on": "2024-04-17T23:10:22.313414Z",
"name": "QnA",
"description": ""
},
"instructions": [
{}
],
"user": {
"id": 122,
"email": "function-app@ejento.ai",
"first_name": "Function",
"last_name": "App",
"organization": 1
},
"connected_tool_names": [
"string"
],
"agent_name": "User API testing",
"industry_area": "",
"domain": "This is an API testing agent",
"sample_q1": "chk",
"sample_q2": "chk",
"sample_q3": "chk",
"prefix_prompt": "abc",
"alias": null,
"is_active": true,
"is_deleted": false,
"created_by": "function-app@ejento.ai",
"created_on": "2025-01-30T19:34:21.194938Z",
"agent_image": null,
"access": "Only me",
"status": "Live",
"caching_enabled": false,
"chunk_count": 32,
"react_enabled": true,
"react_max_iteration_count": 50,
"project": 254,
"llm_config": null,
"cloned_from": null
}
}
Request
Body Params application/x-www-form-urlencoded
user_id
integer
optional
Example:
247
project_id
integer
optional
Example:
254
name
string
optional
Example:
User API testing
description
string
optional
Example:
This is an API testing agent
type
string
optional
Example:
QnA
prefix_prompt
string
optional
Example:
abc
custom_instructions
string
optional
Example:
[]
create_email_alias
boolean
optional
Example:
true
access
string
optional
Example:
Only me
Ilm_model
string
optional
Example:
gpt40
sample_q1
string
optional
Example:
chk
sample_q2
string
optional
Example:
chk
sample_q3
string
optional
Example:
chk