Ejento APIs
V1
  • V2
  • V1
  1. Agent APIs
Ejento APIs
V1
  • V2
  • V1
  • Overview
  • Endpoints
    • Chat APIs
      • Run Chat
      • Create Custom Instructions
      • Add Comment Feedback
      • Add Upvote Feedback
      • Add Downvote Feedback
      • Get Chat Thread
      • Get Thought Process
      • Get Supporting Content
      • Get All Agent Threads
    • Agent APIs
      • Get Recent Agents
        GET
      • Add to Recent Agents
        POST
      • Delete Recent Agent
        DELETE
      • Get Starred Agents
        GET
      • Delete Starred Agents
        DELETE
      • Get Agents by Team or User Team
        GET
      • Create a Review for an Agent
        POST
      • Get Agent Reviews
        GET
      • Update an Agent Review
        PUT
      • Delete an Agent Review
        DELETE
      • Create Agent Chat
        POST
      • Get Agent Ratings
        GET
      • Toggle Rating
        PUT
      • Create Agent Alias
        POST
      • Get All Agent Alias
        GET
      • Update Agent Alias
        PUT
      • Get Agent Access Level
        GET
      • Update Agent Access Level
        PUT
      • Get All Agents by Project
        GET
      • Get Agent Types
        GET
      • Update Agent Type
        PUT
      • Get User Agent or User Agent Permission
        GET
    • Project APIs
      • Create New Project
      • Get All Projects
      • Get Project Details by ID
      • Edit Project By ID
      • Delete Project By ID
      • Add Recent Project
      • Get Recent Projects
      • Fetch Project Details
      • Add User to Project
      • Remove User from Project
      • Get User Projects For Team
    • Document APIs
      • Get Document By ID
      • Edit Document By ID
      • Delete Document By ID
    • Corpus APIs
      • Get All Corpus
      • Create Corpus
      • Get Corpus by ID
      • Edit Corpus
      • Delete Corpus
      • Get Corpus Permissions
      • Create Corpus Permissions
      • Delete Corpus Permissions
      • Get Corpus Permission By User
      • Create Document In Corpus
      • Get All Documents From Corpus
      • Delete All Documents
      • Check Duplicate Documents
    • Evaluation APIs
      • Create Evaluation Test
      • Get All Evaluation Tests for an Agent
      • Update Evaluation Test
      • Get One Evaluation Test
      • Update Evaluation Status
      • Get Evaluation Dataset for an Agent
      • Get All Evaluation Datasets for an Agent
      • Create Evaluation Dataset
      • Update Evaluation Dataset
      • Delete Evaluation Dataset
      • Get Agent Queries
      • Get Dataset Queries
    • SharePoint APIs
      • Get SharePoint items by full path
      • Get a SharePoint item by its ID
      • Create a new SharePoint item
      • Edit SharePoint item
      • Delete a SharePoint item
    • User APIs
      • Get All Users
      • Get User By ID
      • Edit User By ID
      • Delete User by ID
      • Create User Permission
      • Get User Permission by ID
      • Edit User Permission by ID
      • Delete User Permission by ID
      • Batch Delete Users
    • Analytics APIs
      • Get Tokens by Date
      • Get Tokens by Segment
      • Get User Tokens
      • Get Agent Tokens
      • Get Team Tokens
      • Get Query Count by Date
      • Get Query Count by Segment
      • Get Total Count
      • Get Daily Chat Engagement
      • Get Weekly Chat Engagement
      • Get Monthly Chat Engagement
      • Get User Engagement
      • Get Daily Chatlog Tokens
      • Get Weekly Chatlog Tokens
      • Get Monthly Chatlog Tokens
      • Get Agent Engagement
      • Get Engagement by Team
      • Get Engagement by User
      • Get Recently Active Agents
      • Get Recent Users
    • Notification APIs
      • Send Notification To User
      • Read Notification By ID
  1. Agent APIs

Create Agent Chat

POST
/agent/chatcreate
Agent APIs
This endpoint allows users to create an agent by interacting with chat messages. The input from the chat messages will be captured and processed to generate details for the agent.
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST '/agent/chatcreate' \
--header 'Content-Type: application/json' \
--data-raw '{
    "history": [
        {
            "role": "user",
            "content": "I want to create an agent for API Management Azure"
        }
    ],
    "agent_id": null,
    "created_by": "user@example.com",
    "project_id": 42,
    "flags": {
        "edit_mode": false
    },
    "user_id": 12
}'
Response Response Example
{
    "response": "How about the name \"Azure Sage\"? Do you like it?",
    "history": [
        {
            "role": "user",
            "content": "I want to create an agent for API Management Azure"
        },
        {
            "role": "ai",
            "content": "How about the name \"Azure Sage\"? Do you like it?"
        }
    ],
    "agent_id": 978,
    "agent_state": {
        "agent_name": "",
        "prefix_prompt": "You are an AI assistant who assists with API Management in Azure, providing guidance, best practices, and troubleshooting tips.",
        "agent_image": "",
        "description": "Provides guidance, best practices, and troubleshooting tips for API Management in Azure."
    },
    "new_image": false
}

Request

Body Params application/json
history
array [object {2}] 
optional
role
string 
optional
Role in the conversation (either "user" or "ai").
content
string 
optional
Content of the message.
agent_id
integer  | null 
optional
ID of an existing agent, if applicable.
created_by
string 
optional
Email of the user creating the agent.
project_id
integer 
optional
ID of the project to which the agent will be associated.
flags
object 
optional
edit_mode
boolean 
optional
Indicates if the agent is being created in edit mode.
user_id
integer 
optional
ID of the user who is interacting with the chat to create the agent.
Examples

Responses

🟢201Created
application/json
Successfully created the agent based on chat interaction.
Body
response
string 
optional
AI-generated response for the agent name.
history
array [object {2}] 
optional
role
string 
optional
content
string 
optional
Content of the message.
agent_id
integer 
optional
ID of the created agent.
agent_state
object 
optional
agent_name
string 
optional
Name of the agent.
prefix_prompt
string 
optional
Initial instruction for the agent.
agent_image
string 
optional
Image associated with the agent.
description
string 
optional
Description of the agent's purpose and role.
new_image
boolean 
optional
Whether a new image was generated for the agent.
🟠400Bad Request
🟠404Record Not Found
Previous
Delete an Agent Review
Next
Get Agent Ratings